/*
 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)
========================================================= */
body.non-elementor-fullwidth .site-content .ast-container,
body.non-elementor-fullwidth .site-content .ast-row,
body.non-elementor-fullwidth .site-content .ast-article-single,
body.non-elementor-fullwidth .site-content .ast-archive-description {
    max-width: 100% !important;
    width: 100% !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.non-elementor-fullwidth .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
    );
	z-index: 1;
}

.country-banner-content,
.category-banner-content {
    position: absolute;
    inset: 0;
    z-index: 2;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    padding: 0 20px;
    text-align: center;
    color: #fff;
}

/* Banner Text */
.country-banner-content h1,
.category-banner-content h1 {
    font-size: 3rem;
    margin: 0 0 12px;
    line-height: 1.2;
	color: #fff;
}

.country-banner-content p,
.category-banner-content p {
    font-size: 1.2rem;
    max-width: 640px;
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .country-banner,
    .category-banner {
        height: 320px;
    }

    .country-banner-content h1,
    .category-banner-content h1 {
        font-size: 2rem;
    }

    .country-banner-content p,
    .category-banner-content p {
        font-size: 1rem;
    }
}


/* =========================================================
   COUNTRIES GRID (CATEGORY PAGE)
========================================================= */

.countries-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0px auto 70px;
    padding: 0 20px;
    box-sizing: border-box;
}


.country-card {
    position: relative;
    width: 100%;          /* IMPORTANT */
    aspect-ratio: 3 / 4;        /* slightly reduced for balance */
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    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: 100%;
    object-fit: cover;
    display: block;
}

.country-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.75),
        rgba(0,0,0,0.35),
        rgba(0,0,0,0)
    );
    color: #fff;
    box-sizing: border-box;
}

.country-overlay h2 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0 0 8px;
    color: #fff;
}

.country-overlay p {
    font-size: 0.95rem;
    line-height: 1.4;
    margin: 0;
    color: rgba(255,255,255,0.9);
}

@media (max-width: 1024px) {

    .countries-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
        padding: 0 16px;
    }

   

    .country-overlay {
        padding: 16px;
    }

    .country-overlay h2 {
        font-size: 1.1rem;
    }

    .country-overlay p {
        font-size: 0.9rem;
    }
}

@media (max-width: 640px) {

    .countries-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        margin: 40px auto 50px;
        padding: 0 12px;
    }

 

    .country-overlay {
        padding: 12px;
    }

    .country-overlay h2 {
        font-size: 0.95rem;
        margin-bottom: 4px;
    }

    .country-overlay p {
        font-size: 0.8rem;
        line-height: 1.3;
    }
}





/* =========================================================
   IMAGE GRID (COUNTRY PAGE)
========================================================= */

.image-grid {
    display: grid !important;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 70px;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Card */
.image-card {
    position: relative;     /* REQUIRED for overlay */
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #000;
}

/* Image */
.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Title Overlay */
.image-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 14px;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.75),
        rgba(0,0,0,0.35),
        rgba(0,0,0,0)
    );
    pointer-events: none;   /* keeps <a> clickable */
}

/* Title */
.image-overlay h2 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.2;
}

/* Optional hover animation */
.image-card:hover img {
    transform: scale(1.04);
}

.image-card img {
    transition: transform 0.35s ease;
}

@media (max-width: 1024px) {

    .image-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
        padding: 0 16px;
    }

    

    .image-overlay {
        padding: 12px;
    }

    .image-overlay h3 {
        font-size: 0.85rem;
    }
}

@media (max-width: 640px) {

    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        margin: 0 auto 50px;
        padding: 0 12px;
    }

   

    .image-overlay {
        padding: 10px;
    }

    .image-overlay h3 {
        font-size: 0.75rem;
        line-height: 1.2;
    }
}





/* =========================================================
   LIGHTBOX – FINAL WORKING VERSION (SCROLL FIXED)
========================================================= */

#custom-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Scroll happens HERE */
#custom-lightbox .lb-inner {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: #ffffff;
    color: #111;
    border-radius: 14px;
    overflow-y: auto; /* ✅ THIS IS THE KEY */
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

/* Image */
#custom-lightbox img {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    display: block;
    background: #f4f4f4;
}

/* Text content (optional) */
#custom-lightbox p {
    background: #ffffff;
    color: #111;
    padding: 24px;
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
}

.lb-header {
    position: sticky;
    top: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 24px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.lb-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #000;
    margin: 0;
    line-height: 1.3;
}


/* Close button */
.lb-close {
    width: 34px;
    height: 34px;
    background: #e5e5e5;
    color: #000;
    border-radius: 50%;
    text-align: center;
    line-height: 34px;
    font-size: 1.4rem;
    cursor: pointer;
    flex-shrink: 0;
}

#custom-lightbox .lb-close:hover {
    background: #d6d6d6;
    transform: scale(1.05);
}

#custom-lightbox .lb-inner::-webkit-scrollbar {
    width: 8px;
}

#custom-lightbox .lb-inner::-webkit-scrollbar-track {
    background: transparent;
}

#custom-lightbox .lb-inner::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.25);
    border-radius: 10px;
}

#custom-lightbox .lb-inner::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.4);
}

#custom-lightbox .lb-inner {
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.3) transparent;
}


/* Mobile */
@media (max-width: 600px) {
    #custom-lightbox img {
        max-height: 45vh;
    }
}



/* =========================================================
   ANIMATIONS
========================================================= */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
========================================================= */

@media (max-width: 1024px) {
    .category-banner,
    .country-banner {
        height: 360px;
        margin-bottom: 50px;
    }

    .category-banner h1,
    .country-banner h1 {
        font-size: 2.4rem;
        bottom: 52%;
    }

    .category-banner p,
    .country-banner p {
        font-size: 1.05rem;
        max-width: 520px;
        bottom: 26%;
    }
}


@media (max-width: 768px) {
    .category-banner,
    .country-banner {
        height: 300px;
        margin-bottom: 40px;
    }

    .category-banner h1,
    .country-banner h1 {
        font-size: 2rem;
        bottom: 55%;
    }

    .category-banner p,
    .country-banner p {
        font-size: 1rem;
        max-width: 90%;
        bottom: 24%;
    }
}


@media (max-width: 480px) {
    .category-banner,
    .country-banner {
        height: 240px;
        margin-bottom: 30px;
    }

    .category-banner h1,
    .country-banner h1 {
        font-size: 1.8rem;
        bottom: 58%;
        text-align: center;
        width: 90%;
    }

    .category-banner p,
    .country-banner p {
        font-size: 1.2rem;
        max-width: 90%;
        bottom: 36%;
        line-height: 1.4;
    }
}


/* ==============================
   COUNTRY BLOGS
============================== */

.country-blogs {
    padding: 60px 40px;
    background: #FFF8ED;
}

.country-blogs .section-title {
    font-size: 50px;
    margin-bottom: 30px;
    text-align: center;
}

/* Grid */
.country-blogs .blogs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
	width: 100%;
    max-width: 1200px;
    margin: 0 auto 70px;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Card */
.country-blogs .blog-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.country-blogs .blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Thumbnail */
.country-blogs .blog-thumb img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

/* Content */
.country-blogs .blog-content {
    padding: 20px;
}

.country-blogs .blog-content h3 {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.country-blogs .blog-content p {
    font-size: 15px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Read More */
.country-blogs .read-more {
    font-weight: 600;
    color: #6a4df4;
    text-decoration: none;
}

.country-blogs .read-more:hover {
    text-decoration: underline;
}

/* ==============================
   TABLET (≤1024px)
============================== */
@media (max-width: 1024px) {

    .country-blogs {
        padding: 50px 24px;
    }

    .country-blogs .blogs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
        margin: 0 auto 50px;
        padding: 0 16px;
    }

    .country-blogs .section-title {
        font-size: 38px;
    }
}

/* ==============================
   MOBILE (≤768px)
============================== */
@media (max-width: 768px) {

    .country-blogs {
        padding: 40px 16px;
    }

    .country-blogs .section-title {
        font-size: 26px;
    }

    .country-blogs .blogs-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .country-blogs .blog-thumb img {
        height: 200px;
    }
}

