/* 0x0e Project - Custom Styles */

:root {
    --primary-color: #00ff88;
    --secondary-color: #0066cc;
    --accent-color: #ff0066;
    --dark-bg: #0a0f0a;
    --darker-bg: #050a05;
    --card-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #666666;
    --border-color: #333333;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --font-mono: 'Fira Code', 'Courier New', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --bg-gradient-1: #0a0f0a;
    --bg-gradient-2: #0d1a0d;
    --bg-gradient-3: #0a1f0a;
    --icon-color-1: rgba(0, 255, 136, 0.1);
    --icon-color-2: rgba(0, 255, 136, 0.05);
    --icon-color-3: rgba(0, 255, 136, 0.15);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
    background-attachment: fixed;
    background-size: 400% 400%;
    animation: gradientShift 20s ease infinite;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Animated Background Gradient */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Icons Background */
.floating-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    color: var(--icon-color-1);
    font-size: 1.5rem;
    opacity: 0.6;
    animation: float 15s infinite linear;
    pointer-events: none;
    /* Performance optimizations */
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.floating-icon:nth-child(odd) {
    color: var(--icon-color-2);
    animation-duration: 20s;
    animation-direction: reverse;
}

.floating-icon:nth-child(3n) {
    color: var(--icon-color-3);
    animation-duration: 25s;
    font-size: 1.2rem;
}

.floating-icon:nth-child(4n) {
    animation-duration: 18s;
    font-size: 2rem;
    opacity: 0.3;
}

.floating-icon:nth-child(5n) {
    animation-duration: 30s;
    font-size: 1.8rem;
    opacity: 0.4;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Particle System for Extra Effect */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -2;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: particleFloat 10s infinite linear;
    /* Performance optimizations */
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.particle:nth-child(odd) {
    animation-duration: 15s;
    background: rgba(0, 255, 136, 0.2);
}

.particle:nth-child(3n) {
    animation-duration: 12s;
    width: 1px;
    height: 1px;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}

/* Optimización para móviles */
@media (max-width: 768px) {
    .floating-icon {
        font-size: 1.2rem;
        animation-duration: 20s !important;
    }
    
    .floating-icon:nth-child(n+15) {
        display: none; /* Reducir iconos en móvil */
    }
    
    .particle:nth-child(n+10) {
        display: none; /* Reducir partículas en móvil */
    }
    
    body {
        animation-duration: 30s; /* Ralentizar gradiente en móvil */
    }
    
    /* Disable parallax on mobile for better performance */
    .hero-section,
    .project-hero-section,
    .news-hero-section,
    .news-list-header-section,
    .projects-list-header-section {
        background-attachment: scroll !important;
        will-change: auto;
    }
    
    
    
    /* Reduce backdrop-filter on mobile */
    .card {
        backdrop-filter: none;
        transition: none !important;
    }
    
    .card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    .navbar {
        backdrop-filter: blur(5px);
    }
}

/* Optimización para dispositivos de bajo rendimiento */
@media (prefers-reduced-motion: reduce) {
    .floating-icon,
    .particle {
        animation: none;
        opacity: 0.2;
        will-change: auto;
    }
    
    body {
        animation: none;
        background: var(--bg-gradient-1);
    }
    
    .hero-section,
    .project-hero-section,
    .news-hero-section,
    .news-list-header-section,
    .projects-list-header-section {
        will-change: auto;
        background-attachment: scroll;
    }
    
    .card {
        transition: none !important;
        will-change: auto !important;
    }
    
    .card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    .card-img-top {
        transition: none !important;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-mono);
    font-weight: 600;
    line-height: 1.2;
}

.display-1, .display-2, .display-3 {
    font-family: var(--font-mono);
    font-weight: 700;
}

/* Custom Bootstrap Overrides */
.bg-dark {
    background-color: var(--card-bg) !important;
}

.bg-secondary {
    background-color: var(--darker-bg) !important;
}

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

.text-muted {
    color: #e2e8f0 !important; /* Blanco suave en lugar de gris oscuro */
}

.lead {
    color: #f8fafc !important; /* Blanco para texto principal */
}

/* Mejorar legibilidad de textos descriptivos */
p.text-muted,
.text-muted p,
small.text-muted {
    color: #cbd5e1 !important; /* Gris claro legible */
}

/* Hero section text */
.hero-section .lead {
    color: #f1f5f9 !important;
}

/* Card text improvements */
.card-text.text-muted {
    color: #d1d5db !important;
}

/* Footer text */
footer .text-muted {
    color: #9ca3af !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--dark-bg);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--dark-bg);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.btn-outline-light {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background-color: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--dark-bg);
}

/* Navigation */
.navbar {
    background-color: rgba(10, 15, 10, 0.95) !important;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Navbar contraída al hacer scroll */
.navbar.scrolled {
    padding: 0.5rem 0;
    background-color: rgba(10, 15, 10, 0.98) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
}

.navbar.scrolled .navbar-logo {
    max-height: 35px;
}

/* Navbar expandida en la parte superior */
.navbar.at-top {
    padding: 1.2rem 0;
    background-color: rgba(10, 15, 10, 0.9) !important;
    box-shadow: 0 2px 15px rgba(0, 255, 136, 0.1);
}

.navbar.at-top .navbar-logo {
    max-height: 45px;
}

.navbar-brand {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
}

.navbar-logo {
    max-height: 40px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.navbar-nav .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

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

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%); /* Fallback gradient */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax effect */
    overflow: hidden;
    margin-top: -70px; /* Compensar navbar fija */
    padding-top: 120px; /* Espacio para contenido + navbar */
    /* Hardware acceleration for parallax */
    will-change: transform;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Project Hero Section */
.project-hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: rgba(10, 15, 10, 0.8); /* Fallback color */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax effect */
    overflow: hidden;
    margin-top: -80px; /* Compensar navbar fija */
    padding-top: 180px; /* Espacio para contenido + navbar */
}

/* News Hero Section */
.news-hero-section {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: rgba(10, 15, 10, 0.8); /* Fallback color */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax effect */
    overflow: hidden;
    margin-top: -80px; /* Compensar navbar fija */
    padding-top: 180px; /* Espacio para contenido + navbar */
}

/* News List Header Section */
.news-list-header-section {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow: hidden;
    margin-top: -80px; /* Compensar navbar fija */
    padding-top: 180px; /* Espacio para contenido + navbar */
}

.news-list-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(10, 15, 10, 0.85) 0%,
        rgba(10, 15, 10, 0.7) 50%,
        rgba(10, 15, 10, 0.85) 100%
    );
    z-index: 1;
}

.news-list-header-content {
    position: relative;
    z-index: 3;
}

/* Projects List Header Section */
.projects-list-header-section {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--bg-gradient-1) 0%, var(--bg-gradient-2) 50%, var(--bg-gradient-3) 100%);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    overflow: hidden;
    margin-top: -80px; /* Compensar navbar fija */
    padding-top: 180px; /* Espacio para contenido + navbar */
}

.projects-list-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(10, 15, 10, 0.85) 0%,
        rgba(10, 15, 10, 0.7) 50%,
        rgba(10, 15, 10, 0.85) 100%
    );
    z-index: 1;
}

.projects-list-header-content {
    position: relative;
    z-index: 3;
}

/* Project Hero overlay for better text readability */
.project-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(10, 15, 10, 0.85) 0%,
        rgba(10, 15, 10, 0.7) 50%,
        rgba(10, 15, 10, 0.85) 100%
    );
    z-index: 1;
}

/* News Hero overlay for better text readability */
.news-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(10, 15, 10, 0.85) 0%,
        rgba(10, 15, 10, 0.7) 50%,
        rgba(10, 15, 10, 0.85) 100%
    );
    z-index: 1;
}

.project-hero-content {
    position: relative;
    z-index: 3; /* Above overlay */
}

.news-hero-content {
    position: relative;
    z-index: 3; /* Above overlay */
}

/* Min height utilities */
.min-vh-50 {
    min-height: 50vh;
}

/* Hero overlay for better text readability */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(10, 15, 10, 0.85) 0%,
        rgba(10, 15, 10, 0.7) 50%,
        rgba(10, 15, 10, 0.85) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3; /* Above overlay */
}

/* Parallax effect enhancement */
@media (min-width: 768px) {
    .hero-section,
    .project-hero-section,
    .news-hero-section,
    .news-list-header-section,
    .projects-list-header-section {
        background-attachment: fixed;
        /* Ensure parallax works properly */
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center center;
    }
}

/* Mobile optimization - disable parallax on mobile for performance */
@media (max-width: 767px) {
    .hero-section,
    .project-hero-section,
    .news-hero-section,
    .news-list-header-section,
    .projects-list-header-section {
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
        margin-top: -60px; /* Compensar navbar más pequeña en móvil */
        padding-top: 140px; /* Espacio ajustado para móvil */
        /* Reset any JavaScript transforms on mobile */
        transform: none !important;
        background-position: center center !important;
    }
    
    .hero-overlay,
    .project-hero-overlay,
    .news-hero-overlay,
    .news-list-header-overlay,
    .projects-list-header-overlay {
        background: rgba(10, 15, 10, 0.9); /* Darker overlay on mobile for better readability */
    }
    
    .project-hero-section,
    .news-hero-section,
    .news-list-header-section,
    .projects-list-header-section {
        min-height: 50vh; /* Smaller on mobile */
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero-section,
    .project-hero-section,
    .news-hero-section,
    .news-list-header-section,
    .projects-list-header-section {
        background-attachment: scroll;
        background-position: center center !important;
        transform: none !important;
    }
}

.typing-container {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typing-animation {
    font-family: var(--font-mono);
    color: var(--primary-color);
    border-right: 2px solid var(--primary-color);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: var(--primary-color); }
    51%, 100% { border-color: transparent; }
}

/* Matrix Rain Effect */
.matrix-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="50" font-size="10" fill="%2300ff88" opacity="0.1">01010101</text></svg>') repeat;
    animation: matrix-fall 20s linear infinite;
}

@keyframes matrix-fall {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

/* Cards */
.card {
    background-color: rgba(26, 26, 26, 0.9) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 136, 0.1) !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 15px;
    overflow: hidden;
    /* Ensure stable positioning from start */
    opacity: 1;
    transform: translateY(0);
    /* Optimize for GPU */
    will-change: auto;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Only apply hover effects when card is visible */
.card.card-visible:hover {
    transform: translate3d(0, -10px, 0);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.2) !important;
    border-color: rgba(0, 255, 136, 0.3) !important;
    will-change: transform;
}

/* Optimize card image transitions */
.card-img-top {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: auto;
}

.card.card-visible:hover .card-img-top {
    transform: scale(1.05);
    will-change: transform;
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
    /* Optimize for GPU rendering */
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.card-img-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    pointer-events: none;
}

.news-card, .project-card {
    background-color: rgba(26, 26, 26, 0.9) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 255, 136, 0.1) !important;
}

/* Profile Image */
.profile-image img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.profile-image img:hover {
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
    transform: scale(1.05);
}

/* Skills */
.badge {
    font-size: 0.9rem;
    padding: 8px 12px;
    font-weight: 500;
}

.bg-primary {
    background-color: var(--primary-color) !important;
    color: var(--dark-bg) !important;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

/* Forms */
.form-control {
    background-color: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 255, 136, 0.1);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

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

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

/* Social Links */
.social-links a {
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color) !important;
    transform: translateY(-3px);
}

/* Lightbox Customization */
.lb-data .lb-caption {
    font-family: var(--font-sans);
    color: var(--text-primary);
}

.lb-data .lb-number {
    color: var(--text-secondary);
}

/* Pagination */
.pagination .page-link {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    color: var(--text-secondary);
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--dark-bg);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--dark-bg);
}

/* Alerts */
.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Navbar responsive */
    .navbar {
        padding: 0.8rem 0;
    }
    
    .navbar.scrolled {
        padding: 0.4rem 0;
    }
    
    .navbar.at-top {
        padding: 1rem 0;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    .navbar-logo {
        max-height: 35px;
    }
    
    .navbar.scrolled .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar.scrolled .navbar-logo {
        max-height: 30px;
    }
    
    .navbar.at-top .navbar-brand {
        font-size: 1.4rem;
    }
    
    .navbar.at-top .navbar-logo {
        max-height: 40px;
    }
    
    .hero-section {
        padding: 80px 0 40px;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    .profile-image img {
        width: 200px;
        height: 200px;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 576px) {
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
}

/* Páginas sin hero section necesitan padding-top también */
main:not(.hero-section):not(.project-hero-section):not(.news-hero-section) {
    padding-top: 100px;
}

/* Ajuste para páginas que empiezan directamente con main */
main.pt-5 {
    padding-top: 100px !important;
}

@media (max-width: 768px) {
    main:not(.hero-section):not(.project-hero-section):not(.news-hero-section) {
        padding-top: 80px;
    }
    
    main.pt-5 {
        padding-top: 80px !important;
    }
}

/* Admin Styles */
.admin-sidebar {
    background-color: var(--card-bg);
    border-right: 1px solid var(--border-color);
    min-height: calc(100vh - 76px);
}

.admin-sidebar .nav-link {
    color: var(--text-secondary);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

.table-dark {
    background-color: var(--card-bg);
    border-color: var(--border-color);
}

.table-dark td, .table-dark th {
    border-color: var(--border-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Print Styles */
@media print {
    .navbar, .whatsapp-float, .hero-bg {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Galería de imágenes en admin */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.gallery-item {
    position: relative;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    background: var(--card-bg);
    transition: all 0.3s ease;
}

.gallery-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.2);
}

.gallery-item.sortable-ghost {
    opacity: 0.5;
    transform: scale(0.95);
}

.image-preview {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.image-overlay .btn {
    margin: 0 5px;
}

.drag-handle {
    position: absolute;
    top: 5px;
    right: 5px;
    color: white;
    cursor: move;
    font-size: 1.2rem;
}

.image-info {
    padding: 10px;
}

.image-info input {
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.gallery-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 10px;
    padding: 20px;
    background: rgba(26, 26, 26, 0.5);
    transition: border-color 0.3s ease;
}

.gallery-upload-area:hover {
    border-color: var(--primary-color);
}

/* Responsive para galería */
@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .image-preview {
        height: 120px;
    }
}

/* Vista previa de nuevas imágenes */
.new-image-preview {
    border: 2px dashed var(--primary-color) !important;
    background: rgba(0, 255, 136, 0.05) !important;
}

.new-image-preview .image-info small {
    display: block;
    margin-top: 5px;
    font-size: 0.75rem;
}

.new-image-preview .btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.new-image-preview .btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

/* Contenedor de vista previa */
.preview-container {
    margin-top: 15px;
    padding: 15px;
    border: 2px dashed var(--primary-color);
    border-radius: 10px;
    background: rgba(0, 255, 136, 0.05);
}

.preview-container .alert {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.3);
    color: #17a2b8;
    margin-bottom: 15px;
}

.preview-container .gallery-item {
    display: inline-block;
    margin: 5px;
    width: 150px;
}

.preview-container .image-preview {
    height: 100px;
}

.gallery-image {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.gallery-image:hover {
    transform: scale(1.05);
}

.gallery-item-wrapper {
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item-wrapper:hover {
    transform: translateY(-5px);
}

/* Modal de Galería */
.gallery-modal-container {
    position: relative;
    background: #000;
}

.gallery-main-image {
    position: relative;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-main-image img {
    max-height: 70vh;
    width: auto;
    object-fit: contain;
}

.gallery-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.gallery-nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    pointer-events: all;
    transition: all 0.3s ease;
}

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

.gallery-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 20px;
    color: white;
}

.gallery-thumbnails {
    max-height: 100px;
    overflow-y: auto;
}

.gallery-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.gallery-thumbnail:hover {
    border-color: var(--primary-color);
    transform: scale(1.1);
}

.gallery-thumbnail.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Responsive para modal */
@media (max-width: 768px) {
    .gallery-main-image {
        max-height: 50vh;
    }
    
    .gallery-main-image img {
        max-height: 50vh;
    }
    
    .gallery-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .gallery-controls {
        padding: 0 10px;
    }
    
    .gallery-thumbnail {
        width: 50px;
        height: 50px;
    }
}