@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* ===== CSS Custom Properties (Variables) for Better Maintenance and Color Control ===== */
:root {
    --color-primary-light: rgb(252, 236, 217);
    /* Light Cream Background (Header/Body) */
    --color-primary-dark: rgb(83, 51, 51);
    /* Dark Brown Text/Accents/Footer BG */
    --color-card-bg: #fcf6fa;
    /* Off-White Card Background */
    --color-text-secondary: #666;
    /* Grey for excerpts/subtext */
    --color-text-meta: #999;
    /* Light Grey for meta info */
    --color-border-light: #eee;
    /* Light border color */
}

/* ===== Reset & Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-primary-light);
    font-family: 'Montserrat', sans-serif;
    color: var(--color-primary-dark);
    line-height: 1.6;
}

/* ===== Header & Navigation Fix ===== */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 100;
}

.logo {
    font-size: 1.2em;
    font-weight: bold;
    text-decoration: none;
}

nav ul {
    list-style: none;
    /* Ensure main list has no markers */
    display: flex;
}

nav ul li {
    margin-left: 30px;
    list-style: none;
    /* Explicitly ensure list items have no markers (Fix) */
}

nav ul li a {
    text-decoration: none;
    color: var(--color-primary-dark);
    font-weight: 500;
    transition: opacity 0.3s ease, color 0.3s ease;
    display: block;
    padding: 8px 0;
}

nav ul li a:hover {
    opacity: 0.7;
}

.dropdown {
    position: relative;
}

/* Dropdown Smoothness */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background-color: #fff;
    min-width: 150px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.dropdown-menu li {
    margin: 0;
    list-style: none;
}

.dropdown-menu li a {
    padding: 8px 15px;
    display: block;
    white-space: nowrap;
    transition: background-color 0.2s ease;
    margin: 0;
    color: var(--color-primary-dark);
}

.dropdown-menu li a:hover {
    background-color: #f0f0f0;
    color: var(--color-primary-dark);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===== Hero Section (Slider Image Optimization) ===== */
.hero-section {
    display: flex;
    height: 550px;
    max-width: 1400px;
    margin: 10px auto;
    position: relative;
    overflow: hidden;
}

.hero-image-container {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    overflow: hidden;
}

/* CRITICAL FIX: Combined styles for the direct <img> tag */
.slider-picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures image fills the container without distortion */
    display: block;
    /* Ensures it behaves like a block element */
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slider-picture.active {
    opacity: 1;
}

.hero-content {
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 100%;
    background-color: var(--color-card-bg);
    padding: 20px 60px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 10;
}

.main-title {
    font-size: 4.5em;
    font-weight: 700;
    line-height: 1.1;
    max-width: 400px;
    margin-top: 30px;
    margin-bottom: 10px;
    color: var(--color-primary-dark);
}

.cta-box {
    margin: 20px 0;
    padding: 20px 0;
    max-width: 350px;
}

.cta-box p {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--color-primary-dark);
}

.join-us-button {
    background-color: var(--color-primary-light);
    color: var(--color-primary-dark);
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-block;
    width: max-content;
    font-size: 1em;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.join-us-button:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.join-us-button:active {
    transform: translateY(0);
}

/* ===== Latest Updates Section ===== */
.latest-updates-section {
    padding: 80px 40px;
    margin-top: 20px;
    background-color: var(--color-primary-light);
}

.updates-container {
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 50px;
    text-align: left;
    padding-left: 20px;
    color: var(--color-primary-dark);
    position: relative;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.article-card {
    background-color: var(--color-card-bg);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.image-area {
    height: 300px;
    overflow: hidden;
    position: relative;
}

.article-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.article-card:hover img {
    transform: scale(1.08);
}

.article-meta,
.article-heading,
.article-excerpt {
    padding: 0 20px;
}

.article-meta {
    font-size: 0.75em;
    color: var(--color-text-meta);
    margin-top: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.article-heading {
    font-size: 1.2em;
    font-weight: 600;
    margin: 15px 0;
    color: var(--color-primary-dark);
    line-height: 1.3;
}

.article-excerpt {
    font-size: 0.9em;
    color: var(--color-text-secondary);
    line-height: 1.5;
    flex-grow: 1;
    padding-bottom: 20px;
}

.read-more-button {
    background-color: var(--color-primary-light);
    color: var(--color-primary-dark);
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    display: inline-block;
    width: max-content;
    margin: 0 auto 40px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.read-more-button:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* ===== Blog Section ===== */
.blog-section {
    padding: 0 0 80px;
    margin: 0px;
    background-color: var(--color-primary-light);
}

.blog-hero {
    background-color: var(--color-card-bg);
    padding: 60px;
    margin-bottom: 100px;
    text-align: center;
    border-bottom: 1px solid var(--color-border-light);
}

.blog-hero h1 {
    font-size: 3em;
    margin-bottom: 10px;
    color: var(--color-primary-dark);
}

.blog-hero p {
    font-size: 1.1em;
    color: var(--color-text-secondary);
}

.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    gap: 40px;
}

.blog-main {
    flex: 3;
    min-width: 0;
}

.blog-sidebar {
    flex: 1;
    position: sticky;
    top: 20px;
    align-self: flex-start;
    height: fit-content;
}

.blog-post {
    background-color: var(--color-card-bg);
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.blog-post h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: var(--color-primary-dark);
    line-height: 1.2;
}

.blog-meta {
    font-size: 0.9em;
    color: var(--color-text-meta);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: 10px;
}

.blog-content p {
    line-height: 1.7;
    margin-bottom: 15px;
    color: #555;
}

.sidebar-widget {
    background-color: var(--color-card-bg);
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.sidebar-widget h3 {
    font-size: 1.4em;
    border-bottom: 2px solid var(--color-primary-dark);
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: var(--color-primary-dark);
}

.category-list,
.recent-posts {
    list-style: none;
    padding: 0;
}

.category-list li,
.recent-posts li {
    margin-bottom: 10px;
    list-style: none;
}

.category-list a,
.recent-posts a {
    text-decoration: none;
    color: var(--color-text-secondary);
    display: block;
    padding: 8px 0;
    transition: color 0.3s ease, padding-left 0.3s ease;
    border-left: 3px solid transparent;
    padding-left: 8px;
}

.category-list a:hover,
.recent-posts a:hover {
    color: var(--color-primary-dark);
    border-left-color: var(--color-primary-dark);
}

/* ===== Page Hero ===== */
.page-hero {
    background-color: var(--color-card-bg);
    padding: 60px;
    margin-bottom: 100px;
    text-align: center;
    border-bottom: 1px solid var(--color-border-light);
}

.page-hero h1 {
    font-size: 3em;
    margin-bottom: 10px;
    color: var(--color-primary-dark);
}

.page-hero p {
    font-size: 1.1em;
    color: var(--color-text-secondary);
}

/* ===== About Section ===== */
.about-content {
    padding-bottom: 80px;
}

.about-content .container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.about-section {
    background-color: var(--color-card-bg);
    padding: 30px;
    margin-bottom: 0px auto;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.about-section h2 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: var(--color-primary-dark);
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary-dark);
}

.about-section p {
    margin-bottom: 15px;
    line-height: 1.7;
    color: #555;
}

.about-list {
    list-style: none;
    padding-left: 0;
}

.about-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-primary-dark);
    font-size: 0.95em;
    padding-left: 25px;
    position: relative;
    transition: padding-left 0.3s ease;
}

.about-list li:last-child {
    border-bottom: none;
}

.about-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--color-primary-dark);
    border-radius: 50%;
}

.about-list li:hover {
    padding-left: 30px;
}

/* ===== START: Modernized Contact Section Styles & Coloring ===== */
.contact-section {
    background-color: var(--color-primary-light);
    padding-bottom: 80px;
    /* Deep Charcoal background */
}

.contact-section .page-hero {
    background-color: transparent;
    border-bottom: none;
    padding: 20px;
    margin-bottom: 100px;
}

.contact-section .page-hero h1 {
    color: var(--color-primary-dark);
    /* Light text for contrast */
    padding-top: 0px;
}

.contact-section .page-hero p {
    color: var(--color-primary-dark);
    /* Light text for contrast */
}

.contact-main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Contact Cards Grid */
.contact-cards-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 50px;
    padding: 0;
}

.contact-card {
    flex: 1;
    background-color: var(--color-card-bg);
    /* Light background for the card */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 5px solid var(--color-primary-light);
    /* Accent color */
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* New Font Awesome Icon Styling */
.contact-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    font-size: 35px;
    /* Icon size */
    color: var(--color-primary-dark);
    /* Icon color */
    transition: all 0.3s ease;
}

.contact-card:hover .contact-icon {
    transform: scale(1.05);
}

.contact-card h3 {
    font-size: 1.3em;
    color: var(--color-primary-dark);
    margin-bottom: 5px;
    font-weight: 700;
}

.contact-card p {
    font-size: 0.9em;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.contact-value {
    font-size: 1em;
    font-weight: 600;
    color: var(--color-primary-dark);
    display: block;
    word-break: break-all;
}

.contact-card a.contact-value {
    text-decoration: none;
    color: var(--color-primary-dark);
    transition: color 0.3s ease;
}

.contact-card a.contact-value:hover {
    color: var(--color-text-secondary);
}


/* Form Wrapper Style */
.contact-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    background-color: var(--color-card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact-form-wrapper h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 30px;
    border-bottom: 3px solid var(--color-primary-light);
    /* Accent line */
    padding-bottom: 15px;
    color: var(--color-primary-dark);
}

/* Modernized Form Inputs */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    font-size: 1em;
    color: #333;
    transition: all 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary-dark);
    box-shadow: 0 0 0 3px rgba(83, 51, 51, 0.15);
    background-color: #fff;
}

.submit-btn {
    padding: 16px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: var(--color-primary-dark);
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(83, 51, 51, 0.2);
}

.submit-btn:hover {
    background-color: #4b3030;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(83, 51, 51, 0.3);
}


/* ===== Footer Update (Color & Separation) ===== */
.footer {
    background-color: var(--color-primary-dark);
    /* Dark Brown background */
    color: #fcf6fa;
    /* Light text for contrast */
    padding: 50px 0 15px;
}

.footer .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    /* Light separator line on dark background */
    gap: 20px;
}

.footer-section {
    flex: 1;
    min-width: 200px;
}

.footer-section h4 {
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: 700;
    color: #ffffff;
    /* White text */
    letter-spacing: 0.5px;
}

.footer-section p {
    font-size: 0.9em;
    line-height: 1.6;
    color: #ccc;
    /* Light grey text */
}

.footer-section ul {
    list-style: none;
    /* Ensure no list markers */
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
    list-style: none;
    /* Ensure list items have no markers */
}

.footer-section ul li a {
    color: #fcf6fa;
    /* Light cream link text */
    text-decoration: none;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 4px 0;
}

.footer-section ul li a:hover {
    color: var(--color-primary-light);
    /* Hover to primary cream color */
    padding-left: 6px;
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
}

.footer-bottom p {
    font-size: 0.8em;
    color: #aaa;
}

/* ===== Responsive Design ===== */
@media (max-width: 900px) {
    .main-header {
        flex-direction: column;
        padding: 15px 20px;
    }

    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        gap: 10px;
    }

    nav ul li {
        margin-left: 0;
    }

    .hero-section {
        height: auto;
        flex-direction: column;
        margin: 0;
        border-radius: 0;
    }

    .hero-content {
        position: static;
        width: 100%;
        height: auto;
        padding: 40px 20px;
        order: 2;
    }

    .main-title {
        font-size: 3em;
        margin-top: 0;
        max-width: none;
    }

    .hero-image-container {
        position: static;
        width: 100%;
        height: 300px;
        order: 1;
    }

    .hero-image-container img {
        height: 50%;
    }

    .cta-box {
        margin: 20px 0;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .latest-updates-section {
        padding: 20px 10px;
    }

    .section-title {
        padding-left: 0;
    }

    .blog-container {
        flex-direction: column;
        gap: 20px;
        padding: 0 20px;
    }

    .blog-main,
    .blog-sidebar {
        flex: auto;
    }

    .blog-sidebar {
        position: static;
        top: auto;
        height: auto;
    }
    .sidebar-widget{
        margin-bottom: 10px;
        margin-top: 30px;
    }

    .blog-hero {
        padding: 20px 10px;
        margin: 40px 10px 100px 10px;
    }

    .blog-hero h1 {
        font-size: 2em;
    }

    .about-hero {
        /* margin: 0px ; */
        padding: 20px 10px;
    }
    .about-content,
    .contact-section {
        padding: 20px 10px;
    }

    .about-content .container {
        padding: 0;
    }
    .contact-section .page-hero {
    padding: 20px;
    margin-bottom: 40px;
}

    .contact-cards-grid {
        flex-direction: column;
        gap: 20px;
    }

    .contact-main-content {
        padding: 0 20px;
    }

    .contact-form-wrapper {
        padding: 20px;
        margin-bottom: 50px;
    }

    .page-hero {
        padding: 20px 10px;
    }
}

@media (max-width: 600px) {
    .main-title {
        font-size: 2.2em;
    }

    .section-title {
        font-size: 1.8em;
    }

    .blog-hero h1,
    .page-hero h1 {
        font-size: 2em;
    }

    .articles-grid {
        gap: 20px;
    }

    .article-heading {
        font-size: 1.1em;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        padding-bottom: 20px;
    }

    .footer-section {
        margin-right: 0;
    }

    .contact-info,
    .contact-form-wrapper {
        padding: 20px;
    }

    nav ul li {
        font-size: 0.9em;
    }

    nav ul li {
        margin-left: 10px;
    }
}
