/* === GOOGLE FONTS === */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

/* === CSS VARIABLES === */
:root {
    --bg-color: #EAE7E0;
    --card-bg-color: #FFFFFF;
    /* White for inner cards */
    --light-bg-inner: #F7F6F2;
    --border-color: #dcdad1;
    --primary-dark: #3A4A5D;
    --secondary-muted: #8A9A95;
    --text-dark: #2C2C2C;
    --text-light: #FFFFFF;
    --header-height: 4.5rem;
}

/* === BASE STYLES === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === REUSABLE CLASSES === */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Default section styling (NO card look by default) */
.section {
    padding: 5rem 0 2rem;
    /* Original padding */
    margin: 0 auto;
    /* No vertical margin by default */
}

/* Modifier class for sections that SHOULD have the card style */
.section--card {
    background-color: var(--card-bg-color);
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(58, 74, 93, 0.07);
    border: 1px solid var(--border-color);
    padding: 4rem 3rem;
    /* Padding for card sections */
    margin: 2.5rem auto;
    /* Vertical margin for card sections */
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-dark);
}

.btn {
    display: inline-block;
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background-color: #2a3644;
}

.btn-light {
    background-color: var(--bg-color);
    color: var(--primary-dark);
    font-weight: 600;
}

.btn-light:hover {
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

/* === HEADER / NAVIGATION (MENU) === */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--bg-color);
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo img {
    height: 78px;
    /* Consistent Logo Height */
    width: auto;
}

.nav-list {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-muted);
}

/* Default state for toggles */
.nav-toggle {
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    /* Hidden on desktop */
}

.nav-close {
    display: none;
    /* Hidden by default everywhere */
}

/* === FOOTER === */
.footer {
    background-color: var(--primary-dark);
    color: var(--text-light);
    padding-top: 4rem;
    margin-top: 3rem;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2.5rem;
}

.footer-logo {
    font-weight: 700;
    font-size: 1.5rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link:hover {
    color: var(--secondary-muted);
    text-decoration: underline;
}

.footer-description,
.footer-contact-item span {
    color: #ccc;
    font-size: 0.95rem;
    line-height: 1.5;
}

.footer-contact-item {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.footer-contact-item i {
    margin-top: 0.2rem;
    width: 16px;
    text-align: center;
}

.footer-copy {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid #4a5a6d;
    font-size: 0.9rem;
}

/* === COMMON MODAL STYLES (Used on Home & Blog Page) === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 200;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background-color: var(--card-bg-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 550px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.8rem;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
}

/* === COMMON BLOG CARD STYLES (Used on Home & Blog Page) === */
.blog-grid {
    display: grid;
    /* Enables grid layout */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    /* Creates columns */
    gap: 2rem;
    /* Space between cards */
}

.blog-card {
    background-color: var(--card-bg-color);
    /* WHITE background for card */
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(58, 74, 93, 0.07);
    border: 1px solid var(--border-color);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(58, 74, 93, 0.12);
}

.blog-card-link {
    /* Used on Home Page */
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card .media-container,
/* Used on Blog Page */
.blog-card .blog-image

/* Used on Home Page */
    {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: var(--light-bg-inner);
    border-bottom: 1px solid var(--border-color);
}

.blog-card .media-container img,
.blog-card .blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-content,
/* Used on Home page */
.blog-card-content

/* Used on Blog page */
    {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-tag,
/* Used on Home page */
.blog-card-content .post-tag

/* Used on Blog page */
    {
    display: inline-block;
    background-color: var(--light-bg-inner);
    color: var(--primary-dark);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.blog-title,
/* Used on Home page */
.blog-card-content .post-title

/* Used on Blog page */
    {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.75rem;
}

.blog-description,
/* Used on Home page */
.blog-card-content .post-excerpt-grid

/* Used on Blog page */
    {
    font-size: 0.95rem;
    color: #555;
    flex-grow: 1;
    margin-bottom: 1rem;
    min-height: 40px;
    /* Ensure some space for excerpt */
}

.blog-card-content .post-meta {
    /* Only used on Blog page card */
    font-size: 0.9rem;
    color: var(--secondary-muted);
    font-weight: 500;
    margin-top: auto;
    /* Push to bottom */
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}


/* === COMMON LOADER STYLE === */
.loader {
    width: 50px;
    height: 50px;
    border: 5px solid var(--light-bg-inner);
    border-top-color: var(--primary-dark);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 3rem auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* === COMMON MEDIA QUERIES === */
@media screen and (max-width: 768px) {

    /* Mobile Menu Structure */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--bg-color);
        transition: right 0.4s ease-in-out;
        z-index: 101;
        padding-top: 6rem;
    }

    .nav-menu.show-menu {
        right: 0;
    }

    .nav-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    /* Mobile Menu Toggle/Close Icons (FIXED) */
    .nav-toggle {
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 101;
        color: var(--primary-dark);
        background-color: transparent;
        border: 2px solid var(--primary-dark);
        border-radius: 50px;
        padding: 0.3rem 0.8rem;
        transition: background-color 0.3s, color 0.3s;
    }

    .nav-close {
        display: none;
        /* Hide close by default */
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--primary-dark);
        z-index: 102;
    }

    /* Logic to show/hide icons */
    .nav-menu.show-menu~.nav-toggle {
        opacity: 0;
        pointer-events: none;
    }

    .nav-menu.show-menu .nav-close {
        display: block;
    }

    /* Other common mobile adjustments */
    .section {
        padding: 3rem 1.5rem;
        /* Adjust default padding for mobile */
    }

    .section--card {
        padding: 3rem 1.5rem;
        /* Adjust card padding for mobile */
    }

    .footer {
        margin: 0;
    }

    .modal-content {
        padding: 1.5rem;
    }
}