:root {
  --bs-font-sans-serif: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
  /* Light Theme (Cobalt-based) */
  --background-primary: #f5f9fc; /* Very light blue-gray, slightly lighter */
  --background-primary-gradient: linear-gradient(to bottom right, #f0f4f8, #e0e7ed); /* Subtle gradient for light theme */
  --background-secondary: #e0e7ed; /* Light blue-gray */
  --text-primary: #1a2a3a; /* Dark blue-gray for text */
  --text-secondary: #4a6a8a; /* Medium blue-gray for secondary text */
  --accent-color: #0047ab; /* Classic Cobalt Blue */
  --card-background: #ffffff; /* White cards */
  --card-border: #c0d0e0; /* Light blue border */
  --nav-background: #003366; /* Darker Cobalt for nav */
  --nav-text: #e0e7ed; /* Light text for nav */
  --nav-text-hover: #ffffff; /* White text on hover for nav */
  --navbar-brand-color: #ffffff; /* White for brand in light nav */
  --theme-switcher-border: var(--nav-text); /* Border color for switcher */
  --theme-switcher-color: var(--nav-text); /* Color for emoji */
  --theme-switcher-hover-border: var(--nav-text-hover); /* Hover border color */
  --theme-switcher-hover-color: var(--nav-text-hover); /* Hover emoji color */
  --theme-switcher-hover-bg-cobalt: #0047ab; /* Cobalt for hover background */

    /* Original file_organizer_script variables, adjusted to new theme */
    --primary-color: var(--accent-color); /* Use accent color for primary */
    --primary-hover: #0056b3; /* Keep original hover or adjust if needed */
    --text-color: var(--text-primary);
    --bg-color: var(--background-primary);
    --border-color: var(--card-border);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    font-family: var(--bs-font-sans-serif);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: var(--card-background);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.8; /* Original file_organizer_script line height */
    margin: 0;
    padding: 0;
}

main {
    flex-grow: 1;
    padding: 0;
}

body.dark-theme {
  /* Dark Theme (Cobalt-based) */
  --background-primary: #0a1a2a; /* Very dark blue */
  --background-primary-gradient: linear-gradient(to bottom right, #0a1a2a, #1a2a3a); /* Subtle gradient for dark theme */
  --background-secondary: #1a2a3a; /* Dark blue */
  --text-primary: #e0e7ed; /* Light blue-gray for text */
  --text-secondary: #8a9aaa; /* Muted light blue-gray for secondary text */
  --accent-color: #3b82f6; /* Brighter blue for accent */
  --card-background: #1a2a3a; /* Dark blue cards */
  --card-border: #2a3a4a; /* Slightly lighter dark blue border */
  --nav-background: #0a1a2a; /* Very dark blue for nav */
  --nav-text: #8a9aaa; /* Muted light text for nav */
  --nav-text-hover: #ffffff; /* White text on hover for nav */
  --navbar-brand-color: #ffffff; /* White for brand in dark nav */
  --theme-switcher-border: var(--nav-text); /* Border color for switcher */
  --theme-switcher-color: var(--nav-text); /* Color for emoji */
  --theme-switcher-hover-border: var(--nav-text-hover); /* Hover border color */
  --theme-switcher-hover-color: var(--nav-text-hover); /* Hover emoji color */
  --theme-switcher-hover-bg-cobalt: #3b82f6; /* Brighter Cobalt for hover background in dark mode */

    /* Original file_organizer_script variables, adjusted for dark theme */
    --primary-color: var(--accent-color);
    --primary-hover: #0056b3; /* Adjust if a darker hover is desired for dark theme */
    --text-color: var(--text-primary);
    --bg-color: var(--background-primary);
    --border-color: var(--card-border);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
}

.navbar {
    background-color: var(--nav-background) !important;
}

.navbar-brand {
    color: var(--navbar-brand-color) !important; /* Apply brand color */
}

.nav-link {
    color: var(--nav-text) !important;
}

.nav-link:hover {
    color: var(--nav-text-hover) !important;
}

.theme-switcher-btn {
    background-color: transparent; /* Remove background */
    border: none; /* Remove border */
    color: var(--theme-switcher-color); /* Color of the emoji */
    transition: all 0.3s ease; /* Smooth transitions for all properties */
    transform: translateY(-1px);
}

.theme-switcher-btn:hover {
    background-color: var(--theme-switcher-hover-bg-cobalt); /* Background on hover, using new Cobalt color */
    border-color: var(--theme-switcher-hover-bg-cobalt); /* Border color on hover */
    color: var(--theme-switcher-hover-color); /* Emoji color on hover */
}

.language-switcher-links {
    display: flex;
    align-items: center;
    padding: 0.5rem; /* Match nav-link padding */
    color: var(--nav-text) !important;
}

.language-switcher-links a {
    color: var(--nav-text) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.language-switcher-links a:hover {
    color: var(--nav-text-hover) !important;
}

.center-text {
    text-align: center;
}


.banner-container {
    background: linear-gradient(to right, #030207 20%, #051537 60%, #02255C 80%, #010A18 95%, #000205 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

.banner-container img {
    max-height: 350px;
    width: auto;
    -webkit-mask-image: linear-gradient(to right, black 94%, transparent 100%);
    mask-image: linear-gradient(to right, black 94%, transparent 100%);
    transform: translateX(-50px);
}

.hero-intro {
    background: var(--background-secondary);
    padding: 60px 0; 
    margin-top: 50px;
    text-align: center;
}

.hero-intro p {
    font-size: 1.15em;
    max-width: 600px;
    margin: 0 auto 30px;
}

.cta-button, #developer a {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 15px 30px;
    font-size: 1em;
    font-weight: 500;
    border-radius: 50px;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.3s;
    box-shadow: var(--shadow);
}

.cta-button:hover, #developer a:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

section {
    padding: 50px 0;
}

h1 {
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 60px;
    position: relative;
    color: var(--text-primary); /* Use themed text color */
}

h2 {
    text-align: center;
    font-size: 1.6em;
    margin-bottom: 60px;
    position: relative;
    color: var(--text-primary); /* Use themed text color */
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 20px auto 0;
}

/* --- Features Section --- */
#features {
    padding-top: 160px;
}

#features .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    text-align: center;
}

.feature {
    background: var(--background-secondary);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature h3 {
    font-size: 1.1em;
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* --- Before & After Section --- */
#before-after {
    background: var(--background-primary);
    border-radius: 8px;
    padding: 40px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    text-align: center;
}

.comparison-item h3 {
    font-size: 1.2em;
    color: var(--primary-color);
}

.comparison-item img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 15px;
}

/* --- How It Works (Screenshot Showcase) --- */
#how-it-works {
    padding: 160px 0 90px 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 60px;
    margin-bottom: 80px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.8s forwards;
}

/* Staggered animation for steps */
.step:nth-child(2) {
    animation-delay: 0.2s;
}

.step:nth-child(3) {
    animation-delay: 0.4s;
}

.step:nth-child(4) {
    animation-delay: 0.6s;
}

.step:nth-child(5) {
    animation-delay: 0.8s;
}

/* Alternating layout */
.step:nth-child(even) {
    flex-direction: row-reverse;
}

.step-text {
    flex: 1;
}

.step-text h3 {
    font-size: 1.4em;
    margin-bottom: 20px;
}

.step-img {
    flex: 1;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.step-img img {
    width: 100%;
    height: auto;
    display: block;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Local-trust Section --- */
#local-trust {
    background: var(--background-primary);
    border-radius: 8px;
    padding: 50px 40px;
    margin-bottom: 50px;
    text-align: center;
}

/* --- Developer Section --- */
#developer {
    background: var(--background-secondary);
    border-radius: 8px;
    padding: 90px 20px;
    margin-bottom: 20px;
    text-align: center;
}

#developer p {
    margin-bottom: 20px;
}

footer a {
    color: var(--nav-text);
    text-decoration: none;
}

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

/* --- Responsive --- */
@media (max-width: 768px) {
    .banner-container img {
        max-height: 180px;      /* Smaller height for mobile screens */
        width: 90%;             /* Don't let it touch the edges */
        object-fit: contain;
        margin: 0 auto;
    }

    .step {
        flex-direction: column !important; /* Stack screenshots on top of text */
        gap: 30px;
        text-align: center;
    }

    .comparison-grid {
        grid-template-columns: 1fr; /* Stack "Before" and "After" images */
    }
}

/* Contact Form Styles */
form {
    margin: 60px auto 50px;
    padding: 20px;
    border: 1px solid var(--border-color); /* Use themed border color */
    border-radius: 8px;
    background-color: var(--card-background); /* Use themed background color */
}

form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--text-primary); /* Use themed text color */
}

form input[type="text"],
form input[type="email"],
form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color); /* Use themed border color */
    border-radius: 5px;
    box-sizing: border-box; /* Ensures padding doesn't increase total width */
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: var(--background-primary); /* Use themed background */
    color: var(--text-primary); /* Use themed text color */
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form textarea:focus {
    border-color: var(--accent-color); /* Use themed accent color */
    outline: none;
}

form textarea {
    resize: vertical; /* Allow vertical resizing */
    min-height: 120px;
}

form input[type="submit"] {
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

form input[type="submit"]:hover {
    background-color: var(--primary-hover);
}

/* Basic Honeypot for spam prevention */
form div[style*="display:none"] {
    display: none;
}


/* FAQ Accordion Styles */
.support-faq {
    margin-top: 50px;
}

.faq-item {
    border-bottom: 1px solid var(--border-color); /* Use themed border color */
    margin-bottom: 5px;
    padding-bottom: 5px;
}

.faq-question {
    cursor: pointer;
    padding: 10px; /* Increased padding */
    font-weight: bold;
    color: var(--text-primary); /* Use themed text color */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--background-secondary); /* Use themed background color */
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.2s ease, color 0.2s ease;
}

h3.faq-question {
    font-size: 1em; /* Adjust for better proportion */
    margin: 0; /* Remove default margin */
}

.faq-question:hover {
    background-color: var(--background-primary); /* Darker background on hover */
    color: var(--text-primary); /* Slightly darker text on hover */
}

.faq-question.active {
    background-color: var(--background-secondary); /* Still light gray background for active question */
    border-bottom-left-radius: 0; /* Remove bottom-left radius when active */
    border-bottom-right-radius: 0; /* Remove bottom-right radius when active */
    color: var(--accent-color); /* Change text color when active to draw more attention */
}

.faq-question::after {
    content: '+';
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.faq-question.active::after {
    content: '-';
    transform: rotate(0deg); /* Reset rotation for '-' */
}

.faq-answer {
    cursor: default; /* Explicitly set default cursor for answer */
    padding: 10px; /* Adjust padding */
    border: 1px solid var(--border-color); /* Add a border */
    border-top: none; /* No top border */
    border-bottom-left-radius: 5px; /* Rounded corners for bottom */
    border-bottom-right-radius: 5px; /* Rounded corners for bottom */
    margin-top: -1px; /* Overlap border with question's bottom border */
    background-color: var(--card-background); /* Slightly different background */
    display: none; /* Hidden by default */
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    max-height: 0; /* For smooth transition */
}

.faq-answer.open {
    display: block; /* Shown when active */
    max-height: 500px; /* Adjust based on expected answer length */
}

.regular-link {
    color: var(--primary-color);
    text-decoration: none;
}

.regular-link:visited {
    color: #8a2be2; /* A shade of purple for visited links */
    text-decoration: none;
}

.regular-link:hover {
    text-decoration: underline;
}

.privacy-container,
.terms-container {
    margin-top: 70px;
}