/* Import a modern, professional font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

/* ----- General & Reset Styles ----- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: #222; /* A softer black */
    line-height: 1.6;
    display: flex; /* Added for sticky footer pattern */
    flex-direction: column; /* Added for sticky footer pattern */
    min-height: 100vh; /* Added for sticky footer pattern */
}

/* Ensure main content takes up available space for sticky footer */
main {
    flex: 1; 
    margin-top: 80px; /* Adjust this value based on your fixed header's height */
    padding: 2rem; /* Add some padding to main content */
    max-width: 1200px; /* Constrain main content width */
    margin-left: auto;
    margin-right: auto;
}

/* ----- Header Styles ----- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9); /* A slightly transparent white for the "Apple" look */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #222;
}

.logo-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    stroke: #222;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

/* ----- Desktop Navigation Styles ----- */
/* Targeted to only direct child ul to prevent unintended inheritance */
.main-nav > ul { 
    list-style: none;
    display: flex;
    align-items: center;
}

.main-nav li {
    position: relative;
    padding: 0 1rem;
}

.main-nav a {
    text-decoration: none;
    color: #222;
    font-weight: 700;
    padding: 10px;
    display: block;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #007aff; /* Apple-like blue accent */
}

/* Dropdown Menu Styles */
.dropdown-menu {
    display: none; /* Crucial: Ensure it's hidden by default */
    position: absolute;
    top: 100%; /* Positions the dropdown directly below the parent */
    left: 0;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 180px;
    border-radius: 8px;
    overflow: hidden;
    padding: 10px 0;
    flex-direction: column; /* This property will only take effect when display is flex */
    box-sizing: content-box; /* Ensure padding doesn't affect width calculations */
}

.dropdown-menu li {
    padding: 0;
    text-align: left;
    display: block; /* Ensures list items stack vertically within the dropdown */
}

.dropdown:hover .dropdown-menu {
    display: flex; /* On hover, make it a flex container to show and apply flex-direction: column */
}

/* ----- Mobile Hamburger Menu Styles ----- */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #222;
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

/* Hide the regular nav on mobile */
@media screen and (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.95);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 99;
    }

    .main-nav.open {
        display: flex; /* Use flex for mobile nav to stack vertically */
        flex-direction: column;
        align-items: center;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%; /* Ensure full width for mobile menu */
    }

    .main-nav li {
        width: 100%;
        text-align: center;
        padding: 0; /* Remove horizontal padding */
        border-bottom: 1px solid rgba(0, 0, 0, 0.05); /* Separator for mobile links */
    }
    .main-nav li:last-child {
        border-bottom: none;
    }

    .dropdown-menu {
        position: relative; /* Change position to flow within mobile nav */
        box-shadow: none;
        padding-left: 1rem;
        border-radius: 0;
        display: none; /* Keep dropdowns hidden by default on mobile */
        /* For mobile, these would need JavaScript to toggle, not hover */
    }
    
    .dropdown:hover .dropdown-menu {
        display: none; /* Disable hover effect for dropdowns on mobile */
    }

    .hamburger-menu {
        display: flex;
    }
}


/* ----- Footer Styles ----- */
.main-footer {
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    color: #222;
    font-size: 0.9rem;
    margin-top: auto; /* Pushes footer to the bottom */
}

.footer-content {
    display: flex;
    flex-wrap: wrap; /* Allows sections to wrap on smaller screens */
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem; /* Space between columns */
}

.footer-section {
    flex: 1; /* Distributes space evenly */
    min-width: 180px; /* Ensures sections don't get too narrow */
}

.footer-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    text-decoration: none;
    color: #555;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #007aff; /* Apple-like blue accent */
}

.footer-contact-info p {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    color: #555;
}

/* Responsive adjustments for footer */
@media screen and (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-section {
        min-width: unset; /* Remove min-width on small screens */
        width: 100%; /* Take full width on small screens */
        margin-bottom: 1.5rem;
    }

    .footer-section:last-child {
        margin-bottom: 0;
    }
}

/* ----- General Page & Section Styles ----- */
.page-hero-section {
    background: linear-gradient(135deg, #e0eafc, #cfdef3); /* Soft blue gradient */
    padding: 3rem 2rem; /* Slightly less padding than homepage hero */
    text-align: center;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.page-hero-section h1 {
    font-size: 2.5rem; /* Slightly smaller than homepage hero h1 */
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #1a1a1a;
}

.page-hero-section .tagline {
    font-size: 1.2rem;
    color: #333;
}

.method-intro-section, .trust-section, .content-section, .call-to-action-section {
    padding: 2rem 0;
    text-align: center; /* Center-aligns the section itself */
}

/* Specific text alignment for content within content-section */
.content-section p,
.content-section ol,
.content-section ol li,
.content-section .guide-list-item {
    text-align: left; /* Left-aligns text within these elements */
    max-width: 900px; /* Keep consistent width for readability */
    margin-left: auto;
    margin-right: auto;
}


.method-intro-section h2, .tiles-section h2, .trust-section h2, .content-section h2, .values-section h2, .call-to-action-section h2, .sitemap-section h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}
.sitemap-section h3 {
    font-size: 1.4rem; /* Specific size for sitemap section headings */
    margin-bottom: 1rem;
    color: #333;
}


.method-intro-section p, .trust-section p, .content-section p, .values-section p, .call-to-action-section p {
    max-width: 900px;
    margin: 0 auto 1rem auto;
    font-size: 1.1rem;
    color: #555;
}

/* Horizontal Rule Styling */
hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 3rem auto;
    max-width: 800px;
}

/* Call to Action Buttons */
.cta-group {
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allows buttons to wrap on smaller screens */
    gap: 1rem;
}

.cta-button {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.primary-cta {
    background-color: #007aff; /* Apple-like blue */
    color: white;
}

.primary-cta:hover {
    background-color: #005bb5;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.secondary-cta {
    background-color: #f0f0f0; /* Light grey */
    color: #222;
    border: 1px solid #ddd;
}

.secondary-cta:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
    box-shadow: 0 66px 15px rgba(0, 0, 0, 0.15);
}

/* New style for CTAs within article content to add top margin */
.article-cta {
    margin-top: 2rem; 
    margin-bottom: 1rem; /* Add some space below as well */
}


/* Last Updated Text */
.last-updated-text {
    font-size: 0.9rem;
    color: #777;
    text-align: right;
    margin-bottom: 2rem;
    font-style: italic;
}

/* ----- Homepage Specific Styles ----- */
.hero-section { /* Uses different background for main homepage hero */
    background: linear-gradient(135deg, #e0eafc, #cfdef3); /* Soft blue gradient */
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.hero-section .tagline {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: #333;
}

.hero-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #555;
}


/* Tiles Section (Homepage) */
.tiles-section {
    padding: 2rem 0;
    text-align: center;
}

.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 2rem auto;
}

.tile {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    text-align: left;
    text-decoration: none;
    color: #222;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.tile h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #1a1a1a;
}

.tile p {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 1rem;
    flex-grow: 1; /* Allows paragraph to take up available space */
}

.tile .learn-more, .tile .use-tool {
    font-size: 0.9rem;
    font-weight: 700;
    color: #007aff; /* Apple-like blue accent */
    align-self: flex-start;
}

.tile .learn-more:hover, .tile .use-tool:hover {
    text-decoration: underline;
}

/* Values Section (for About Us page) */
.values-section {
    padding: 2rem 0;
    text-align: center;
}

.value-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 2rem auto;
}

.value-item {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.value-item h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: #007aff; /* Highlight with blue accent */
}

.value-item p {
    font-size: 1rem;
    color: #555;
    margin: 0 auto; /* Ensure paragraphs are centered within the item */
}

/* Sitemap Specific Styles */
.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 2rem auto;
    text-align: left;
}

/* Removed sitemap-section ul and li styles as they are no longer used */
/* .sitemap-section ul { list-style: none; padding: 0; } */
/* .sitemap-section ul li { margin-bottom: 0.5rem; } */

.sitemap-link-item { /* New style for the div wrapper */
    margin-bottom: 0.5rem; /* Provides spacing between links */
}

.sitemap-link-item a { /* Apply link styles directly */
    color: #007aff;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block; /* Make links block level to take up full width and respect margin */
}

.sitemap-link-item a:hover {
    text-decoration: underline;
}

/* Guide List Item Styles (for un-bulleted lists) */
.guide-list-item {
    max-width: 900px; /* Aligns with content section paragraph width */
    margin: 0.5rem auto; /* Centers and provides vertical spacing */
    font-size: 1.1rem; /* Inherits paragraph font size */
    color: #555; /* Inherits paragraph text color */
    position: relative;
    padding-left: 1.5rem; /* Space for a custom icon if desired later */
    text-align: left;
}

/* Optional: Add a custom checkmark or dot if you want a subtle visual cue */
/*
.guide-list-item::before {
    content: "✔️"; // Or "•" or "→"
    position: absolute;
    left: 0;
    color: #007aff;
    font-size: 0.9em;
    line-height: 1.6;
}
*/


/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .page-hero-section h1, .hero-section h1 {
        font-size: 2rem;
    }

    .page-hero-section .tagline, .hero-section .tagline {
        font-size: 1.1rem;
    }

    .method-intro-section h2, .tiles-section h2, .trust-section h2, .content-section h2, .values-section h2, .call-to-action-section h2, .sitemap-section h3 {
        font-size: 1.7rem;
    }

    .method-intro-section p, .trust-section p, .content-section p, .values-section p, .call-to-action-section p, .guide-list-item {
        font-size: 1rem; /* Adjust list item font size for mobile */
    }

    .cta-group {
        flex-direction: column;
        align-items: center;
    }

    .cta-button {
        width: 100%;
        text-align: center;
    }

    .tile-grid, .value-grid, .sitemap-grid {
        grid-template-columns: 1fr; /* Stack on mobile */
    }
}
