/* ==========================================
   90% Content Scaling System
   ========================================== */

/* Main container scaling to 90% */
.container {
    max-width: 90% !important;
    margin-left: auto;
    margin-right: auto;
}

/* Hero and sections scaling */
.hero,
.section,
section {
    max-width: 90vw;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================
   Theme Toggle Button
   ========================================== */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-border);
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all var(--transition-base);
    z-index: 1000;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-xl);
}

/* Light theme icon */
[data-theme="light"] .theme-toggle .dark-icon {
    display: none;
}

[data-theme="light"] .theme-toggle .light-icon {
    display: block;
}

/* Dark theme icon */
[data-theme="dark"] .theme-toggle .light-icon {
    display: none;
}

[data-theme="dark"] .theme-toggle .dark-icon {
    display: block;
}

/* ==========================================
   Beautiful Card Shadows (Light Theme)
   ========================================== */
[data-theme="light"] .card,
[data-theme="light"] .feature-card,
[data-theme="light"] .product-card {
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

[data-theme="light"] .card:hover,
[data-theme="light"] .feature-card:hover,
[data-theme="light"] .product-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

/* ==========================================
   Smooth Theme Transition
   ========================================== */
*,
*::before,
*::after {
    transition: background-color var(--transition-base),
        color var(--transition-base),
        border-color var(--transition-base),
        box-shadow var(--transition-base);
}

/* Disable transition on load */
.no-transition * {
    transition: none !important;
}

/* ==========================================
   Section Dividers - Invisible Spacer
   ========================================== */
.section-divider {
    width: 100%;
    height: 30px;
    margin: var(--space-16) auto;
}

.section-divider::before,
.section-divider::after {
    display: none;
}


/* ==========================================
   Horizontal Accordion Gallery
   ========================================== */
.accordion-gallery {
    display: flex;
    gap: var(--space-4);
    height: 500px;
    margin-top: var(--space-10);
    width: 100%;
}

.accordion-item {
    position: relative;
    flex: 1;
    background: var(--color-bg-elevated);
    /* Fixed variable name */
    border: 2px solid var(--border-color);
    border-radius: 2rem;
    /* Extra rounded */
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.5s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.3s, border 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Dark Mode Overrides for Visibility */
[data-theme="dark"] .accordion-item,
body.dark-theme .accordion-item {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
    /* Contrast border */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    /* Stronger shadow */
}

/* Hover Effect: Expand */
.accordion-item:hover {
    flex: 4;
    /* Expand significantly */
    background: var(--bg-secondary);
    border-color: rgba(255, 255, 255, 0.3);
    border-width: 2px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Dark theme hover - no blue highlight */
[data-theme="dark"] .accordion-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Active/Hover State Content */
.accordion-content {
    padding: var(--space-8);
    opacity: 0;
    /* Hidden by default */
    transform: translateY(20px);
    transition: all 0.3s 0.1s;
    /* Delay for smooth reveal */
    width: 100%;
}

.accordion-item:hover .accordion-content {
    opacity: 1;
    transform: translateY(0);
}

/* Icons always visible */
.accordion-icon-fixed {
    position: absolute;
    top: var(--space-6);
    left: var(--space-6);
    width: 64px;
    height: 64px;
    background: var(--color-bg);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-md);
    z-index: 10;
    transition: all 0.3s;
}

/* Dark theme icon background */
[data-theme="dark"] .accordion-icon-fixed {
    background: rgba(26, 115, 232, 0.7);
    border: 1px solid rgba(26, 115, 232, 0.9);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.accordion-item:hover .accordion-icon-fixed {
    background: var(--color-primary);
    color: white;
    transform: scale(1.1);
}

/* Vertical text for collapsed state */
.vertical-label {
    position: absolute;
    bottom: var(--space-8);
    left: var(--space-8);
    transform-origin: bottom left;
    transform: rotate(-90deg) translate(0, 100%);
    white-space: nowrap;
    font-size: var(--text-xl);
    font-weight: 700;
    opacity: 1;
    transition: opacity 0.3s;
}

.accordion-item:hover .vertical-label {
    opacity: 0;
    /* Hide when expanded */
}

/* Horizontal text for expanded state */
.accordion-title-expanded {
    font-size: var(--text-2xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.accordion-desc {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.6;
    max-width: 500px;
}

/* Responsive: Turn into stack on mobile */
@media (max-width: 1024px) {
    .accordion-gallery {
        flex-direction: column;
        height: auto;
        gap: var(--space-4);
    }

    .accordion-item {
        height: 120px;
        flex: none;
        border-radius: var(--radius-lg);
    }

    .accordion-item:hover {
        height: 300px;
        flex: none;
    }

    .vertical-label {
        transform: none;
        /* Reset rotation */
        bottom: auto;
        top: var(--space-8);
        left: 100px;
        /* Offset from icon */
    }

    .accordion-content {
        margin-top: 60px;
        /* Space for icon */
    }
}