/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Impact Stats Mobile */
@media (max-width: 768px) {
    .impact-stat-number {
        font-size: 0.8rem !important;
    }

    .impact-stat-label {
        font-size: 0.45rem !important;
    }

    .impact-stat-sublabel {
        font-size: 0.4rem !important;
    }

    /* Hero Section Mobile */
    #hero h1, .hero-section h1 {
        font-size: 1.1rem !important;
        line-height: 1.2 !important;
        margin-bottom: 1rem !important;
    }

    #hero p {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
    }

    /* Section Headers Mobile */
    .section-title {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .section-subtitle {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
    }

    /* Grid Layouts Mobile */
    .image-grid {
        grid-template-columns: 1fr !important;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        margin-top: 2rem;
    }

    /* About/Heritage Section Mobile */
    #about [style*="display: grid"][style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    #about [style*="padding: 3rem"] {
        padding: 1.5rem 1rem !important;
    }

    #about [style*="padding: 2.5rem"] {
        padding: 1.5rem !important;
    }

    #about [style*="font-size: 2.5rem"] {
        font-size: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    #about [style*="font-size: 1.15rem"] {
        font-size: 0.85rem !important;
        line-height: 1.6 !important;
        padding: 0 0.5rem !important;
    }

    #about [style*="gap: 3.5rem"] {
        gap: 1.5rem !important;
        flex-direction: column !important;
        margin-bottom: 1.5rem !important;
    }

    #about img[style*="height: 75px"] {
        height: 45px !important;
    }

    #about img[style*="height: 80px"] {
        height: 50px !important;
    }

    #about img[style*="height: 25px"] {
        height: 18px !important;
    }

    #about [style*="width: 1px; height: 85px"] {
        display: none !important;
    }

    /* Timeline Mobile */
    .timeline::before { left: 20px; }
    .timeline-item { flex-direction: row !important; }
    .timeline-dot { left: 20px; }

    .timeline-container {
        width: 100% !important;
        padding-left: 40px !important;
        padding-right: 10px !important;
    }

    .timeline-container.left,
    .timeline-container.right {
        left: 0 !important;
    }

    .timeline-container.left::before,
    .timeline-container.right::before {
        left: 15px !important;
    }

    /* Full Timeline New Mobile - Specific to timeline section only */
    #timeline .timeline-section {
        height: 80vh !important;
        min-height: 80vh !important;
    }

    #timeline .timeline-image-container {
        width: 100vw !important;
        height: 80vh !important;
        position: relative !important;
        overflow: hidden !important;
    }

    #timeline .timeline-image-fullwidth {
        width: 100vw !important;
        height: 80vh !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }

    #timeline .timeline-image-fullwidth img {
        width: 100% !important;
        height: 100% !important;
        min-width: 100% !important;
        min-height: 100% !important;
        max-width: 100vw !important;
        max-height: 80vh !important;
        object-fit: contain !important;
        object-position: center !important;
        display: block !important;
    }

    .timeline-caption {
        bottom: 3% !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: 90% !important;
        padding: 1rem !important;
        font-size: 0.8rem !important;
    }

    .timeline-caption h4 {
        font-size: 1.2rem !important;
        margin-bottom: 0.3rem !important;
    }

    .timeline-year-badge {
        font-size: 0.8rem !important;
        padding: 0.3rem 0.8rem !important;
        margin-bottom: 0.5rem !important;
    }

    .timeline-date {
        font-size: 0.75rem !important;
        margin-bottom: 0.5rem !important;
    }

    .timeline-description {
        font-size: 0.7rem !important;
        line-height: 1.4 !important;
    }

    /* Layout Adjustments */
    section#programmes .image-grid > div,
    section#programmes [style*="grid-template-columns: repeat(auto-fit"] > div {
        grid-column: 1 !important;
    }

    section#process [style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }

    section#process [style*="grid-column: span 2"] {
        grid-column: 1 !important;
    }

    section#social [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    section#contact [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    [style*="grid-template-columns: repeat(auto-fit, minmax(200px"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Padding Adjustments Mobile */
    section {
        padding: 2rem 0 !important;
    }

    [style*="padding: 5rem"],
    [style*="padding: 4rem"],
    [style*="padding: 3rem"] {
        padding: 1.5rem 0.75rem !important;
    }

    [style*="padding: 2rem"] {
        padding: 1rem !important;
    }

    [style*="padding: 0 2rem"] {
        padding: 0 0.75rem !important;
    }

    /* Margin Adjustments */
    [style*="margin-bottom: 3rem"] {
        margin-bottom: 1.5rem !important;
    }

    [style*="margin-bottom: 2rem"] {
        margin-bottom: 1rem !important;
    }

    [style*="margin-top: 3rem"] {
        margin-top: 1.5rem !important;
    }

    [style*="margin-top: 2rem"] {
        margin-top: 1rem !important;
    }

    /* Font Size Adjustments Mobile */
    [style*="font-size: 3rem"] {
        font-size: 1.25rem !important;
    }

    [style*="font-size: 2.5rem"] {
        font-size: 1.125rem !important;
    }

    [style*="font-size: 2rem"] {
        font-size: 1rem !important;
    }

    [style*="font-size: 1.75rem"] {
        font-size: 0.95rem !important;
    }

    [style*="font-size: 1.5rem"] {
        font-size: 0.9rem !important;
    }

    [style*="font-size: 1.25rem"] {
        font-size: 0.875rem !important;
    }

    [style*="font-size: 1.125rem"] {
        font-size: 0.85rem !important;
    }

    [style*="font-size: 1rem"] {
        font-size: 0.8rem !important;
    }

    /* Specific text adjustments */
    p {
        font-size: 0.875rem !important;
        line-height: 1.5 !important;
    }

    h1 {
        font-size: 1.5rem !important;
    }

    h2 {
        font-size: 1.25rem !important;
    }

    h3 {
        font-size: 1.125rem !important;
    }

    h4 {
        font-size: 1rem !important;
    }

    h5 {
        font-size: 0.9rem !important;
    }

    /* Buttons Mobile */
    .btn {
        width: 100% !important;
        padding: 0.4rem 0.6rem !important;
        font-size: 0.5rem !important;
    }

    #hero .btn, .hero-section .btn {
        padding: 0.35rem 0.7rem !important;
        font-size: 0.45rem !important;
        margin: 0.15rem 0 !important;
    }

    /* Cards Mobile */
    [style*="border-radius: 24px"] {
        border-radius: 12px !important;
    }

    [style*="border-radius: 16px"] {
        border-radius: 8px !important;
    }

    .timeline-card {
        padding: 0.5rem !important;
    }

    #programmes [style*="padding: 2rem"] {
        padding: 0.5rem !important;
    }

    #programmes h3 {
        font-size: 0.6rem !important;
        margin-bottom: 0.25rem !important;
    }

    #programmes p {
        font-size: 0.45rem !important;
        line-height: 1.4 !important;
    }

    #programmes li {
        font-size: 0.4rem !important;
        padding: 0.1rem 0 !important;
    }
}

@media (max-width: 480px) {
    .impact-stat-number {
        font-size: 0.65rem !important;
    }

    .impact-stat-label {
        font-size: 0.35rem !important;
    }

    .impact-stat-sublabel {
        font-size: 0.3rem !important;
    }

    /* About/Heritage Section Extra Small Mobile */
    #about [style*="padding: 3rem"] {
        padding: 1rem 0.5rem !important;
    }

    #about [style*="padding: 2.5rem"] {
        padding: 1rem !important;
    }

    #about [style*="font-size: 2.5rem"] {
        font-size: 1.2rem !important;
        margin-bottom: 1rem !important;
    }

    #about [style*="font-size: 1.15rem"] {
        font-size: 0.75rem !important;
        line-height: 1.5 !important;
        padding: 0 0.25rem !important;
    }

    #about [style*="gap: 3.5rem"] {
        gap: 1rem !important;
        margin-bottom: 1rem !important;
    }

    #about img[style*="height: 75px"] {
        height: 35px !important;
    }

    #about img[style*="height: 80px"] {
        height: 40px !important;
    }

    #about img[style*="height: 25px"] {
        height: 15px !important;
    }

    /* Timeline Extra Mobile - Specific to timeline section only */
    #timeline .timeline-section {
        height: 70vh !important;
        min-height: 70vh !important;
    }

    #timeline .timeline-image-container {
        height: 70vh !important;
        overflow: hidden !important;
    }

    #timeline .timeline-image-fullwidth {
        height: 70vh !important;
    }

    #timeline .timeline-image-fullwidth img {
        height: 100% !important;
        min-height: 100% !important;
        max-height: 70vh !important;
        object-fit: contain !important;
    }

    .timeline-caption {
        bottom: 2% !important;
        max-width: 95% !important;
        padding: 0.75rem !important;
        font-size: 0.7rem !important;
    }

    .timeline-caption h4 {
        font-size: 1rem !important;
        margin-bottom: 0.25rem !important;
    }

    .timeline-year-badge {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.6rem !important;
        margin-bottom: 0.4rem !important;
    }

    .timeline-date {
        font-size: 0.65rem !important;
        margin-bottom: 0.4rem !important;
    }

    .timeline-description {
        font-size: 0.6rem !important;
        line-height: 1.3 !important;
    }

    /* Extra small devices - Ultra compact text */
    #hero h1, .hero-section h1 {
        font-size: 0.75rem !important;
    }

    #hero p, .hero-section p {
        font-size: 0.45rem !important;
    }

    .section-title, h2 {
        font-size: 0.65rem !important;
    }

    .section-subtitle {
        font-size: 0.4rem !important;
    }

    h3 {
        font-size: 0.55rem !important;
    }

    h4 {
        font-size: 0.5rem !important;
    }

    h5 {
        font-size: 0.45rem !important;
    }

    p {
        font-size: 0.4rem !important;
    }

    li {
        font-size: 0.35rem !important;
    }

    [style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }

    [style*="display: grid"] {
        gap: 0.5rem !important;
    }

    .btn, a.btn {
        font-size: 0.4rem !important;
        padding: 0.3rem 0.5rem !important;
    }

    .nav-logo img {
        height: 18px !important;
    }

    .nav-link, .nav-cta {
        font-size: 0.4rem !important;
        padding: 0.25rem 0.4rem !important;
    }

    /* Ultra small padding */
    [style*="padding: 6rem"] {
        padding: 1rem 0.4rem !important;
    }

    [style*="padding: 5rem"] {
        padding: 0.8rem 0.4rem !important;
    }

    [style*="padding: 4rem"] {
        padding: 0.7rem 0.4rem !important;
    }

    [style*="padding: 3rem"] {
        padding: 0.5rem 0.3rem !important;
    }

    [style*="padding: 2rem 1rem"] {
        padding: 0.4rem 0.3rem !important;
    }

    [style*="padding: 2rem"] {
        padding: 0.4rem !important;
    }

    [style*="padding: 1.5rem"] {
        padding: 0.3rem !important;
    }

    [style*="padding: 1rem"] {
        padding: 0.25rem !important;
    }

    body {
        overflow-x: hidden !important;
    }

    * {
        max-width: 100vw !important;
    }
}

/* Tablet Specific Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    [style*="grid-template-columns: repeat(3"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    [style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .section-title {
        font-size: 2.25rem !important;
    }

    #hero h1 {
        font-size: 3rem !important;
    }
}