/*
 * Earthica Developer - Responsive Stylesheet
 * Mobile-First Responsive Design
 */

/* ========================================
   EXTRA LARGE SCREENS (1400px+)
   ======================================== */
@media (min-width: 1400px) {
    .hero-title {
        font-size: var(--text-7xl);
    }

    .container-custom {
        max-width: 1400px;
    }
}

/* ========================================
   LARGE SCREENS / LAPTOPS (992px - 1199px)
   ======================================== */
@media (max-width: 1199.98px) {
    :root {
        --text-6xl: 3.25rem;
        --text-5xl: 2.75rem;
    }

    .hero-title {
        font-size: var(--text-5xl);
    }

    .section {
        padding: var(--space-4xl) 0;
    }
}

/* ========================================
   MEDIUM SCREENS / TABLETS (768px - 991px)
   ======================================== */
@media (max-width: 991.98px) {
    :root {
        --text-6xl: 3rem;
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
        --text-3xl: 1.75rem;
    }

    /* Top Header */
    .top-header {
        display: none;
    }

    /* Navbar */
    .navbar-earthica {
        top: 0;
        padding: 12px 0;
        background-color: rgba(27, 54, 93, 0.95);
        backdrop-filter: blur(20px);
    }

    .navbar-toggler-earthica {
        display: flex;
    }

    .navbar-collapse {
        background: var(--color-secondary);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        padding: var(--space-lg);
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        box-shadow: var(--shadow-xl);
    }

    .navbar-nav-earthica .nav-link {
        padding: var(--space-md) var(--space-lg) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-nav-earthica .nav-link:last-child {
        border-bottom: none;
    }

    .navbar-nav-earthica .nav-link::after {
        display: none;
    }

    /* Hero */
    .hero {
        min-height: 90vh;
    }

    .hero-title {
        font-size: var(--text-4xl);
    }

    .hero-description {
        font-size: var(--text-lg);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn-earthica {
        width: 100%;
        max-width: 280px;
    }

    /* Sections */
    .section {
        padding: var(--space-3xl) 0;
    }

    .section-title h2 {
        font-size: var(--text-3xl);
    }

    /* Page Header */
    .page-header {
        padding: calc(var(--space-4xl) + 80px) 0 var(--space-3xl);
    }

    .page-title {
        font-size: var(--text-4xl);
    }

    /* Cards */
    .card-image-earthica {
        height: 220px;
    }

    /* Footer */
    .footer {
        padding-top: var(--space-3xl);
    }

    .footer-bottom {
        margin-top: var(--space-2xl);
    }

    /* Timeline */
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 60px !important;
        padding-right: var(--space-lg) !important;
        text-align: left !important;
    }

    .timeline-dot {
        left: 10px !important;
        right: auto !important;
    }

    /* About */
    .about-image-accent {
        display: none;
    }
}

/* ========================================
   SMALL SCREENS / LARGE PHONES (576px - 767px)
   ======================================== */
@media (max-width: 767.98px) {
    :root {
        --text-5xl: 2.25rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.35rem;
        --space-4xl: 4rem;
        --space-5xl: 5rem;
    }

    html {
        font-size: 15px;
    }

    /* Hero */
    .hero {
        min-height: 85vh;
        padding: var(--space-3xl) 0;
    }

    .hero-badge {
        font-size: var(--text-xs);
        padding: var(--space-xs) var(--space-md);
    }

    .hero-title {
        font-size: var(--text-3xl);
        margin-bottom: var(--space-lg);
    }

    .hero-description {
        font-size: var(--text-base);
        margin-bottom: var(--space-xl);
    }

    .hero-scroll-indicator {
        display: none;
    }

    /* Sections */
    .section {
        padding: var(--space-2xl) 0;
    }

    .section-title {
        margin-bottom: var(--space-2xl);
    }

    .section-subtitle {
        font-size: var(--text-base);
    }

    /* Page Header */
    .page-header {
        padding: calc(var(--space-3xl) + 70px) 0 var(--space-2xl);
    }

    .page-title {
        font-size: var(--text-3xl);
    }

    /* Cards */
    .card-body-earthica {
        padding: var(--space-lg);
    }

    .card-meta-earthica {
        flex-wrap: wrap;
        gap: var(--space-md);
    }

    /* Feature Cards */
    .feature-card {
        padding: var(--space-xl);
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: var(--text-2xl);
    }

    /* Footer */
    .footer {
        text-align: center;
    }

    .footer-description {
        max-width: 100%;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links a {
        justify-content: center;
    }

    .footer-contact-item {
        justify-content: center;
        text-align: left;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        text-align: center;
    }

    /* Buttons */
    .btn-earthica {
        padding: var(--space-sm) var(--space-lg);
        font-size: var(--text-xs);
    }

    .btn-lg-earthica {
        padding: var(--space-md) var(--space-xl);
        font-size: var(--text-sm);
    }

    /* Gallery */
    .gallery-item img {
        height: 250px;
    }

    .gallery-filter {
        gap: var(--space-xs);
    }

    .filter-btn {
        padding: var(--space-xs) var(--space-md);
        font-size: var(--text-xs);
    }

    /* CTA */
    .cta-section {
        padding: var(--space-3xl) 0;
    }

    .cta-title {
        font-size: var(--text-2xl);
    }

    /* Testimonial */
    .testimonial-card {
        padding: var(--space-xl);
    }

    .testimonial-text {
        font-size: var(--text-base);
    }

    /* Scroll Top */
    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }

    /* Stats */
    .stat-number {
        font-size: var(--text-4xl);
    }
}

/* ========================================
   EXTRA SMALL SCREENS / PHONES (< 576px)
   ======================================== */
@media (max-width: 575.98px) {
    :root {
        --text-5xl: 2rem;
        --text-4xl: 1.5rem;
        --text-3xl: 1.35rem;
        --text-2xl: 1.25rem;
    }

    html {
        font-size: 14px;
    }

    .container-custom {
        padding: 0 var(--space-md);
    }

    /* Hero */
    .hero {
        min-height: 80vh;
    }

    .hero-content {
        padding: 0 var(--space-md);
    }

    .hero-title {
        font-size: var(--text-2xl);
    }

    /* Navbar */
    .navbar-brand-earthica {
        font-size: var(--text-xl);
    }

    /* Page Header */
    .page-breadcrumb {
        flex-wrap: wrap;
        gap: var(--space-sm);
    }

    /* Cards */
    .card-image-earthica {
        height: 200px;
    }

    /* Gallery */
    .gallery-item img {
        height: 200px;
    }

    /* Timeline */
    .timeline::before {
        left: 15px;
    }

    .timeline-item {
        padding-left: 45px !important;
    }

    .timeline-dot {
        left: 5px !important;
        width: 16px;
        height: 16px;
    }

    .timeline-year {
        font-size: var(--text-xl);
    }

    /* Lightbox */
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    /* Values */
    .value-card {
        padding: var(--space-lg);
    }

    .value-icon {
        width: 60px;
        height: 60px;
    }
}

/* ========================================
   LANDSCAPE ORIENTATION FIXES
   ======================================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: var(--space-4xl) 0;
    }

    .hero-title {
        font-size: var(--text-3xl);
    }

    .hero-description {
        display: none;
    }

    .hero-scroll-indicator {
        display: none;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {

    .navbar-earthica,
    .scroll-top,
    .hero-scroll-indicator,
    .footer-social {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: var(--space-2xl) 0;
    }

    .section {
        padding: var(--space-xl) 0;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    a {
        text-decoration: underline;
    }
}

/* ========================================
   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;
    }

    .fade-in,
    .fade-in-left,
    .fade-in-right {
        opacity: 1;
        transform: none;
    }
}

/* ========================================
   HIGH CONTRAST MODE
   ======================================== */
@media (prefers-contrast: high) {
    :root {
        --color-primary: #FFFFFF;
        --color-secondary: #000000;
        --color-accent: #FFD700;
    }

    .btn-earthica {
        border-width: 3px;
    }

    a:focus,
    button:focus {
        outline: 3px solid var(--color-accent);
        outline-offset: 2px;
    }
}