/* CSS Custom Properties & Core Configurations */
:root {
    --color-athletic-green: #56b151;
    --color-athletic-green-hover: #489943;
    --color-accent-orange: #fe9907;
    --color-charcoal: #111827;
    --color-bg-light: #f9fafb;
    --font-serif: 'Lora', serif;
    --font-sans-brand: 'Rajdhani', sans-serif;
}

body { 
    font-family: var(--font-serif); 
    background-color: var(--color-bg-light);
}

h1, h2, h3, h4, .brand-font { 
    font-family: var(--font-sans-brand); 
    font-weight: 700; 
}

/* Layout Margin Scroll Offsets */
section { scroll-margin-top: 100px; }

/* Custom Scrolling & Hide Helpers */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Hide Google reCAPTCHA v3 Floating Badge (Attribution text provided inside the contact form) */
.grecaptcha-badge {
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Branding Themes and Elements */
.bg-charcoal { background-color: var(--color-charcoal); }
.bg-athletic-green { background-color: var(--color-athletic-green); }
.text-athletic-green { color: var(--color-athletic-green); }
.bg-accent-orange { background-color: var(--color-accent-orange); }
.text-accent-orange { color: var(--color-accent-orange); }
.border-athletic-green { border-color: var(--color-athletic-green); }
.border-accent-orange { border-color: var(--color-accent-orange); }

/* =========================================
    DARK MODE STYLES
    (Move these to your styles.css file)
    ========================================= */

/* Smooth transition for all color flips */
body, header, div, p, h1, h2, h3, h4, h5, h6 {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* 1. Main Background & Text */
html.dark body {
    background-color: #111827; /* Tailwind gray-900 */
    color: #f3f4f6; /* Tailwind gray-100 */
}

/* 2. Sticky Navigation Header */
html.dark header,
html.dark .sticky-nav-header {
    background-color: #111827 !important;
    border-bottom-color: #56b151 !important; /* Keeps your custom athletic green stroke active in dark mode */
}

/* 3. Feature Cards, Panels, and Backgrounds */
/* Targets any element using light gray/white backgrounds */
html.dark .bg-gray-50, 
html.dark .bg-white,
html.dark .bg-feature-bg,
html.dark .bg-\[\#E6F5E8\],
html.dark #features [class*="bg-"] {
    background-color: #1f2937 !important; /* Tailwind charcoal / gray-800 */
    border-color: #374151 !important; /* Tailwind gray-700 */
}

/* 4. Text Color Overrides */
/* Reverses dark text to light text */
html.dark .text-gray-900,
html.dark .text-gray-800,
html.dark .text-gray-700,
html.dark .text-charcoal {
    color: #f9fafb !important; /* Tailwind gray-50 */
}

/* Reverses medium gray text to light gray */
html.dark .text-gray-600, 
html.dark .text-gray-500 {
    color: #9ca3af !important; /* Tailwind gray-400 */
}

/* 5. Specific Modals & Dialogs */
html.dark #modal > div,
html.dark #gallery-modal > div,
html.dark #share-modal > div,
html.dark #contact-modal > div {
        background-color: #1f2937 !important;
        border: 1px solid #374151;
}

/* 6. Form Inputs */
html.dark input, 
html.dark textarea, 
html.dark select {
    background-color: #374151 !important;
    color: #ffffff !important;
    border-color: #4b5563 !important;
}

/* 7. Footer Adjustment */
html.dark footer,
html.dark .footer {
    background-color: #111827 !important; /* Changes light gray to a deep dark gray (gray-900) */
    border-top-color: #1f2937 !important;   /* Darkens the border line at the top of the footer */
}

/* Ensure footer text links invert nicely too */
html.dark footer a {
    color: #9ca3af !important; /* Adjusts links to a readable light gray */
}

html.dark footer a:hover {
    color: var(--color-brand-orange, #fe9907) !important; /* Keeps your hover accents working */
}

.footer-lab-text .vote-link {
    color: #56b151 !important;
}

.footer-lab-text .vote-link:hover {
    color: var(--color-brand-orange, #fe9907) !important;
}

html.dark .footer-lab-text .vote-link {
    color: #56b151 !important;
}

html.dark .footer-lab-text .vote-link:hover {
    color: var(--color-brand-orange, #fe9907) !important;
}

/* 8. Privacy Policy & Terms Modal Text Adjustments */
html.dark #modal h2,
html.dark #modal h3,
html.dark #modal h4,
html.dark #modal strong {
    color: #ffffff !important; /* Crisp white for policy headers and bold text */
}

html.dark #modal p,
html.dark #modal li,
html.dark #modal span,
html.dark #modal .text-gray-700,
html.dark #modal .text-gray-800 {
    color: #e5e7eb !important; /* High-contrast light gray (gray-200) for long paragraphs */
}

html.dark #modal a {
    color: #56b151 !important;
}

html.dark #modal a:hover {
    color: var(--color-brand-orange, #fe9907) !important;
}

/* Ensure share message preview text is ultra crisp and readable in dark mode */
html.dark #share-modal #share-message-preview {
    background-color: #111827 !important;
    color: #f9fafb !important;
    border-color: #374151 !important;
}

/* Ensure #download athletic green border remains athletic green in dark mode */
html.dark #download.border-athletic-green,
html.dark #download.border-2 {
    border-color: var(--color-athletic-green) !important;
}
/*     END DARK MODE STYLES     */


/* Decoupled Static UI Header Component */
.sticky-nav-header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    z-index: 50;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-athletic-green);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Clickable Navigation Logo Header CTA */
.logo-action-btn {
    font-weight: 900;
    font-size: 1.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: var(--font-sans-brand);
    cursor: pointer;
    user-select: none;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.logo-action-btn:hover { opacity: 0.90; }
.logo-action-btn:active { transform: scale(0.95); }
.logo-action-btn:focus { outline: none; }

/* Horizontal Carousel Layout */
.screenshot-carousel {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 2rem 2rem 4.5rem 2rem;
    margin-bottom: -1.75rem;
    scroll-snap-type: x mandatory;
    scroll-padding: 0 2rem;
    -webkit-overflow-scrolling: touch;
}

/* Integrated Custom Image Mockup Card Components */
.screenshot-card {
    height: 500px;
    width: auto;
    aspect-ratio: 1536 / 2752; 
    flex: 0 0 auto; 
    background-color: transparent;
    border-radius: 1.5rem;
    scroll-snap-align: center;
    border: 4px solid #1f2937;
    cursor: pointer;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), border-color 300ms cubic-bezier(0.4, 0, 0.2, 1), box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
/* @media (min-width: 768px) {
    .screenshot-card { min-width: 320px; }
} */
.screenshot-card:hover {
    border-color: var(--color-athletic-green);
    transform: scale(1.05);
    box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.2), 0 0 25px rgba(86, 177, 81, 0.35);
    z-index: 20;
}

/* Screenshot Mask Hover Element Overlay */
.screenshot-mask-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 300ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.screenshot-card:hover .screenshot-mask-overlay { opacity: 1; }

/* View Large Highlight Badge */
.magnify-badge {
    background-color: var(--color-athletic-green);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.screenshot-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Large Screen Centered Wrapper Navigation Base */
.bottom-nav-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--color-charcoal);
    color: #ffffff;
    z-index: 50;
    border-top: 4px solid var(--color-athletic-green);
    box-shadow: 0 -10px 15px -3px rgba(0, 0, 0, 0.1);
}
@media (min-width: 768px) {
    .bottom-nav-wrapper {
        max-width: 64rem;
        margin-left: auto;
        margin-right: auto;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        border-left-width: 2px;
        border-right-width: 2px;
        border-color: var(--color-athletic-green);
    }
}

/* Lightbox Overlay Cover */
.lightbox-window-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 60;
}
.lightbox-window-overlay.active { display: flex; }

/* Modularized Scrollable Content Container */
.policy-modal-card {
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    max-width: 36rem;
    width: 100%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-top: 8px solid var(--color-athletic-green);
}
@media (min-width: 768px) {
    .policy-modal-card { padding: 2.5rem; }
}

.scrollable-body-viewport {
    color: #374151;
    line-height: 1.625;
    margin-bottom: 2rem;
    font-size: 0.875rem;
    overflow-y: auto;
    padding-right: 0.5rem;
    flex-grow: 1;
}

/* Modal Close Action Button */
.modal-close-btn {
    width: 100%;
    background-color: var(--color-athletic-green);
    color: #ffffff;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 150ms ease;
    flex-shrink: 0;
    font-family: var(--font-sans-brand);
}
.modal-close-btn:hover {
    background-color: var(--color-athletic-green-hover);
}

/* Responsive Large Screenshots View Frame Components */
.magnified-phone-container {
    aspect-ratio: 1536 / 2752;
    width: auto;
    max-width: 100%;
    height: 65vh;
    max-height: 580px;
    background-color: transparent;
    border-radius: 1.875rem;
    border: 4px solid #1f2937;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.magnified-phone-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}