/* Regions Hero Section */
.regions-hero {
    position: relative;
    height: 60vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 50%, #1b4332 100%);
    overflow: hidden;
}

.regions-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M10 10L90 10L90 90L10 90Z" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
}

.regions-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(212, 165, 116, 0.2), transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(200, 150, 95, 0.2), transparent 50%);
}

.regions-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
}

.regions-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: fadeInUp 1s ease;
}

.regions-hero-content p {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

/* Regions Content Section */
.regions-content {
    padding: 6rem 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, white 100%);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: 2.8rem;
    font-weight: 700;
    color: #1b4332;
    margin-bottom: 1.5rem;
}

.section-header p {
    font-size: 1.2rem;
    color: #666;
    line-height: 1.8;
}

/* Region Card */
.region-card {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 4rem;
    padding: 3rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.8s ease backwards;
}

.region-card:nth-child(2) { animation-delay: 0.1s; }
.region-card:nth-child(3) { animation-delay: 0.2s; }
.region-card:nth-child(4) { animation-delay: 0.3s; }
.region-card:nth-child(5) { animation-delay: 0.4s; }
.region-card:nth-child(6) { animation-delay: 0.5s; }
.region-card:nth-child(7) { animation-delay: 0.6s; }
.region-card:nth-child(8) { animation-delay: 0.7s; }

.region-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

.region-card.reverse {
    grid-template-columns: 1.5fr 1fr;
}

.region-card.reverse .region-image {
    order: 2;
}

.region-card.reverse .region-content {
    order: 1;
}

/* Region Image */
.region-image {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: linear-gradient(135deg, #d4a574 0%, #c8965f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.region-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg width="50" height="50" xmlns="http://www.w3.org/2000/svg"><circle cx="25" cy="25" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 50px 50px;
}

.region-flag {
    font-size: 8rem;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

/* Region Content */
.region-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1b4332;
    margin-bottom: 1.5rem;
}

.region-locations {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.location-tag {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: linear-gradient(135deg, #d4a574 0%, #c8965f 100%);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.location-tag:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(212, 165, 116, 0.4);
}

.region-content p {
    font-size: 1rem;
    line-height: 1.9;
    color: #555;
    text-align: justify;
}

/* Regions CTA Section */
.regions-cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 100%);
    position: relative;
    overflow: hidden;
}

.regions-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 60px 60px;
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.cta-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.cta-btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, #d4a574 0%, #c8965f 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 10px 30px rgba(212, 165, 116, 0.3);
}

.cta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(212, 165, 116, 0.4);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   Responsive Design - Mobile First Approach
   ============================ */

/* Tablet & Small Desktop (992px and below) */
@media (max-width: 992px) {
    /* Container adjustments */
    .container {
        padding: 0 30px;
    }

    /* Regions Hero */
    .regions-hero {
        height: 65vh;
        min-height: 450px;
    }

    .regions-hero-content h1 {
        font-size: 2.8rem;
        line-height: 1.2;
    }

    .regions-hero-content p {
        font-size: 1.2rem;
    }

    /* Section Header */
    .section-header h2 {
        font-size: 2.5rem;
    }

    /* Region Cards */
    .region-card,
    .region-card.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .region-card.reverse .region-image,
    .region-card.reverse .region-content {
        order: initial;
    }

    .region-image {
        min-height: 250px;
    }

    .region-flag {
        font-size: 6rem;
    }
}

/* Tablet & Mobile (768px and below) */
@media (max-width: 768px) {
    /* Base adjustments */
    .container {
        padding: 0 20px;
    }

    /* Typography */
    .section-header h2 {
        font-size: 2.2rem;
    }

    .section-header p {
        font-size: 1rem;
        line-height: 1.7;
    }

    /* Regions Hero */
    .regions-hero {
        height: 60vh;
        min-height: 400px;
        padding: 100px 0 60px;
    }

    .regions-hero-content {
        padding: 0 20px;
    }

    .regions-hero-content h1 {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }

    .regions-hero-content p {
        font-size: 1.05rem;
        line-height: 1.7;
    }

    /* Regions Content */
    .regions-content {
        padding: 50px 0;
    }

    /* Section Header */
    .section-header {
        margin-bottom: 3rem;
    }

    /* Region Cards */
    .region-card {
        padding: 2rem;
        margin-bottom: 3rem;
    }

    /* Region Image */
    .region-image {
        min-height: 200px;
    }

    .region-flag {
        font-size: 5rem;
    }

    /* Region Content */
    .region-content h3 {
        font-size: 1.6rem;
        margin-bottom: 1.2rem;
    }

    .region-locations {
        gap: 0.6rem;
        margin-bottom: 1.2rem;
    }

    .location-tag {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }

    .region-content p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    /* CTA Section */
    .regions-cta {
        padding: 4rem 0;
    }

    .cta-content h2 {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .cta-content p {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .cta-btn {
        padding: 14px 32px;
        font-size: 1rem;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 15px;
    }

    /* Typography */
    .section-header h2 {
        font-size: 1.8rem;
        margin-bottom: 12px;
    }

    .section-header p {
        font-size: 0.95rem;
    }

    /* Regions Hero */
    .regions-hero {
        height: 55vh;
        min-height: 350px;
        padding: 80px 0 50px;
    }

    .regions-hero-content {
        padding: 0 15px;
    }

    .regions-hero-content h1 {
        font-size: 1.75rem;
        margin-bottom: 15px;
        line-height: 1.3;
    }

    .regions-hero-content p {
        font-size: 0.95rem;
        margin-bottom: 25px;
        line-height: 1.6;
    }

    /* Regions Content */
    .regions-content {
        padding: 40px 0;
    }

    /* Section Header */
    .section-header {
        margin-bottom: 2.5rem;
    }

    /* Region Cards */
    .region-card {
        padding: 1.5rem;
        margin-bottom: 2.5rem;
        border-radius: 15px;
    }

    /* Region Image */
    .region-image {
        min-height: 180px;
        border-radius: 12px;
    }

    .region-flag {
        font-size: 4rem;
    }

    /* Region Content */
    .region-content h3 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .region-locations {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .location-tag {
        font-size: 0.8rem;
        padding: 0.35rem 0.9rem;
        border-radius: 20px;
    }

    .region-content p {
        font-size: 0.9rem;
        line-height: 1.6;
        text-align: left;
    }

    /* CTA Section */
    .regions-cta {
        padding: 3.5rem 0;
    }

    .cta-content {
        padding: 0 15px;
    }

    .cta-content h2 {
        font-size: 1.6rem;
        margin-bottom: 15px;
        line-height: 1.3;
    }

    .cta-content p {
        font-size: 0.9rem;
        margin-bottom: 25px;
        line-height: 1.6;
    }

    .cta-btn {
        padding: 12px 28px;
        font-size: 0.95rem;
        width: 100%;
        max-width: 300px;
    }
}

/* Extra Small Mobile (360px and below) */
@media (max-width: 360px) {
    .regions-hero-content h1 {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .region-content h3 {
        font-size: 1.2rem;
    }

    .region-flag {
        font-size: 3.5rem;
    }

    .location-tag {
        font-size: 0.75rem;
        padding: 0.3rem 0.8rem;
    }

    .cta-content h2 {
        font-size: 1.4rem;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .regions-hero {
        height: 100vh;
        min-height: 100vh;
    }

    .regions-hero-content h1 {
        font-size: 2rem;
    }

    .region-card {
        margin-bottom: 2rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch target sizes */
    .region-card,
    .location-tag,
    .cta-btn {
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .region-card:hover {
        transform: none;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    }

    .location-tag:hover {
        transform: none;
        box-shadow: none;
    }

    .cta-btn:hover {
        transform: none;
        box-shadow: 0 10px 30px rgba(212, 165, 116, 0.3);
    }

    /* Add tap feedback */
    .region-card:active {
        transform: scale(0.98);
    }

    .location-tag:active {
        transform: scale(0.95);
    }

    .cta-btn:active {
        transform: scale(0.97);
    }

    /* Faster transitions */
    * {
        transition-duration: 0.2s;
    }
}

/* Performance Optimizations */
@media (max-width: 768px) {
    /* Disable fixed backgrounds on mobile */
    .regions-hero,
    .regions-cta {
        background-attachment: scroll;
    }

    /* Optimize animations */
    .region-card,
    .location-tag,
    .cta-btn {
        will-change: transform;
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    /* Better font rendering */
    body {
        text-rendering: optimizeSpeed;
        -webkit-font-smoothing: antialiased;
    }

    /* Prevent text size adjustment */
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }

    /* Remove tap highlight */
    * {
        -webkit-tap-highlight-color: transparent;
    }

    /* Smooth scrolling */
    .regions-content {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
}

/* Reduce motion if preferred */
@media (prefers-reduced-motion: reduce) {
    .region-card,
    .location-tag,
    .cta-btn {
        transition: none;
        animation: none;
    }

    @keyframes fadeInUp {
        from, to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Safe Area Support for Notched Devices */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .container {
            padding-left: max(20px, env(safe-area-inset-left));
            padding-right: max(20px, env(safe-area-inset-right));
        }
    }

    @media (max-width: 480px) {
        .container {
            padding-left: max(15px, env(safe-area-inset-left));
            padding-right: max(15px, env(safe-area-inset-right));
        }
    }
}

/* Mobile-Specific Enhancements */
@media (max-width: 768px) {
    /* Optimize region cards spacing */
    .region-card:first-of-type {
        margin-top: 0;
    }

    .region-card:last-of-type {
        margin-bottom: 0;
    }

    /* Better flag rendering */
    .region-flag {
        filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.15));
    }

    /* Optimize location tags wrapping */
    .region-locations {
        justify-content: flex-start;
    }

    /* Improve readability */
    .region-content p {
        hyphens: auto;
        -webkit-hyphens: auto;
        word-break: break-word;
    }
}
