/* Mobile First Responsive Styles */

/* === GLOBAL MOBILE FIXES === */

/* Prevent single-word orphan lines */
h1,
h2,
h3,
h4,
p,
li,
span {
    text-wrap: balance;
}

/* Center all content with consistent padding */
.container {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

/* Maximum responsive section titles on mobile */
.section-title {
    font-size: clamp(1.8rem, 6vw, 2.5rem) !important;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1rem !important;
    line-height: 1.5;
}

/* Smaller trust bar scrolling loop on mobile */
.trust-bar {
    padding: 0.75rem 0 !important;
}

.trust-bar .trust-item {
    font-size: 0.75rem !important;
    gap: 0.4rem !important;
}

.trust-bar .trust-item i {
    font-size: 1rem !important;
}

/* Base overrides for mobile */
.hero-content {
    text-align: center;
    padding-top: 6rem;
    /* Space for fixed header */
}

.hero h1 {
    font-size: clamp(2.2rem, 10vw, 3.2rem);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero h1 .text-gradient {
    white-space: nowrap;
}

.hero p {
    font-size: 1rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
    color: #e0e0e0;
}

.hero-btns {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 2rem;
}

.hero-btns .btn {
    width: 100%;
    text-align: center;
}

.trust-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* 2 columns on mobile */
    gap: 1.5rem;
    text-align: center;
    padding: 2rem 0;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.trust-item i {
    font-size: 1.5rem;
    color: var(--primary);
}

.services-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding: 0 1rem;
    padding-bottom: 2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
}

.services-grid::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

/* Service Pagination Dots (Mobile) */
.services-pagination {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: -1rem;
    /* Pull up closer to cards */
    padding-bottom: 2rem;
}

.service-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-dot.active {
    background-color: var(--primary);
    transform: scale(1.2);
}

.service-card {
    min-width: 95%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    /* Prevent skipping slides */
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

/* Match Screenshot Modal Styles */
.contact.section-padding {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
}

.modal-content {
    background: #121212 !important;
    border: 1px solid #333 !important;
    padding: 2rem !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8) !important;
}

.modal-content h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.modal-subtitle {
    color: #999;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.form-group label {
    color: #eee;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    display: block;
}

.form-group input,
.form-group select {
    background-color: #1e1e1e !important;
    border: 1px solid #333 !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    color: white !important;
    font-size: 1rem;
}

.form-group input::placeholder {
    color: #666;
}

.modal-content .btn-primary {
    background: linear-gradient(90deg, #ff8c42, #ff5722) !important;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 1rem !important;
    border-radius: 50px !important;
    /* Pill shape */
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.3);
    width: 100%;
    margin-top: 0.5rem;
}

.form-note {
    margin-top: 3rem;
    color: #999;
    font-size: 0.85rem;
    text-align: center;
    display: block;
}

.form-note i {
    margin-right: 0.4rem;
    color: var(--primary);
}

/* Service Card Trims */
.service-content {
    padding: 0.5rem 1rem 0.6rem !important;
    text-align: center;
}

.service-icon {
    width: 45px !important;
    height: 45px !important;
    margin: 0 auto 0.5rem !important;
}

.service-icon i {
    font-size: 1.3rem !important;
}

.service-card h3 {
    font-size: 1.1rem !important;
    margin-bottom: 0.4rem !important;
}

.service-card p {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
}

.service-card:hover {
    transform: translateY(-5px);
}

/* Audience Section Carousel (Mobile) */
.audience-split {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding: 0 1rem;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.audience-split::-webkit-scrollbar {
    display: none;
}

.audience-card {
    min-width: 95%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    flex-shrink: 0;
}

/* Audience Pagination Dots */
.audience-pagination {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 0 2rem;
}

.audience-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.audience-dot.active {
    background-color: var(--primary);
    transform: scale(1.2);
}

/* Reliability Pagination Dots */
.difference-pagination {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    padding: 0 0 2rem;
    margin-top: -1rem;
}

.difference-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.difference-dot.active {
    background-color: var(--primary);
    transform: scale(1.2);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-content h3 {
    font-size: 1.5rem;
}

.text-link {
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

/* Contact Section Mobile */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.method i {
    font-size: 1.2rem;
    color: var(--primary);
    margin-top: 0.2rem;
}

.contact-form-card {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-family: var(--font-body);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.full-width {
    width: 100%;
}

/* Footer Mobile */
.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
    padding: 4rem 0 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-links a,
.social-links a:visited {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.4);
}

/* Tablet (768px+) */
@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .hero-btns {
        flex-direction: row;
        justify-content: center;
        width: auto;
    }

    .hero-btns .btn {
        width: auto;
    }

    .trust-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2 columns tablet */
        display: grid;
        /* Reset flex to grid */
        overflow-x: visible;
        padding-bottom: 0;
    }

    .services-pagination {
        display: none;
    }

    .why-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: center;
    }

    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        text-align: left;
    }

    .social-links {
        justify-content: flex-start;
    }
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    .hero-content {
        padding-top: 8rem;
    }

    .hero h1 {
        font-size: 4.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        /* 3 columns desktop */
        display: grid;
    }

    .contact-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .portfolio-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .portfolio-item {
        height: 300px;
        background-color: #333;
        /* Placeholder color before img */
        border-radius: 15px;
        position: relative;
        overflow: hidden;
        cursor: pointer;
    }

    .portfolio-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 1.5rem;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
        opacity: 0;
        transform: translateY(20px);
        transition: var(--transition);
    }

    .portfolio-item:hover .portfolio-overlay {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation Classes */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Background/Hero Specifics */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.7);
    /* Darken image */
}

/* ========================================
   DESKTOP FIXES (1024px+)
   These rules override sections.css
   ======================================== */
@media (min-width: 768px) {
    .difference-pagination {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .footer-content {
        padding-top: 8rem;
        padding-bottom: 6rem;
    }

    /* Larger Hero Button */
    .hero-btns .btn {
        padding: 1.25rem 3rem;
        font-size: 1.2rem;
        font-weight: 700;
        letter-spacing: 1px;
    }

    /* Balanced Footer Layout */
    .footer-content {
        grid-template-columns: repeat(3, 1fr) !important;
        /* Force equal columns */
        justify-content: center;
        text-align: center;
    }

    /* Center ALL footer sections */
    .footer-brand,
    .footer-links,
    .footer-legal {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        /* Or center vertically? */
    }

    /* Flex containers need center alignment */
    .social-links {
        justify-content: center;
    }

    .footer-links ul {
        align-items: center;
    }
}