/*
 Theme Name: Astra Child
 Theme URI: https://example.com/
 Description: Child theme for Astra
 Author: Your Name
 Author URI: https://example.com/
 Template: astra
 Version: 1.0.0
*/

/* General Layout & Astra Fixes */
#page {
    background-color: #f5f7fa;
}
/* =========================================================
   GLOBAL RESET & FULL-WIDTH FIX (ASTRA OVERRIDES)
========================================================= */

.ast-container,
.ast-row,
.ast-article-single,
.ast-archive-description {
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

.site-content {
    padding: 0 !important;
}

/* =========================================================
   BANNERS (CATEGORY + COUNTRY)
========================================================= */

.category-banner,
.country-banner {
    position: relative;
    width: 100%;
    height: 420px;
    overflow: hidden;
    margin-bottom: 60px;
}

.category-banner img,
.country-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Banner Overlay Gradient */
.category-banner::after,
.country-banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.6),
        rgba(0,0,0,0.2),
        transparent
    );
}

/* Banner Text */
.category-banner h1,
.country-banner h1 {
    position: absolute;
    bottom: 50%;
    left: 50%;
    color: #fff;
    font-size: 3rem;
    margin: 0;
    z-index: 2;
    transform: translate(-50%, 50%);
}

.category-banner p,
.country-banner p {
    position: absolute;
    bottom: 30%;
    left: 50%;
    color: #fff;
    font-size: 1.2rem;
    max-width: 600px;
    z-index: 2;
    margin-bottom: 10px;
    transform: translate(-50%, 0%);
    text-align: center;
}

/* =========================================================
   COUNTRIES GRID (CATEGORY PAGE)
========================================================= */

.countries-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 280px);
    gap: 30px;
    justify-content: center;
    width: 100%;
    margin: 0 auto 70px;
}

.country-card {
    width: 280px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.country-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.18);
}

.country-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.country-card h2 {
    font-size: 1.4rem;
    margin: 16px;
}

.country-card p {
    font-size: 0.95rem;
    color: #555;
    margin: 0 16px 16px;
}

.country-card a {
    display: inline-block;
    margin: 0 16px 18px;
    padding: 8px 16px;
    background: #6C63FF;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
}

.country-card a:hover {
    background: #554be0;
}

/* =========================================================
   IMAGE GRID (COUNTRY PAGE)
========================================================= */

.image-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 320px);
    gap: 25px;
    justify-content: center;
    width: 100%;
    margin: 0 auto 70px;
}

.image-card {
    width: 320px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.image-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.image-card:hover img {
    transform: scale(1.06);
}

/* =========================================================
   LIGHTBOX STYLING
========================================================= */

#custom-lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

#custom-lightbox .lb-inner {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    background: #fff;
}

#custom-lightbox img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    background: #ffffff !important;
}

#custom-lightbox p {
    background: #ffffff;
    color: #000;
    margin-top: 12px;
    font-size: 1rem;
}

/* Close Button */
#custom-lightbox .lb-close {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 38px;
    height: 38px;
    background: #fff;
    color: #333;
    font-size: 1.8rem;
    border-radius: 50%;
    cursor: pointer;
    line-height: 38px;
    box-shadow: 0 5px 14px rgba(0,0,0,0.35);
}

/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
========================================================= */

/* Tablet */
@media (max-width: 1024px) {
    .countries-grid {
        grid-template-columns: repeat(2, 260px);
    }

    .image-grid {
        grid-template-columns: repeat(2, 240px);
    }

    .category-banner h1,
    .country-banner h1 {
        font-size: 2.4rem;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .countries-grid,
    .image-grid {
        grid-template-columns: 1fr;
    }

    .country-card,
    .image-card {
        width: 90%;
        margin: 0 auto;
    }

    .category-banner,
    .country-banner {
        height: 300px;
    }

    .category-banner h1,
    .country-banner h1 {
        font-size: 1.8rem;
        left: 25px;
        bottom: 50px;
    }

    .category-banner p,
    .country-banner p {
        font-size: 1rem;
        left: 25px;
        bottom: 20px;
    }
}

