/* =========================================
   1. RESET & BASIC TYPOGRAPHY
   ========================================= */
* { box-sizing: border-box; }

body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Inter', sans-serif; /* Clean body font */
    
    /* THE MORNING GLOW BACKGROUND */
    background: radial-gradient(circle at 50% 20%, #ffffff 0%, #d3eaf9 60%, #b8dcf5 100%);
    background-attachment: fixed; 
    background-size: cover;
    min-height: 100vh;
    
    color: #000046; /* Navy Text */
    padding-top: 80px; /* IMPORTANT: Pushes content down so it's not hidden behind fixed header */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif; /* Editorial Headings */
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; margin: 0; }

/* UTILS */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }


/* =========================================
   2. PREMIUM GLASS HEADER (Sticky)
   ========================================= */
header {
    background: rgba(255, 255, 255, 0.85); /* 85% opacity white */
    backdrop-filter: blur(12px);            /* The "Frosted Glass" Blur */
    -webkit-backdrop-filter: blur(12px);    /* Safari support */
    padding: 15px 0;
    position: fixed;                        /* Sticks to top */
    top: 0; left: 0; right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 30px rgba(0, 0, 70, 0.05); /* Soft shadow */
    transition: all 0.3s ease;
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* LOGO */
.logo { flex-shrink: 0; }
.logo img {
    height: 50px; /* Refined height */
    width: auto;
    display: block;
}

/* DESKTOP NAVIGATION */
.main-nav {
    display: flex;
    align-items: center;
    gap: 35px;
}

.main-nav a {
    color: #000046;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 8px 0;
    letter-spacing: 0.3px;
}

/* HOVER LINE ANIMATION (Center Out) */
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #000046;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateX(-50%);
    opacity: 0;
}

.main-nav a:hover { color: #6565ba; } /* Indigo on hover */

.main-nav a:hover::after {
    width: 100%;
    opacity: 1;
    background-color: #6565ba;
}

/* ACTIVE STATE */
.main-nav a.active {
    font-weight: 700;
    color: #000046;
}
.main-nav a.active::after {
    width: 100%;
    opacity: 1;
    background-color: #000046;
}

/* HIDE HAMBURGER ON DESKTOP */
.mobile-toggle { display: none; }


/* =========================================
   3. MOBILE MENU styles (< 992px)
   ========================================= */
@media (max-width: 991px) {
    
    /* HAMBURGER BUTTON */
    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        color: #000046;
        font-size: 1.5rem;
        cursor: pointer;
        padding: 5px;
        z-index: 1001;
    }

    /* DRAWER MENU */
    .main-nav {
        position: fixed;
        top: 81px; /* Starts exactly below header */
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        padding: 20px 0 40px 0;
        flex-direction: column;
        align-items: center;
        gap: 0;
        border-bottom: 1px solid rgba(0,0,70, 0.1);
        box-shadow: 0 15px 30px rgba(0,0,70, 0.1);
        
        /* HIDDEN STATE */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s ease-in-out;
    }

    /* ACTIVE STATE (OPEN) */
    .main-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* MOBILE LINKS */
    .main-nav a {
        width: 100%;
        text-align: center;
        padding: 15px 0;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(0,0,70, 0.05);
    }

    .main-nav a:hover {
        background-color: #f7f9fc;
        color: #000046;
    }
    
    /* REMOVE DESKTOP ANIMATION */
    .main-nav a::after { display: none; }
    
    /* ACTIVE LINK HIGHLIGHT */
    .main-nav a.active {
        background-color: #eef7fc;
        color: #000046;
        border-left: 4px solid #000046;
    }
}


/* =========================================
   4. BLOG CARDS & GRID SYSTEM
   ========================================= */

/* GRID CONTAINER */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

/* THE CARD ITSELF */
.blog-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,70, 0.05); /* Soft Navy Shadow */
    border: 1px solid rgba(255,255,255,0.5);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Ensures equal height in grid */
}

/* HOVER EFFECT */
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,70, 0.15);
    border-color: #d3eaf9;
}

/* IMAGE AREA */
.blog-card-image {
    height: 240px;
    width: 100%;
    overflow: hidden;
    position: relative;
    background: #f4f7fa;
    display: block;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05); /* Subtle zoom on hover */
}

/* CONTENT AREA */
.blog-card-content { 
    padding: 25px; 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
}

/* TITLE */
.blog-title { 
    font-size: 1.35rem; 
    font-weight: 700;
    margin: 0 0 12px 0; 
    line-height: 1.4;
}

.blog-title a {
    color: #000046;
    transition: color 0.2s ease;
}

.blog-title a:hover {
    color: #6565ba;
}

/* DATE */
.blog-date { 
    font-size: 0.85rem; 
    color: #888; 
    margin-bottom: 15px; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* EXCERPT */
.blog-excerpt { 
    font-size: 1rem; 
    color: #555; 
    margin-bottom: 25px; 
    flex-grow: 1; 
    line-height: 1.6;
}

/* READ MORE LINK */
.blog-read-more { 
    font-weight: 700; 
    color: #000046; 
    margin-top: auto;
    font-size: 0.95rem;
}


/* =========================================
   5. BUTTONS & UI ELEMENTS
   ========================================= */
.btn { 
    display: inline-block; 
    padding: 14px 35px; 
    border-radius: 50px; 
    text-decoration: none; 
    font-weight: 700; 
    margin: 5px; 
    transition: all 0.3s ease;
    cursor: pointer;
}

/* LIGHT BLUE BUTTON */
.btn-light { 
    background-color: #d3eaf9; 
    color: #000046; 
    border: 2px solid #d3eaf9;
}
.btn-light:hover { 
    background-color: #ffffff; 
    border-color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,70, 0.1);
}

/* OUTLINE BUTTON */
.btn-outline { 
    background-color: transparent;
    color: #ffffff; 
    border: 2px solid #ffffff;
}
.btn-outline:hover { 
    background-color: #ffffff; 
    color: #000046;
    transform: translateY(-3px);
}

/* HERO SECTION BASE */
.hero-section {
    background: linear-gradient(rgba(15, 46, 83, 0.8), rgba(15, 46, 83, 0.6)), url('../assets/images/hero_bg.png');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 0; 
    text-align: center;
}


/* =========================================
   6. FOOTER
   ========================================= */
.site-footer { 
    background: #000046; 
    color: white; 
    text-align: center; 
    padding: 60px 0; 
    margin-top: 100px; 
    border-top: 1px solid #d3eaf9;
}


/* =========================================
   7. SINGLE POST PAGE (post.php)
   ========================================= */

/* ARTICLE CONTAINER */
.article-container {
    max-width: 850px; /* Optimal reading width */
    margin: 0 auto;
    padding: 60px 20px;
}

/* POST HEADER SECTION */
.post-header {
    text-align: center;
    margin-bottom: 50px;
}

.post-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #000046;
    line-height: 1.2;
    margin-bottom: 20px;
}

.post-meta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.6);
    padding: 8px 20px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.8);
    color: #6565ba; /* Indigo accent */
    font-weight: 500;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* FEATURED IMAGE */
.featured-image-wrapper {
    margin-bottom: 60px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,70, 0.15); /* Deep shadow */
    position: relative;
}

.featured-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

/* CONTENT CARD (The "Paper" Effect) */
.post-content-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,70, 0.05);
    font-family: 'Inter', sans-serif;
    color: #212121; /* Soft black for reading */
    line-height: 1.6;
    font-size: 1rem;
    border: 1px solid rgba(0,0,0,0.03);
}

/* Typography inside the post */
.post-content-card p { margin-bottom: 30px; }

.post-content-card h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: #000046;
    margin-top: 50px;
    margin-bottom: 20px;
    font-weight: 700;
}

.post-content-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: #000046;
    margin-top: 40px;
    margin-bottom: 15px;
}

.post-content-card blockquote {
    border-left: 5px solid #d3eaf9;
    margin: 40px 0;
    padding: 20px 30px;
    background: #f8fbfd;
    color: #000046;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.4rem;
    border-radius: 0 12px 12px 0;
}

.post-content-card img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.post-content-card ul, .post-content-card ol {
    margin-bottom: 30px;
    padding-left: 20px;
}

.post-content-card li {
    margin-bottom: 10px;
}

/* BOTTOM NAVIGATION BAR */
.post-footer-nav {
    background: #000046;
    margin-top: 60px;
    padding: 30px 40px;
    border-radius: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    box-shadow: 0 15px 40px rgba(0,0,70, 0.2);
    position: relative;
    overflow: hidden;
}

/* Background Glow for Post Footer */
.post-footer-nav::before {
    content: '';
    position: absolute;
    top: -50%; left: -10%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(101,101,186,0.4) 0%, transparent 70%);
    pointer-events: none;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.nav-btn:hover {
    color: #d3eaf9;
    transform: translateX(-5px);
}

.share-text {
    color: #d3eaf9;
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.1rem;
    position: relative;
    z-index: 2;
}

/* ANIMATION UTILS */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

/* RESPONSIVE POST */
@media (max-width: 768px) {
    .post-title { font-size: 2rem; }
    .post-content-card { padding: 30px 20px; font-size: 1rem; }
    .post-footer-nav { flex-direction: column; gap: 20px; text-align: center; }
    .nav-btn:hover { transform: translateY(-3px); }
}