/* Gateway Page styles */
.gateway-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    opacity: 1;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-x: hidden;
    overflow-y: auto;
    font-family: 'Outfit', sans-serif;
}

.gateway-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Skip link */
.gateway-skip {
    position: absolute;
    top: 30px;
    right: 30px;
    z-index: 10001;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 24px;
    border-radius: 50px;
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gateway-skip:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* Main Grid */
.gateway-grid {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 20px;
}

/* Top Card (Thailand) - Extended to matching red line (~70%) */
.gateway-main {
    height: 70vh;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Bottom Cards (Row of 4) - Very compact below Thailand */
.gateway-bottom {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* Card Styling */
.gateway-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #111;
}

.gateway-card:hover {
    border-color: rgba(203, 155, 81, 0.5);
    box-shadow: 0 0 40px rgba(203, 155, 81, 0.2);
    transform: translateY(-5px);
}

.gateway-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.gateway-card:hover img {
    transform: scale(1.1);
}

.gateway-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%);
    z-index: 1;
    transition: opacity 0.5s ease;
}

.gateway-card:hover::after {
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.2) 100%);
}

.gateway-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 2;
    transition: transform 0.5s ease;
}

.gateway-main .gateway-card-content {
    padding: 60px;
}

.gateway-bottom .gateway-card-content {
    padding: 15px 20px;
}

.gateway-card-title {
    color: #fff;
    margin: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gateway-main .gateway-card-title {
    font-size: clamp(32px, 5vw, 64px);
    margin-bottom: 10px;
}

.gateway-bottom .gateway-card-title {
    font-size: 13px;
    margin-bottom: 2px;
    letter-spacing: 1px;
}

.gateway-card-cta {
    display: inline-block;
    color: #cb9b51;
    font-weight: 600;
    font-size: 14px;
    margin-top: 15px;
    opacity: 0.8;
    transform: translateY(10px);
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.gateway-bottom .gateway-card-cta {
    font-size: 10px;
    margin-top: 4px;
}

.gateway-card:hover .gateway-card-cta {
    opacity: 1;
    transform: translateY(0);
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.gateway-main { opacity: 0; animation: fadeInUp 0.8s ease forwards 0.2s; }
.gateway-bottom .gateway-card:nth-child(1) { opacity: 0; animation: fadeInUp 0.8s ease forwards 0.4s; }
.gateway-bottom .gateway-card:nth-child(2) { opacity: 0; animation: fadeInUp 0.8s ease forwards 0.5s; }
.gateway-bottom .gateway-card:nth-child(3) { opacity: 0; animation: fadeInUp 0.8s ease forwards 0.6s; }
.gateway-bottom .gateway-card:nth-child(4) { opacity: 0; animation: fadeInUp 0.8s ease forwards 0.7s; }

/* Responsive adjustments */
@media (max-width: 992px) {
    .gateway-main {
        height: 45vh;
    }
    .gateway-bottom {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        flex: none;
    }
    .gateway-bottom .gateway-card {
        height: 20vh;
    }
}

@media (max-width: 600px) {
    .gateway-overlay {
        padding: 10px;
        gap: 10px;
    }
    .gateway-skip {
        top: 15px;
        right: 15px;
        font-size: 11px;
        padding: 8px 15px;
    }
    .gateway-main {
        height: 40vh;
        margin-top: 40px; /* Space for skip button */
    }
    .gateway-main .gateway-card-content {
        padding: 24px;
    }
    .gateway-bottom {
        grid-template-columns: repeat(2, 1fr); /* 2x2 grid for mobile to keep it compact */
        gap: 10px;
    }
    .gateway-bottom .gateway-card {
        height: 18vh;
        min-height: 140px;
    }
    .gateway-bottom .gateway-card-content {
        padding: 12px;
    }
    .gateway-bottom .gateway-card-title {
        font-size: 11px;
    }
}
