/* ============================================
   RSL Showcase Landing - Custom Styles
   A comprehensive landing page showcasing 25+ RSL components
   ============================================ */

/* ============================================
   CSS Variables / Theme
   ============================================ */
:root {
    /* Primary Colors */
    --template-primary: #3B82F6;
    --template-primary-dark: #2563EB;
    --template-primary-light: #60A5FA;

    /* Accent Colors */
    --template-accent: #8B5CF6;
    --template-accent-dark: #7C3AED;
    --template-accent-light: #A78BFA;

    /* Success/Status Colors */
    --template-success: #10B981;
    --template-warning: #F59E0B;
    --template-danger: #EF4444;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    --gradient-hero: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 50%, #EC4899 100%);
    --gradient-cta: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    --gradient-dark: linear-gradient(135deg, #1F2937 0%, #111827 100%);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --section-padding: 5rem;
    --section-padding-mobile: 3rem;
}

/* ============================================
   Base Styles
   ============================================ */
body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
}

/* ============================================
   Section Utilities
   ============================================ */
.section-padding {
    padding: var(--section-padding) 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #6B7280;
    max-width: 600px;
    margin: 0 auto;
}

.bg-light {
    background-color: #F9FAFB;
}

.bg-dark-gradient {
    background: var(--gradient-dark);
}

.bg-cta-gradient {
    background: var(--gradient-cta);
}

/* ============================================
   Hero Enhancements
   ============================================ */
.rsl-hero {
    background: var(--gradient-hero);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.rsl-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.rsl-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.rsl-hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.rsl-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.rsl-hero-features {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.rsl-hero-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.rsl-hero-feature i {
    color: #10B981;
}

.rsl-hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    opacity: 0.7;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    text-decoration: none;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ============================================
   KPI Cards Enhancements
   ============================================ */
.rsl-kpi-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.rsl-kpi-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.rsl-kpi-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1F2937;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.rsl-kpi-label {
    font-size: 0.875rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   Logo Carousel
   ============================================ */
.logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* ============================================
   Feature Cards
   ============================================ */
.feature-card {
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.feature-card .rsl-card-header {
    padding: 1.5rem 1.5rem 0;
    border-bottom: none;
}

.feature-card .rsl-card-body {
    padding: 1rem 1.5rem 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #1F2937;
}

.feature-card p {
    color: #6B7280;
    margin: 0;
    font-size: 0.9375rem;
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

/* Tooltip trigger in feature cards */
.tooltip-trigger {
    color: var(--template-primary);
    cursor: help;
    margin-left: 0.25rem;
}

/* ============================================
   Video Container
   ============================================ */
.video-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Gallery Enhancements
   ============================================ */
.rsl-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.rsl-gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.rsl-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.rsl-gallery-item:hover img {
    transform: scale(1.05);
}

.rsl-gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-weight: 600;
}

.rsl-gallery-item:hover .rsl-gallery-overlay {
    opacity: 1;
}

/* ============================================
   Off-Canvas Enhancements
   ============================================ */
.feature-category {
    margin-bottom: 2rem;
}

.feature-category h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--template-primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-category li {
    padding: 0.5rem 0;
    color: #4B5563;
    border-bottom: 1px solid #E5E7EB;
    font-size: 0.9375rem;
}

.feature-category li:last-child {
    border-bottom: none;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
    background: #1F2937;
    color: #9CA3AF;
    padding: 4rem 0 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    color: white;
}

.footer-description {
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    max-width: 280px;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #9CA3AF;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--template-primary);
    color: white;
}

.footer-heading {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #9CA3AF;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    margin: 0 0 0.5rem;
    font-size: 0.875rem;
}

.footer-credit a {
    color: var(--template-primary-light);
    text-decoration: none;
}

.footer-credit a:hover {
    text-decoration: underline;
}

/* ============================================
   Form Styles
   ============================================ */
.rsl-form-group {
    margin-bottom: 1rem;
}

.rsl-form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #374151;
}

.rsl-form-input,
.rsl-form-select,
.rsl-form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.rsl-form-input:focus,
.rsl-form-select:focus,
.rsl-form-textarea:focus {
    outline: none;
    border-color: var(--template-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.rsl-form-textarea {
    resize: vertical;
}

/* ============================================
   Button Enhancements
   ============================================ */
.btn {
    font-family: var(--font-family);
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--template-primary);
    border-color: var(--template-primary);
}

.btn-primary:hover {
    background: var(--template-primary-dark);
    border-color: var(--template-primary-dark);
}

.btn-outline-primary {
    color: var(--template-primary);
    border-color: var(--template-primary);
}

.btn-outline-primary:hover {
    background: var(--template-primary);
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 1024px) {
    .rsl-hero-title {
        font-size: 2.75rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: var(--section-padding-mobile) 0;
    }

    .rsl-hero-title {
        font-size: 2.25rem;
    }

    .rsl-hero-subtitle {
        font-size: 1.125rem;
    }

    .rsl-hero-features {
        flex-direction: column;
        gap: 0.75rem;
    }

    .rsl-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .rsl-gallery-item img {
        height: 120px;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .rsl-hero-title {
        font-size: 1.875rem;
    }

    .rsl-hero-actions {
        flex-direction: column;
    }

    .rsl-hero-actions .btn {
        width: 100%;
    }
}

/* ============================================
   Modal Fixes
   ============================================ */
.modal-container .close-modal {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6B7280;
    padding: 0.25rem 0.5rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-container .close-modal:hover {
    color: #1F2937;
}

.modal-header {
    padding: 1rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

/* Video modal - remove padding when video is full width */
#demo-modal .modal-body {
    padding: 0;
}

/* ============================================
   Tabs Styling
   ============================================ */
.tabs-display .slot-layout.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #E5E7EB;
    padding-bottom: 0;
}

.tabs-display .slot-item.tab-link {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #6B7280;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.tabs-display .slot-item.tab-link:hover {
    color: var(--template-primary);
}

.tabs-display .slot-item.tab-link.active {
    color: var(--template-primary);
    border-bottom-color: var(--template-primary);
}

.tabs-display .slot-layout.tabs-content {
    display: block;
}

.tabs-display .slot-item.tab-content {
    display: none;
}

.tabs-display .slot-item.tab-content.active {
    display: block;
}

/* ============================================
   Form Input Box Sizing
   ============================================ */
.rsl-form-input,
.rsl-form-select,
.rsl-form-textarea {
    box-sizing: border-box;
}

/* ============================================
   Dark Mode Support
   ============================================ */
[data-theme="dark"] body {
    background: #111827;
    color: #E5E7EB;
}

[data-theme="dark"] .bg-light {
    background: #1F2937;
}

[data-theme="dark"] .section-subtitle {
    color: #9CA3AF;
}

[data-theme="dark"] .rsl-kpi-card {
    background: #1F2937;
    border: 1px solid #374151;
}

[data-theme="dark"] .rsl-kpi-value {
    color: #F9FAFB;
}

[data-theme="dark"] .rsl-kpi-label {
    color: #9CA3AF;
}

[data-theme="dark"] .feature-card {
    background: #1F2937;
    border: 1px solid #374151;
}

[data-theme="dark"] .feature-card h3 {
    color: #F9FAFB;
}

[data-theme="dark"] .feature-card p {
    color: #9CA3AF;
}

/* Fix tabs content wrapper background in dark mode */
[data-theme="dark"] .tabs-display .slot-layout.tabs-content {
    background: transparent;
}

[data-theme="dark"] .tabs-display .slot-item.tab-content {
    background: transparent;
}

/* Dark mode cards - subtle styling that blends with page */
[data-theme="dark"] .rsl-card {
    background: rgba(31, 41, 55, 0.5);
    border: 1px solid rgba(75, 85, 99, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .rsl-card:hover {
    background: rgba(31, 41, 55, 0.8);
    border-color: rgba(75, 85, 99, 0.5);
}

[data-theme="dark"] .feature-category li {
    color: #D1D5DB;
    border-bottom-color: #374151;
}

[data-theme="dark"] .rsl-form-label {
    color: #E5E7EB;
}

[data-theme="dark"] .rsl-form-input,
[data-theme="dark"] .rsl-form-select,
[data-theme="dark"] .rsl-form-textarea {
    background: #374151;
    border-color: #4B5563;
    color: #F9FAFB;
}

[data-theme="dark"] .rsl-form-input::placeholder,
[data-theme="dark"] .rsl-form-textarea::placeholder {
    color: #9CA3AF;
}

[data-theme="dark"] .site-footer {
    background: #0F172A;
}

/* Dark mode modal close button */
[data-theme="dark"] .modal-container .close-modal {
    background: transparent !important;
    color: #9CA3AF;
}

[data-theme="dark"] .modal-container .close-modal:hover {
    color: #F9FAFB;
}

[data-theme="dark"] .modal-container .modal {
    background: #1F2937;
    border: 1px solid #374151;
}

[data-theme="dark"] .modal-container .modal-header {
    border-bottom-color: #374151;
}

[data-theme="dark"] .modal-container .modal-header h3 {
    color: #F9FAFB;
}

/* Dark mode tabs */
[data-theme="dark"] .tabs-display .slot-layout.tabs {
    border-bottom-color: #374151;
}

[data-theme="dark"] .tabs-display .slot-item.tab-link {
    color: #9CA3AF;
}

[data-theme="dark"] .tabs-display .slot-item.tab-link:hover {
    color: var(--template-primary-light);
}

[data-theme="dark"] .tabs-display .slot-item.tab-link.active {
    color: var(--template-primary-light);
    border-bottom-color: var(--template-primary-light);
}

/* Dark mode off-canvas */
[data-theme="dark"] .off-canvas {
    background: #1F2937;
    border-left-color: #374151;
}

[data-theme="dark"] .off-canvas-header {
    border-bottom-color: #374151;
}

[data-theme="dark"] .off-canvas-title {
    color: #F9FAFB;
}

[data-theme="dark"] .off-canvas-close {
    color: #9CA3AF;
}

[data-theme="dark"] .off-canvas-close:hover {
    color: #F9FAFB;
}

/* ============================================
   Accessibility Enhancements
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .rsl-hero {
        animation: none;
    }

    .rsl-hero-scroll-indicator {
        animation: none;
    }

    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Focus visible states */
.btn:focus-visible,
.rsl-form-input:focus-visible,
.rsl-form-select:focus-visible,
.rsl-form-textarea:focus-visible {
    outline: 2px solid var(--template-primary);
    outline-offset: 2px;
}

a:focus-visible {
    outline: 2px solid var(--template-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--template-primary);
    color: white;
    padding: 0.5rem 1rem;
    z-index: 100;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}
