/* ==================================================
   TABLE OF CONTENTS
   1.  :root        - CSS Variables & Theming
   2.  Base         - Reset & Foundational Styles
   3.  Typography   - Fluid Sizing with clamp()
   4.  Layout       - Containers & Section Helpers
   5.  Components   - Buttons, Cards, Forms
   6.  Header       - Sticky Header & Navigation
   7.  Main Content - Hero, Services, Testimonials, etc.
   8.  Footer       - Layout & Styling
   9.  Animations   - Scroll & Hover Effects
   10. Media Queries- Responsive Breakpoints
===================================================== */

/* 1. :root - CSS Variables & Theming */
:root {
    /* Fonts */
    --font-heading: 'Raleway', sans-serif;
    --font-body: 'Source Sans Pro', sans-serif;

    /* Light Mode Colors (Default) */
    --color-bg: #F9FAFB;
    --color-bg-alt: #FFFFFF;
    --color-text: #374151;
    --color-heading: #111827;
    --color-border: #E5E7EB;
    --color-accent: #A07200;
    --color-accent-hover: #8A6200;
    --hero-overlay: linear-gradient(45deg, rgba(17, 24, 39, 0.75), rgba(17, 24, 39, 0.65));

    /* Neutral & Status Colors */
    --color-white: #FFFFFF;
    --color-star-rating: #ffc107;
    --color-error: #EF4444;
    --color-error-glow: rgba(239, 68, 68, 0.2);
    --color-success: #10B981;
    --color-footer-muted: #9CA3AF;

    /* Sizing & Effects */
    --spacing-unit: 1rem;
    --container-width: 1200px;
    --header-height: 70px;
    --radius: 1rem;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.dark-mode {
    --color-bg: #111827;
    --color-bg-alt: #1F2937;
    --color-text: #D1D5DB;
    --color-heading: #F9FAFB;
    --color-border: #374151;
    --color-accent: #D9A443;
    --color-accent-hover: #C0903A;
    --hero-overlay: linear-gradient(45deg, rgba(0, 0, 0, 0.8), rgba(17, 24, 39, 0.7));
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.25);
    /* Fix for dark mode footer text */
    --color-footer-muted: #6B7280;
}

/* 2. Base - Reset & Foundational Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition), color var(--transition);
}

img, picture, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

/* 3. Typography - Fluid Sizing with clamp() */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-heading);
    text-wrap: balance;
    transition: color var(--transition);
}

h1 { font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw + 1rem, 3.25rem); }
h3 { font-size: clamp(1.25rem, 2vw + 0.5rem, 1.75rem); }
p, li, a, input, textarea, label { font-size: clamp(1rem, 1vw + 0.5rem, 1.125rem); }

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--color-accent-hover); }

/* 4. Layout - Containers & Section Helpers */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 3rem);
}

section {
    padding: clamp(4rem, 10vw, 8rem) 0;
}

.section-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto clamp(3rem, 8vw, 5rem);
}
.section-header p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--color-text);
    opacity: 0.9;
}

/* FAQ Section Styles */
#faq {
    background-color: var(--color-bg-alt);
    transition: background-color var(--transition);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.faq-item {
    background-color: var(--color-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
    transition: background-color var(--transition), border-color var(--transition);
}

.faq-item h3 {
    margin: 0;
    font-size: 1rem; /* Reset heading font size */
}

.faq-question-btn {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2vw, 1.4rem);
    font-weight: 700;
    color: var(--color-heading);
    transition: color var(--transition);
}

.faq-question-btn:is(:hover, :focus-visible) {
    color: var(--color-accent);
}

.faq-icon {
    color: var(--color-accent);
    font-size: 1.2rem;
    transition: transform var(--transition);
}

.faq-item.open .faq-icon {
    transform: rotate(45deg);
}

.faq-answer-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.5s var(--transition);
}

.faq-item.open .faq-answer-wrapper {
    grid-template-rows: 1fr;
}

.faq-answer {
    overflow: hidden;
    color: var(--color-text);
    line-height: 1.6;
    padding: 0 2rem; /* Set horizontal padding */
    /* Add transition for padding to sync with the wrapper's animation */
    transition: padding-top 0.5s var(--transition), padding-bottom 0.5s var(--transition);
}

.faq-item.open .faq-answer {
    padding-top: 0.5rem; /* Add a little top padding when open for spacing */
    padding-bottom: 1.5rem; /* Add bottom padding when open */
}

/* 5. Components - Buttons, Cards, Forms */

/* -- Accessibility: Visible Focus Styles -- */
:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--color-bg) 50%, transparent);
}

/* Remove outline for non-keyboard focus (optional but clean) */
:focus:not(:focus-visible) {
    outline: none;
}

.button {
    display: inline-flex; /* Changed */
    justify-content: center; /* New */
    align-items: center; /* New */
    min-height: 48px; /* New */
    padding: 0.8em 2em;
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
    transition: all var(--transition);
    font-size: clamp(1rem, 1vw + 0.5rem, 1.1rem);
    position: relative;
}

/* Add this new rule for a subtle click effect */
.button:active {
    transform: scale(0.98);
    filter: brightness(0.95);
}

.button-primary {
    background-color: var(--color-accent);
    color: var(--color-white); /* Changed from --dark-bg */
    font-weight: 800;
    border-color: var(--color-accent); /* Added for a smooth hover transition */
}
/* Default styles for secondary/outline buttons */
.button:not(.button-primary) {
    border-color: var(--color-border);
    background-color: transparent;
    color: var(--color-heading);
}

.button:not(.button-primary):hover {
    background-color: var(--color-bg-alt);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.button-primary:hover {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-2px); /* Switched from scale to translate for a smoother effect */
    box-shadow: none;
}

.card {
    background-color: var(--color-bg-alt);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    /* overflow: hidden; <-- REMOVED FROM HERE */
    display: flex;
    flex-direction: column;
    transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
}

/* Add this new rule to keep article images clipped correctly */
.article-card {
    overflow: hidden;
}
.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
.dark-mode .card:hover {
     box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.25);
}

/* Force dark text on the featured badge in dark mode for high contrast */
.dark-mode .featured-badge {
    color: var(--color-dark-bg);
}

/* -- Cookie Consent Banner -- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-bg-alt);
    padding: 1.5rem 0;
    z-index: 2000;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
    border-top: 1px solid var(--color-border);
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
                background-color var(--transition),
                border-color var(--transition);
}

.cookie-banner.is-visible {
    transform: translateY(0);
}

.cookie-banner-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.cookie-banner-text {
    margin: 0;
    font-size: clamp(0.9rem, 1vw + 0.5rem, 1rem);
}

.cookie-learn-more {
    text-decoration: underline;
    font-weight: 600;
}

.cookie-banner-actions {
    display: flex;
    gap: 1rem;
}

.cookie-banner-actions .button {
    padding: 0.6em 1.5em;
    font-size: 0.9rem;
}

@media (min-width: 768px) {
    .cookie-banner-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    .cookie-banner-text {
        margin-right: 2rem;
    }
}

/* -- Floating WhatsApp Button -- */
.whatsapp-button {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1000;

    /* Styling */
    background-color: #25D366; /* Official WhatsApp Green */
    color: #FFFFFF;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);

    /* Icon alignment */
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;

    /* Animation */
    transition: all var(--transition);
}

.cookie-banner.is-visible ~ .whatsapp-button,
body.menu-open .whatsapp-button {
    display: none; /* Hide WhatsApp button when cookie banner or mobile menu is open */
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 4px 4px 15px rgba(0, 0, 0, 0.3);
    background-color: #1EBE57; /* Darker green on hover */
    color: #FFFFFF; /* Keep icon color white on hover */
}

/* New rule to highlight a target element on page scroll */
:target {
    animation: highlight-target 1s ease-out;
}

@keyframes highlight-target {
    0% {
        box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 50%, transparent);
    }
    100% {
        box-shadow: 0 0 0 0px color-mix(in srgb, var(--color-accent) 0%, transparent);
    }
}

/* 6. Header - Fixed Header & Navigation */
         #header {
             position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    border-bottom: 1px solid transparent;
    transition: all var(--transition);
}
#header.scrolled {
    background-color: color-mix(in srgb, var(--color-bg) 85%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: var(--color-border);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

#header.scrolled .desktop-nav a:not(.button) {
    color: var(--color-heading);
}

#header.scrolled .button:not(.button-primary) {
    color: var(--color-heading); /* Use dark text color from theme */
    border-color: var(--color-border); /* Use border color from theme */
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.header-logo img {
    height: clamp(30px, 5vw, 40px);
    width: auto;
    aspect-ratio: 1 / 1; /* Set to a square ratio */
}

.desktop-nav { display: none; }
.nav-controls { display: flex; align-items: center; gap: 1rem; }

.theme-toggle {
    background: none;
    border: none;
    color: var(--color-heading);
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    justify-content: center; /* New */
    align-items: center; /* New */
    min-width: 48px; /* New */
    min-height: 48px; /* New */
    transition: color var(--transition), background-color var(--transition);
}
.theme-toggle:hover { background-color: color-mix(in srgb, var(--color-border) 50%, transparent); }
.theme-toggle .fa-sun { display: none; }
.dark-mode .theme-toggle .fa-moon { display: none; }
.dark-mode .theme-toggle .fa-sun { display: block; }

.mobile-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 48px; /* Standardized for accessibility */
    height: 48px; /* Standardized for accessibility */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
.mobile-menu-toggle .bar {
    width: 24px;
    height: 3px;
    background-color: var(--color-heading);
    border-radius: 2px;
    transition: all var(--transition);
}

#mobile-menu a {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--color-heading);
}

#mobile-menu .button {
    font-size: 1.1rem;
    margin-top: 1rem;
    padding: 0.8em 2.5em;
}

#mobile-menu {
    position: fixed;
    top: 0;
    right: 0; /* Changed from -100% */
    transform: translateX(100%); /* Add this to hide it initially */
    width: min(80vw, 300px);
    height: 100vh;
    background-color: var(--color-bg-alt);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6rem 2rem;
    gap: 2rem;
    transition: transform var(--transition);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}

body.menu-open #mobile-menu {
    transform: translateX(0); /* Change to 0 to slide it into view */
}

body.menu-open .mobile-menu-toggle .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.menu-open .mobile-menu-toggle .bar:nth-child(2) { opacity: 0; }
body.menu-open .mobile-menu-toggle .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* -- Menu Overlay & Close Button -- */
#menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1000; /* Behind the menu, but on top of content */
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition), visibility var(--transition);
}

body.menu-open #menu-overlay {
    opacity: 1;
    visibility: visible;
}

.close-menu-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--color-heading);
    display: inline-flex; /* New */
    justify-content: center; /* New */
    align-items: center; /* New */
    min-width: 48px; /* New */
    min-height: 48px; /* New */
}

.close-menu-btn .icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Style for the active navigation link */
.desktop-nav a[aria-current="page"],
#mobile-menu a[aria-current="page"] {
    color: var(--color-accent);
    font-weight: 800; /* Make it bolder */
}

/* -- Style for buttons inside the header -- */
#header .button {
    font-size: 0.9rem;
    padding: 0.6em 1.6em;
}

/* Desktop Navigation Link Styling */
.desktop-nav a:not(.button) {
    color: var(--color-white); /* Default to white for transparent header */
    transition: color 0.3s ease;
}

#header.scrolled .desktop-nav a:not(.button) {
    color: var(--color-heading); /* Switch to theme color on scroll */
}

.desktop-nav a:not(.button):hover,
.desktop-nav a:not(.button):focus-visible {
    color: var(--color-accent); /* Gold color on hover/focus */
}

/* --- Header Transparent & Scrolled States: FINAL FIX --- */

/* 1. Default state for elements in the transparent (unscrolled) header */
#header:not(.scrolled) .desktop-nav a:not(.button),
#header:not(.scrolled) .theme-toggle {
    color: var(--color-white);
}

#header:not(.scrolled) .button:not(.button-primary) {
    color: var(--color-white);
    border-color: var(--color-white);
}

#header:not(.scrolled) .mobile-menu-toggle .bar {
    background-color: var(--color-white);
}

#header:not(.scrolled) .button:not(.button-primary):hover {
    background-color: var(--color-white);
    border-color: var(--color-white);
    color: var(--color-dark-bg);
}


/* 2. Scrolled state: ensure all elements use the theme's colors */
#header.scrolled .desktop-nav a:not(.button),
#header.scrolled .theme-toggle {
    color: var(--color-heading);
}

#header.scrolled .button:not(.button-primary) {
    color: var(--color-heading);
    border-color: var(--color-border);
}

#header.scrolled .mobile-menu-toggle .bar {
    background-color: var(--color-heading);
}

/* 7. Main Content - Styles for Each Section */
/* Hero */
#hero {
             position: relative;
             min-height: 100svh; /* Ensures it's at least 100% of the viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #F9FAFB; /* Light text color for contrast */
    overflow: hidden; /* Prevents content from spilling out */
}

#hero-bg-picture,
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

#hero-bg-picture {
    z-index: -2; /* Places the image behind the overlay and content */
}

#hero-bg-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the area without distortion */
    object-position: center; /* Keeps the image centered */
}

/* Media query for screens up to 767px wide (typical mobile) */
@media (max-width: 767px) {
    #hero-bg-picture img {
        object-position: 60% center; /* Adjust this value to shift the image left */
    }
}

.hero-overlay {
    z-index: -1; /* Sits between the image and the content */
    background: var(--hero-overlay); /* Uses the gradient from your variables */
}

/* The .hero-container is centered via flexbox on #hero */

#hero h1,
#hero .subtitle {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7); /* Adds shadow for text readability */
}

#hero .subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    max-width: 700px;
    margin: 1.5rem auto 2.5rem;
    color: #E5E7EB; /* A slightly off-white for the subtitle */
}

#hero h1 {
    color: #F9FAFB;
}

/* Services */
.services-grid { display: grid; gap: 2rem; }
.service-card { padding: 2rem; text-align: center; }
.card-icon-wrapper {
    height: 48px; /* Set the height on the wrapper */
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-card .card-icon {
    max-height: 100%; /* Ensure logo fits inside the wrapper */
    width: auto;
    object-fit: contain;
}

/* Dark Mode Logo Logic */
.logo-dark {
    display: none; /* Hide the dark logo by default */
}

.dark-mode .logo-light {
    display: none; /* When dark mode is on, hide the light logo */
}

.dark-mode .logo-dark {
    display: block; /* When dark mode is on, show the dark logo */
}
.service-card h3 { margin-bottom: 1rem; }

/* Detailed Feature Sections */
        .feature-section {
            padding: clamp(3rem, 8vw, 6rem) 0; /* Tighter padding for these sections */
        }
        .feature-grid {
            display: grid;
            align-items: center;
            gap: clamp(2rem, 5vw, 4rem);
        }
        .feature-image img {
            border-radius: var(--radius);
            box-shadow: var(--shadow);
        }
        .feature-content h2 {
            margin-bottom: 1.5rem;
        }
        .feature-content p {
            margin-bottom: 2rem;
        }

/* Testimonials */
.testimonial-slider-wrapper {
    position: relative;
    overflow: hidden;
}
.swiper-slide {
    text-align: center;
    padding: 1rem;
}
.swiper-slide blockquote {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-style: italic;
    border-left: 4px solid var(--color-accent);
    padding-left: 2rem;
    text-align: left;
    margin: 0 auto 2rem;
    max-width: 750px;
    color: var(--color-text);
}
.swiper-slide cite {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}
.star-rating {
    color: var(--color-star-rating);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}
.swiper-slide cite img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}
.swiper-slide cite .client-details {
    text-align: left;
}

/* New rule to set the color of the default avatar */
.swiper-slide cite {
    color: var(--color-text);
}

.swiper-slide cite .client-name,
.swiper-slide cite .client-title {
    display: block; /* This makes each part take up its own line */
}
.swiper-slide cite .client-name {
    color: var(--color-heading);
}
.swiper-slide cite .client-title {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.4;
}
.slider-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}
.slider-nav button {
    background: var(--color-bg-alt);
    color: var(--color-heading);
    border: 1px solid var(--color-border);
    width: 50px; height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; /* New */
    justify-content: center; /* New */
    align-items: center; /* New */
    transition: all var(--transition);
}
.slider-nav button:is(:hover, :focus-visible) {
    background-color: var(--color-accent);
    color: var(--dark-bg);
    border-color: var(--color-accent);
}

/* Pricing */
.pricing-grid { display: grid; gap: 2rem; }

.pricing-card {
    text-align: center;
    padding: 3.5rem 2.5rem 2.5rem; /* Give all cards more top padding */
    position: relative;
}

.pricing-card.featured {
    border: 2px solid var(--color-accent);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.featured-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%); /* Centers the badge on the top border */

    background-color: var(--color-accent);
    color: var(--color-white); /* Changed to white */
    padding: 0.4em 1.5em;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 99px;
    white-space: nowrap; /* Ensures "Most Popular" stays on one line */
}
.price { font-family: var(--font-heading); font-size: 4rem; font-weight: 800; margin: 0.5rem 0 0.25rem; }
.price sup { font-size: 1.75rem; top: -1.5rem; }
.price-note { opacity: 0.8; margin-bottom: 2rem; }
.price-custom-icon { font-size: 3rem; color: var(--color-accent); margin: 1.5rem 0; }
.plan-features { list-style: none; margin-bottom: 2.5rem; flex-grow: 1; }
.plan-features li { padding: 0.8rem 0; border-top: 1px solid var(--color-border); }
.plan-features li:first-of-type { border-top: none; }
.pricing-card .button { width: 100%; margin-top: auto; }

/* Custom Plan CTA Banner */
.custom-plan-cta {
    margin-top: 3rem;
    padding: 2.5rem;
    border: 2px var(--color-border); /* Changed to normal border */
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    background-color: var(--color-bg-alt);
    transition: all var(--transition);
}

.custom-plan-cta h3 {
    font-size: clamp(1.75rem, 3vw, 2.25rem); /* Made title larger */
    margin-bottom: 0.75rem; /* Adds space below the heading */
}

.custom-plan-cta p {
    opacity: 0.9; /* Softens the paragraph text */
}

@media (min-width: 768px) {
    .custom-plan-cta {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .custom-plan-cta .button {
        flex-shrink: 0; /* Prevents the button from shrinking */
    }
}

/* Make the custom CTA button full-width on mobile */
@media (max-width: 767px) {
    .custom-plan-cta .button {
        width: 100%;
    }
}

/* Articles */
.articles-grid { display: grid; gap: 2rem; }
.article-image-link img { aspect-ratio: 16 / 9; object-fit: cover; }
.article-card .card-content { padding: 2rem; }
.article-meta {
    margin-bottom: 0.75rem;
}

/* New style to ensure consistent card height in the article grid */
.card-text-wrapper {
    height: 140px; /* Adjust this value as needed to fit your content */
    overflow: hidden;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Fallback for multi-line ellipsis in older browsers */
.card-text-wrapper h3,
.card-text-wrapper p {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Adjust this value to control the number of lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.article-meta time {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text);
    opacity: 0.8;
}
.article-card .card-content h3 { font-size: 1.4rem; }
.article-card .card-content p { flex-grow: 1; margin: 1rem 0; }
.read-more { font-weight: 600; display: inline-block; }

/* Add this new rule */
.read-more:active {
    transform: scale(0.97);
}

.read-more i { margin-left: 0.5rem; transition: transform var(--transition); }
.read-more:hover i { transform: translateX(5px); }

/* Container for the "View All Articles" button */
.articles-cta-container {
    margin-top: 2rem;
    text-align: center;
}

/* Contact Form */
fieldset {
    border: 0;
}
.form-field {
    margin-bottom: 2.5rem; /* Increased margin to make space for error messages */
    position: relative;
}
.error-message {
    position: absolute;
    bottom: -1.75rem;
    left: 0;
    color: var(--color-error);
    font-size: 0.875rem;
    font-weight: 600;
}
/* Styles for an input field when it's invalid */
.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
    border-color: var(--color-error);
}
.form-field input[aria-invalid="true"]:focus,
.form-field textarea[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 4px var(--color-error-glow);
}
.contact-form { max-width: 800px; margin: 0 auto; }
.form-field { margin-bottom: 2rem; }
.form-field label { display: block; margin-bottom: 0.75rem; font-weight: 600; }
.form-field input, .form-field textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background-color: var(--color-bg-alt);
    color: var(--color-text);
    transition: all var(--transition);
}
.form-field input:focus, .form-field textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 20%, transparent);
}
.contact-form button { width: 100%; padding: 1.25rem; }
.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: var(--radius);
    text-align: center;
    display: none;
}
.form-message.success { background-color: var(--color-success); color: white; }
.form-message.error { background-color: var(--color-error); color: white; }

/* 8. Footer - Layout & Styling */
#footer {
    background-color: var(--color-dark-bg);
    color: var(--color-dark-text);
    padding-top: clamp(4rem, 10vw, 6rem);
    font-size: 1rem;
}
.footer-container { display: grid; gap: 3rem; padding-bottom: 3rem; }
#footer h3 { font-size: 1.25rem; color: var(--color-dark-heading); margin-bottom: 1.5rem; }
.footer-logo img {
    height: 40px;
    width: auto; /* Add this line to maintain aspect ratio */
    margin-bottom: 1rem;
}
.footer-contact ul { list-style: none; }
.footer-contact li { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.footer-contact a { color: var(--color-dark-text); }
.footer-contact a:hover { color: var(--color-dark-accent); }
.social-icons { display: flex; gap: 1.5rem; }
.social-icons a {
    font-size: 1.5rem; /* Adjusted for better fit */
    color: var(--color-dark-text);
    transition: all var(--transition);
    min-width: 48px; /* New */
    min-height: 48px; /* New */
    display: inline-flex; /* New */
    justify-content: center; /* New */
    align-items: center; /* New */
    border-radius: 50%; /* New */
}
.social-icons a:is(:hover, :focus-visible) { color: var(--color-dark-accent); transform: scale(1.1); }
.footer-legal {
    border-top: 1px solid var(--color-dark-border);
    padding: 2rem 0;
    text-align: center;
}
.footer-legal p { font-size: 0.9rem; color: var(--color-footer-muted); margin: 0; }
.footer-legal-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-legal-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.5rem; /* Vertical and horizontal gap */
}

.footer-legal-nav a {
    color: var(--color-footer-muted);
    transition: color var(--transition);
}

.footer-legal-nav a:hover {
    color: var(--dark-accent);
    text-decoration: underline;
}

/* On tablets and larger, show copyright and links on the same line */
@media (min-width: 768px) {
    .footer-legal-container {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* --- Footer Payment Icons --- */
.footer-payment {
    margin-top: 1.5rem; /* Add space above the payment icons */
}

.payment-icons-list {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align icons to the left */
    gap: 0.5rem; /* Tighter gap between items */
    flex-wrap: wrap;
}

/* The new container for each icon */
.payment-icon-item {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;  /* Uniform width for each icon's 'slot' */
    height: 38px; /* Uniform height for each icon's 'slot' */
    background-color: #FFFFFF;
    border-radius: 4px;
    padding: 5px;
    box-sizing: border-box;
}

/* The image now fits inside its new container */
.payment-icon-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
}

/* 9. Animations - Scroll & Hover Effects */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--transition), transform 0.8s var(--transition);
}
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* 10. Media Queries - Responsive Breakpoints */
/* Tablet */
@media (min-width: 768px) {
    .desktop-nav { display: flex; align-items: center; gap: 2rem; }
    .mobile-menu-toggle { display: none; }

    .feature-grid {
        grid-template-columns: 1fr 1fr;
    }
    .feature-grid.layout-reversed .feature-image {
        grid-column: 2 / 3;
        grid-row: 1 / 2;
    }
    .feature-grid.layout-reversed .feature-content {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }

    .contact-form button { width: auto; }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-container { grid-template-columns: 2fr 1fr 1fr; text-align: left; }
    .footer-contact li, .social-icons { justify-content: flex-start; }
}

/* Desktop */
@media (min-width: 1024px) {
    .pricing-grid { grid-template-columns: repeat(3, 1fr); }
    .articles-grid { grid-template-columns: repeat(3, 1fr); }
    /* The slider navigation is now visible on desktop for better usability. */
}


/* 11. ACCESSIBILITY STYLES */
/* ================================================== */

/* Hides element visually but keeps it accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* "Skip to Content" link styling */
.skip-to-content {
    position: absolute;
    top: -100px;
    left: 0;
    background-color: var(--color-accent);
    color: var(--dark-bg);
    padding: 1rem 1.5rem;
    z-index: 9999;
    transition: top var(--transition);
    font-weight: 600;
}

.skip-to-content:focus {
    top: 0;
}

/* ==================================================
   12. NO-JS FALLBACKS
   ================================================== */

/* When JS is disabled, ensure essential content is visible and usable. */

/* FAQ: Display all answers statically */
.no-js .faq-answer-wrapper {
    grid-template-rows: 1fr;
}
.no-js .faq-answer {
    padding-top: 0.5rem;
    padding-bottom: 1.5rem;
}
.no-js .faq-icon {
    display: none; /* Hide the +/- icon that requires JS */
}
.no-js .faq-question-btn {
    cursor: default;
}
.no-js .faq-question-btn:hover {
    color: var(--color-heading);
}

/* Mobile Menu: Hide the hamburger button and display links as a static list */
.no-js .mobile-menu-toggle,
.no-js .close-menu-btn,
.no-js #menu-overlay {
    display: none;
}

.no-js #mobile-menu {
    position: static;
    transform: none;
    height: auto;
    width: 100%;
    padding: 1rem 0;
    margin: 0 auto;
    box-shadow: none;
    background-color: transparent;
    border-top: 1px solid var(--color-border);
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem 2rem;
    display: flex !important; /* This ensures it overrides the 'hidden' attribute */
}

.no-js #mobile-menu a {
    font-size: 1rem;
    font-weight: 600;
}

.no-js .slider-nav {
    display: none; /* Hide the JS-powered buttons */
}

/* Hide theme toggle as it's purely JS-driven */
.no-js .theme-toggle {
    display: none;
}

/* ==================================================
   13. ACCESSIBILITY - REDUCED MOTION
   ================================================== */

@media (prefers-reduced-motion: reduce) {
    /* Turn off all transitions and animations */
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    /* Reset hover effects */
    .card:hover {
        transform: none;
    }

    .button:hover {
        transform: none;
    }

    .read-more:hover i {
        transform: none;
    }

    /* Make scroll-animated elements visible by default */
    .animate-on-scroll {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Style for the active link in a Table of Contents */
.toc-link.active {
    color: var(--color-accent);
    font-weight: 700;
}