/* Dark Mode Styles - 2025 */

/* Dark mode variables */
[data-theme="dark"] {
    --color-primary: #f87171;
    --color-primary-dark: #ef4444;
    --color-primary-light: #fca5a5;
    
    --color-dark: #f8fafc;
    --color-gray-900: #f1f5f9;
    --color-gray-800: #e2e8f0;
    --color-gray-700: #cbd5e1;
    --color-gray-600: #94a3b8;
    --color-gray-500: #64748b;
    --color-gray-400: #475569;
    --color-gray-300: #334155;
    --color-gray-200: #1e293b;
    --color-gray-100: #0f172a;
    --color-white: #0a0f1e;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] body {
    background: #0a0f1e;
    color: #e2e8f0;
}

[data-theme="dark"] .header {
    background: #1e293b;
    border-bottom-color: #334155;
}

[data-theme="dark"] .topmenu {
    background: #0f172a;
    border-bottom-color: #1e293b;
}

[data-theme="dark"] ul.top li a,
[data-theme="dark"] ul.topright li a {
    color: #cbd5e1;
}

[data-theme="dark"] ul.top li a:hover,
[data-theme="dark"] ul.topright li a:hover {
    color: #f87171;
}

[data-theme="dark"] nav ul li a {
    color: #cbd5e1;
}

[data-theme="dark"] nav ul li a:hover,
[data-theme="dark"] nav ul li.active a {
    color: #f87171;
}

[data-theme="dark"] .footer {
    background: #0f172a;
    border-top-color: #1e293b;
}

[data-theme="dark"] .panel.callout {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .box {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .dividerimg {
    background: linear-gradient(90deg, transparent, #334155 20%, #334155 80%, transparent);
}

[data-theme="dark"] hr.black {
    border-color: #334155;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--color-gray-800);
    color: var(--color-gray-200);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    z-index: 1000;
}

.dark-mode-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.dark-mode-toggle:active {
    transform: scale(0.95);
}

/* Icon animation */
.dark-mode-toggle .icon {
    transition: transform 0.3s ease, opacity 0.3s ease;
    width: 24px;
    height: 24px;
}

.dark-mode-toggle:hover .icon {
    transform: rotate(20deg) scale(1.1);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .dark-mode-toggle {
        width: 50px;
        height: 50px;
        bottom: 1rem;
        right: 1rem;
        font-size: 20px;
    }
}

/* Smooth transitions for theme change */
body,
.header,
.topmenu,
.footer,
.panel,
.box,
nav ul li a,
h1, h2, h3, h4, h5, h6,
p, a {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Dark mode specific content styles */
[data-theme="dark"] .content-body {
    color: #cbd5e1;
}

[data-theme="dark"] .content-body h2,
[data-theme="dark"] .content-body h3,
[data-theme="dark"] .content-body h4 {
    color: #f1f5f9;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: #f1f5f9;
}

[data-theme="dark"] .content-body img {
    opacity: 0.9;
    border-radius: var(--radius-lg);
}

[data-theme="dark"] .breadcrumbs {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .breadcrumbs li a {
    color: #cbd5e1;
}

[data-theme="dark"] .breadcrumbs li a:hover {
    color: #f87171;
}

/* Dark mode price boxes */
[data-theme="dark"] div.panel.blue {
    background: linear-gradient(135deg, #0c4a6e 0%, #075985 100%);
}

[data-theme="dark"] div.panel.green {
    background: linear-gradient(135deg, #065f46 0%, #047857 100%);
}

[data-theme="dark"] div.panel.orange {
    background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
}

/* Dark mode buttons */
[data-theme="dark"] .button {
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .button:hover {
    box-shadow: var(--shadow-lg);
}

/* Dark mode feature icons - invertir para que se vean */
[data-theme="dark"] div.featureimg {
    filter: invert(1) brightness(1.2);
}

[data-theme="dark"] div.featureimg:hover {
    filter: invert(1) brightness(1.4);
}

/* Dark mode buttons en price boxes - mejor contraste */
[data-theme="dark"] div.panel.blue .button,
[data-theme="dark"] div.panel.green .button,
[data-theme="dark"] div.panel.orange .button {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] div.panel.blue .button:hover,
[data-theme="dark"] div.panel.green .button:hover,
[data-theme="dark"] div.panel.orange .button:hover {
    background: #ffffff;
    color: #0a0f1e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Callout button en dark mode */
[data-theme="dark"] .panel.callout .button {
    background: #f87171;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(248, 113, 113, 0.3);
}

[data-theme="dark"] .panel.callout .button:hover {
    background: #ef4444;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Dark mode navigation dropdowns (submenus) */
[data-theme="dark"] nav ul li:hover ul {
    background-color: #1e293b;
    border-top-color: #f87171;
    border-right-color: #334155;
    border-bottom-color: #334155;
    border-left-color: #334155;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] nav ul li:hover ul li {
    border-top-color: #334155;
}

[data-theme="dark"] nav ul li:hover ul li a {
    color: #cbd5e1;
}

[data-theme="dark"] nav ul li:hover ul li a:hover {
    color: #f87171;
}

[data-theme="dark"] nav ul li:hover ul li span {
    color: #64748b;
}
