/* Modern Theme Overrides */

:root {
    --primary-color: #0066ff;
    --primary-dark: #0052cc;
    --secondary-color: #00d9ff;
    --accent: #ff6b35;
    --bg-light: #f8f9fa;
    --text-dark: #1a1a1a;
    --text-muted: #666666;
    --border-color: #e0e0e0;
}

/* Navbar - override to white for modern clean look */
nav.bg-dark {
    background: #ffffff !important;
    background-color: #ffffff !important;
}

/* Explicit dark sections (video, CTA card) stay dark */
.app-section-dark {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%) !important;
}

/* header.bg-dark (hero) treated as light */
header.bg-dark {
    background: linear-gradient(180deg, #f5f5f5 0%, #ffffff 100%) !important;
    background-color: transparent !important;
}

/* Footer - Keep dark background with white text */
footer.bg-dark {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer.bg-dark .text-white {
    color: #ffffff !important;
}

/* Text colors on light hero header sections */
header.bg-dark .display-5,
header.bg-dark h1,
header.bg-dark h2,
header.bg-dark h3 {
    color: var(--text-dark) !important;
}

header.bg-dark .text-white {
    color: var(--text-dark) !important;
}

header.bg-dark .text-white-50 {
    color: var(--text-muted) !important;
}

nav.navbar {
    background: #ffffff !important;
    background-color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.navbar-dark .navbar-brand {
    color: var(--text-dark) !important;
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-dark .nav-link {
    color: var(--text-muted) !important;
    transition: color 0.3s ease;
}

.navbar-dark .nav-link:hover {
    color: var(--primary-color) !important;
}

.navbar-toggler {
    border: none;
    outline: none;
}

/* Hero Background Gradients */
.bg-light {
    background: #f0f0f0 !important;
}

/* EXPLICIT SECTION ALTERNATION PATTERN - WORKS FOR BOTH PAGES */
/* Nav is child 1, so sections start at child 2 */
/* Pattern: Gray (2), White (3), Gray (4), White (5), Gray (6)... */

/* Set base section background to white */
section.py-5 {
    background-color: #ffffff !important;
}

/* Sections at even child positions (2, 4, 6, 8...) = Light Gray (Theme Gray) */
/* These are: Hero, Apps Grid, Story, etc. */
main > *:nth-child(2) {
    background-color: #f8f9fa !important;
}
main > *:nth-child(4) {
    background-color: #f8f9fa !important;
}
main > *:nth-child(6) {
    background-color: #f8f9fa !important;
}
main > *:nth-child(8) {
    background-color: #f8f9fa !important;
}
main > *:nth-child(10) {
    background-color: #f8f9fa !important;
}

/* Sections at odd child positions (3, 5, 7, 9...) = White */
/* These are: Stats, Common DNA, Footer link, etc. */
main > *:nth-child(3) {
    background-color: #ffffff !important;
}
main > *:nth-child(5) {
    background-color: #ffffff !important;
}
main > *:nth-child(7) {
    background-color: #ffffff !important;
}
main > *:nth-child(9) {
    background-color: #ffffff !important;
}
main > *:nth-child(11) {
    background-color: #ffffff !important;
}

/* Override for bg-light (hero) sections - they use theme gray */
section.bg-light {
    background-color: #f8f9fa !important;
}

/* CTA sections with bg-primary keep their gradient */
section.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

/* Card Styling */
.card {
    border: 1px solid var(--border-color) !important;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1) !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 102, 255, 0.3);
}

.btn-outline-secondary {
    border-radius: 8px;
    font-weight: 600;
    border-width: 2px;
}

.btn-outline-light {
    border-radius: 8px;
    font-weight: 600;
    border-width: 2px;
}

.btn-outline-light:hover {
    background-color: #ffffff;
    color: var(--text-dark);
}

/* Badge Styling */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: #6c757d !important;
}

.badge {
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.85rem;
}

/* Feature Icons - More subtle colors */
.feature {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    font-size: 1.75rem;
    border-radius: 12px;
    background-color: #e3f2fd !important;
    color: var(--primary-color) !important;
}

.feature.bg-primary {
    background-color: #e3f2fd !important;
    color: var(--primary-color) !important;
}

.feature.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

/* Text Colors */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    font-weight: 500 !important;
}

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

/* Pricing Cards */
.border-primary {
    border-color: var(--primary-color) !important;
}

/* Input Fields */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 255, 0.25);
}

/* Section Heading */
.display-4, .display-5, .display-6 {
    font-weight: 500 !important;
    color: var(--text-dark);
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

.link-light {
    color: #ffffff !important;
}

.link-light:hover {
    color: var(--secondary-color) !important;
}

/* Alert styling */
.alert-light {
    background-color: #f8f9fa !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px;
}

/* Lead text */
.lead {
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.6;
}

/* Gradient backgrounds */
.bg-primary.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .btn {
        font-size: 0.95rem;
    }
}

/* Smooth transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Remove default transition from interactive elements for better control */
button, a.btn, input {
    transition: all 0.3s ease;
}

/* Appcento Brand Logo */
.cyra-logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 7px;
    flex-shrink: 0;
}

.cyra-logo-text {
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
    color: var(--text-dark);
    line-height: 1;
}

nav.navbar .cyra-logo-text {
    color: var(--text-dark) !important;
}

/* Navbar toggler icon - dark hamburger on white navbar */
nav.navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2826, 26, 26, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

nav.navbar .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Prevent horizontal overflow from flex/image containers on mobile */
body {
    overflow-x: hidden;
}

.thumbnail-strip {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* FAQ Accordion - Subtle active state (Global) */
.accordion-button:not(.collapsed) {
    color: var(--text-dark) !important;
    background-color: rgba(0, 102, 255, 0.06) !important;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.06) !important;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.15rem rgba(0, 102, 255, 0.12) !important;
    border-color: rgba(0, 102, 255, 0.2) !important;
    outline: none;
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%230066ff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e") !important;
}

/* Rounded-4 utility */
.rounded-4 {
    border-radius: 1rem !important;
}

/* "by Appcento" label in app nav */
.nav-by-cyra {
    font-size: 0.7rem;
    opacity: 0.6;
    letter-spacing: 0.02em;
}

/* Modern CTA Section - clean light blue tinted card */
.cta-section {
    background: linear-gradient(135deg, #eef2ff 0%, #e0f2fe 100%);
    border: 1px solid rgba(0, 102, 255, 0.15);
    border-radius: 1rem;
}

/* ===================================================
   PLACEHOLDER-SAFE IMAGE SIZING
   These classes lock images into the correct dimensions
   so swapping in real images needs no image editor.
   aspect-ratio + object-fit: cover handles any real
   image that isn't exactly the right proportions.
=================================================== */

/* Hero screenshot: 900×506 (16:9) */
.img-hero {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    max-width: 900px;
}

/* App / content card preview: 600×400 (3:2) */
.img-card-preview {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

/* Pain bridge / before-after comparison: 500×400 */
.img-compare {
    width: 100%;
    aspect-ratio: 5 / 4;
    object-fit: cover;
}

/* Full-width demo / video poster: 1280×720 (16:9) */
.img-demo-full {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Demo thumbnail strip items: 200×120 */
.img-thumb {
    width: 200px;
    height: 120px;
    object-fit: cover;
}

/* Avatar / testimonial portrait: 48×48 */
.img-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    object-fit: cover;
}

/* Blog hero / article header image: 800×400 or 900×450 (2:1) */
.img-blog-hero {
    width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
}
