/**
 * ATLAS Theme - Responsive CSS
 * Mobile-First Approach
 * 
 * @author Gabriel Amaral
 * @since 15/12/2025
 */

/* ========================================
   MOBILE (Base - até 767px)
   ======================================== */

/* Header Mobile */
.header__nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-primary);
    padding: 80px var(--spacing-xl) var(--spacing-xl);
    transition: right var(--transition-base);
    z-index: var(--z-modal);
}

.header__nav.open {
    right: 0;
}

.header__nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.header__nav-link {
    display: block;
    width: 100%;
    padding: var(--spacing-md) 0;
    font-size: var(--fs-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header__toggle {
    display: flex;
}

.header__cta {
    display: none;
}

/* Hero Mobile */
.hero {
    padding-top: calc(60px + var(--spacing-xl));
    min-height: auto;
    padding-bottom: var(--spacing-2xl);
}

.hero__container {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    text-align: center;
}

.hero__subtitle {
    margin: 0 auto var(--spacing-lg);
}

.hero__ctas {
    justify-content: center;
}

.hero__ctas .btn {
    width: 100%;
    justify-content: center;
}

.hero__image {
    order: -1;
    max-width: 280px;
    margin: 0 auto;
}

.hero__stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-lg);
    text-align: center;
}

.hero__stat {
    text-align: center;
    flex: 0 0 45%;
}

/* Sections Mobile */
.section {
    padding: var(--spacing-2xl) 0;
}

.section__title {
    font-size: var(--fs-2xl);
}

/* Problems Grid Mobile */
.problems__grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.problem-card {
    padding: var(--spacing-lg);
}

/* Solutions Grid Mobile */
.solutions__grid {
    grid-template-columns: 1fr;
}

/* Methodology Mobile */
.methodology__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.method-card {
    padding: var(--spacing-lg);
}

.method-card__letter {
    font-size: var(--fs-3xl);
}

.method-card:nth-child(5) {
    grid-column: span 2;
    max-width: 50%;
    margin: 0 auto;
}

/* Cases Mobile */
.cases__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.stat-card {
    padding: var(--spacing-lg);
}

.stat-card__value {
    font-size: var(--fs-2xl);
}

.testimonials__grid {
    grid-template-columns: 1fr;
}

/* Pricing Mobile */
.pricing__grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

.pricing-card.featured {
    transform: none;
    order: -1;
}

.pricing-card.featured:hover {
    transform: translateY(-10px);
}

/* FAQ Mobile */
.faq-item__question {
    padding: var(--spacing-md);
    font-size: var(--fs-base);
}

/* Contact Mobile */
.contact__grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
}

.contact__info {
    text-align: center;
}

.contact__form {
    padding: var(--spacing-lg);
}

/* Footer Mobile */
.footer__top {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-xl);
}

.footer__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer__social {
    justify-content: center;
}

.footer__bottom {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-md);
}

.footer__legal {
    justify-content: center;
}

/* Sticky CTA Mobile */
.sticky-cta__container {
    flex-direction: column;
    text-align: center;
    gap: var(--spacing-md);
}

.sticky-cta__text {
    font-size: var(--fs-sm);
}

/* About Mobile */
.about__grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-xl);
}

.about__photo,
.about__photo-placeholder {
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.about__photo-placeholder span {
    font-size: 60px;
}

.about__content {
    max-width: 100%;
}

/* ========================================
   TABLET (768px - 1023px)
   ======================================== */
@media (min-width: 768px) {

    /* Headers & Sections */
    .section {
        padding: var(--spacing-3xl) 0;
    }

    .section__title {
        font-size: var(--fs-3xl);
    }

    /* Hero Tablet */
    .hero {
        min-height: 90vh;
    }

    .hero__container {
        text-align: left;
    }

    .hero__subtitle {
        margin: 0 0 var(--spacing-lg);
    }

    .hero__ctas {
        justify-content: flex-start;
    }

    .hero__ctas .btn {
        width: auto;
    }

    .hero__image {
        order: 0;
        max-width: 100%;
    }

    .hero__stats {
        justify-content: flex-start;
    }

    .hero__stat {
        text-align: left;
    }

    /* Problems Grid Tablet */
    .problems__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Solutions Grid Tablet */
    .solutions__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Methodology Tablet */
    .methodology__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .method-card:nth-child(4),
    .method-card:nth-child(5) {
        grid-column: span 1;
        max-width: 100%;
    }

    /* Pricing Tablet */
    .pricing__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-card:last-child {
        grid-column: span 2;
        max-width: 50%;
        margin: 0 auto;
    }

    /* Footer Tablet */
    .footer__top {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }

    .footer__brand {
        grid-column: span 2;
        align-items: flex-start;
    }

    .footer__social {
        justify-content: flex-start;
    }

    .footer__bottom {
        flex-direction: row;
    }

    /* Sticky CTA Tablet */
    .sticky-cta__container {
        flex-direction: row;
    }
}

/* ========================================
   DESKTOP (1024px+)
   ======================================== */
@media (min-width: 1024px) {

    /* Header Desktop */
    .header__nav {
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        background: transparent;
        padding: 0;
    }

    .header__nav-list {
        flex-direction: row;
        align-items: center;
        gap: var(--spacing-xl);
    }

    .header__nav-link {
        padding: var(--spacing-sm) 0;
        font-size: var(--fs-sm);
        border-bottom: none;
    }

    .header__toggle {
        display: none;
    }

    .header__cta {
        display: flex;
    }

    /* Hero Desktop */
    .hero {
        min-height: 100vh;
    }

    .hero__container {
        grid-template-columns: 1fr 1fr;
    }

    /* Problems Grid Desktop */
    .problems__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Solutions Grid Desktop */
    .solutions__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Methodology Desktop */
    .methodology__grid {
        grid-template-columns: repeat(5, 1fr);
    }

    /* Cases Desktop */
    .cases__stats {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Pricing Desktop */
    .pricing__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pricing-card:last-child {
        grid-column: auto;
        max-width: 100%;
    }

    .pricing-card.featured {
        transform: scale(1.05);
    }

    /* Footer Desktop */
    .footer__top {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    .footer__brand {
        grid-column: auto;
    }
}

/* ========================================
   LARGE DESKTOP (1440px+)
   ======================================== */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }

    .hero__title {
        font-size: var(--fs-6xl);
    }

    .section__title {
        font-size: var(--fs-4xl);
    }
}

/* ========================================
   ACCESSIBILITY & REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero__image img {
        animation: none;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {

    .header,
    .sticky-cta,
    .preloader {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
    }
}