/*
Theme Name: Bharat Soil Journey
Theme URI: https://thebharatsoiljourney.com
Author: Bharat Soil Journey Team
Description: A high-end, eco-luxury editorial theme for exploring India.
Version: 1.3
Text Domain: bsj
*/

/* ==========================================================================
   CSS VARIABLES (Quiet Luxury Palette)
   ========================================================================== */
:root {
    --deep-green: #0a1712;
    --forest: #17352A;
    --terracotta: #A85D38;
    --muted-gold: #B89A5A;
    --sand: #e6dfd5;
    --ivory: #F4F1EC;
    --white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

/* ==========================================================================
   RESET & TYPOGRAPHY
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: #333;
    background-color: var(--ivory);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    color: var(--forest);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    padding: 2.5rem 5%;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-link {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--ivory);
    line-height: 1.1;
    letter-spacing: 1px;
    font-weight: 600;
}

.brand-link:hover {
    color: var(--muted-gold);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 3rem;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    font-family: var(--font-body);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--ivory);
    opacity: 0.8;
}

.main-navigation a:hover,
.main-navigation li.current-menu-item a {
    color: var(--muted-gold);
    opacity: 1;
}

/* ==========================================================================
   LAYOUT UTILITIES
   ========================================================================== */
.section {
    padding: 6rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--terracotta);
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    border-radius: 50px;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.3s ease;
}

.btn:hover {
    background: var(--muted-gold);
    transform: translateY(-2px);
}

/* ==========================================================================
   EXPERIENCES GRID (6 Pillars)
   ========================================================================== */
.experiences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.experience-card {
    position: relative;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem;
    color: var(--white);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: transform 0.4s ease;
}

.experience-card:hover {
    transform: translateY(-10px);
}

.experience-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.8s ease;
}

.experience-card:hover .experience-img {
    transform: scale(1.05);
}

.experience-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(10, 23, 18, 0.9) 0%, rgba(10, 23, 18, 0.2) 60%, transparent 100%);
    z-index: 2;
}

.experience-content {
    position: relative;
    z-index: 3;
}

.experience-subtitle {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--sand);
    margin-bottom: 0.5rem;
}

.experience-title {
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.experience-desc {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
    opacity: 0;
    max-height: 0;
    transition: all 0.4s ease;
    transform: translateY(15px);
}

.experience-card:hover .experience-desc {
    opacity: 1;
    max-height: 100px;
    transform: translateY(0);
}

/* ==========================================================================
   JOURNAL GRID CARDS
   ========================================================================== */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-image-wrap {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.card:hover .card-image-wrap img {
    transform: scale(1.05);
}

.category-tag {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: var(--white);
    color: var(--forest);
    padding: 0.4rem 1rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 50px;
    z-index: 2;
    font-weight: 700;
}

.card-content {
    padding: 2.5rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card-excerpt {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 1.5rem;
}

.btn-read {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--terracotta);
    font-weight: 700;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.card:hover .btn-read {
    border-color: var(--terracotta);
}

/* ==========================================================================
   LEAFLET MAP INTEGRATION & REGION GRID STYLES
   ========================================================================== */
.trace-section-wrap { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 4rem; 
    max-width: 1300px; 
    margin: 0 auto; 
    align-items: center; 
    justify-content: center; 
}

#bsj-map { 
    flex: 1; 
    min-width: 320px; 
    max-width: 600px; 
    height: 600px; 
    border-radius: 12px; 
    box-shadow: 0px 15px 35px rgba(0,0,0,0.5); 
    z-index: 1;
    background-color: #050e0a; 
}

.custom-leaflet-pin { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    transition: opacity 0.4s ease; 
}

.pin-dot { 
    width: 12px; 
    height: 12px; 
    background: var(--muted-gold, #B89A5A); 
    border-radius: 50%; 
    box-shadow: 0 0 0 rgba(184, 154, 90, 0.6); 
    animation: pulse-pin 2s infinite; 
    transition: all 0.3s ease; 
    pointer-events: auto; 
    cursor: pointer; 
}

.custom-leaflet-pin:hover .pin-dot { 
    background: var(--terracotta, #A85D38); 
    animation: none; 
    transform: scale(1.6); 
}

@keyframes pulse-pin { 
    0% { box-shadow: 0 0 0 0 rgba(184, 154, 90, 0.6); } 
    70% { box-shadow: 0 0 0 12px rgba(184, 154, 90, 0); } 
    100% { box-shadow: 0 0 0 0 rgba(184, 154, 90, 0); } 
}

.pin-highlighted .pin-dot { 
    background: var(--terracotta, #A85D38) !important; 
    transform: scale(1.8); 
    box-shadow: 0 0 20px 5px rgba(168, 93, 56, 0.6); 
    animation: none; 
}

.pin-dimmed { 
    opacity: 0.15 !important; 
    pointer-events: none; 
}

.leaflet-tooltip.luxury-tooltip { 
    background: #fff; 
    border: none; 
    padding: 8px; 
    border-radius: 8px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.3); 
    width: 220px; 
    white-space: normal; 
}

.leaflet-tooltip.luxury-tooltip::before { 
    border-top-color: #fff; 
}

.tooltip-img-wrapper { 
    width: 100%; 
    height: 130px; 
    border-radius: 4px; 
    overflow: hidden; 
    margin-bottom: 8px; 
    background: #eee; 
}

.tooltip-img-wrapper img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.tooltip-content { 
    text-align: center; 
    padding-bottom: 4px; 
}

.tooltip-subtitle { 
    display: block; 
    font-family: var(--font-body, sans-serif); 
    font-size: 0.65rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    color: var(--terracotta, #A85D38); 
    margin-bottom: 4px; 
}

.tooltip-title { 
    font-family: var(--font-heading, serif); 
    font-size: 1.2rem; 
    color: var(--forest, #17352A); 
    margin: 0; 
    line-height: 1.2; 
}

.region-grid-right { 
    flex: 1; 
    min-width: 320px; 
    display: flex; 
    flex-direction: column; 
    gap: 1.5rem; 
}

.abstract-map-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr 1fr; 
    gap: 10px; 
}

.map-region { 
    background: rgba(255,255,255,0.06); 
    border: 1px solid var(--sand); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    color: var(--ivory); 
    padding: 1.2rem; 
    text-align: center; 
}

.map-region:hover, .map-region.active { 
    background: var(--terracotta) !important; 
    border-color: var(--terracotta) !important; 
    transform: scale(1.03); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.3); 
}

.region-info-panel { 
    background: var(--forest); 
    padding: 2.5rem; 
    border-left: 3px solid var(--terracotta); 
    border-radius: 4px; 
}

.leaflet-control-attribution { 
    display: none !important; 
}

/* ==========================================================================
   MOBILE & TABLET RESPONSIVENESS
   ========================================================================== */

/* TABLET LAYOUT (992px and below) */
@media (max-width: 992px) {
    /* Adjust Hero Image Collage */
    .collage-bg {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: repeat(4, 1fr) !important;
    }
    
    /* Scale down hero container padding */
    .hero-content {
        padding: 3rem 2rem !important;
    }

    /* Stack Map and Region Grid */
    .trace-section-wrap {
        flex-direction: column;
        gap: 2rem;
    }
    #bsj-map, .region-grid-right {
        width: 100%;
        max-width: 100%;
    }
    #bsj-map {
        height: 500px;
    }

    /* Adjust overall section padding */
    .section {
        padding: 4rem 5% !important;
    }
}

/* MOBILE PHONE LAYOUT (768px and below) */
@media (max-width: 768px) {
    /* Activate Mobile Hamburger Menu */
    .header-container {
        flex-wrap: wrap;
    }
    .site-branding {
        z-index: 9999;
    }
    #menu-toggle {
        display: block !important;
        color: var(--ivory) !important;
        z-index: 9999;
        font-size: 0.9rem !important;
    }
    
    /* Hide standard menu, convert to mobile dropdown */
    .main-navigation ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: rgba(10, 23, 18, 0.98);
        backdrop-filter: blur(15px);
        position: absolute;
        top: 0;
        left: 0;
        padding: 6rem 2rem 2rem;
        text-align: center;
        gap: 2rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    }
    
    /* Display menu when toggle is clicked (via Javascript) */
    .main-navigation ul.active {
        display: flex;
    }

    /* Make navigation links larger for touch targets */
    .main-navigation a {
        font-size: 1.1rem;
    }

    /* Adjust Typography for Mobile */
    .hero-content h1 {
        font-size: 2.2rem !important;
    }
    .hero-content h2 {
        font-size: 0.8rem !important;
        letter-spacing: 2px !important;
    }
    
    /* Adjust Intro Typography */
    .section h2 {
        font-size: 2.2rem !important;
    }
    .section h3 {
        font-size: 1.5rem !important;
    }

    /* Shrink Cards */
    .experience-card {
        height: 350px;
        padding: 1.5rem;
    }
    .experience-title {
        font-size: 1.5rem;
    }

    /* Adjust Map for Touch */
    #bsj-map {
        height: 400px;
    }
    .leaflet-tooltip.luxury-tooltip {
        width: 180px; 
    }
}