/* ============================================
   AGSystema - Main Styles
   ============================================ */

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #60a5fa;
    --secondary: #0f172a;
    --accent: #06b6d4;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER & NAVEGACIÓN
   ============================================ */

.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.main-nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.main-nav a {
    color: var(--text);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    text-align: center;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    letter-spacing: -0.02em;
}

.hero .gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

/* ============================================
   SECCIONES
   ============================================ */

.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.section-header p {
    color: var(--text-light);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   SERVICIOS
   ============================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.75rem;
}

.service-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--secondary);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ============================================
   PORTFOLIO
   ============================================ */

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.portfolio-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.portfolio-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
    position: relative;
    background: var(--bg-alt);
}

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

.portfolio-card:hover .portfolio-image img {
    transform: scale(1.08);
}

.portfolio-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.portfolio-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--secondary);
}

.portfolio-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.tag {
    background: var(--bg-alt);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ============================================
   PORTFOLIO DETAIL
   ============================================ */

.portfolio-detail {
    padding: 4rem 0;
}

.portfolio-detail-hero {
    margin-bottom: 3rem;
}

.portfolio-detail-hero img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.portfolio-detail-content {
    max-width: 800px;
    margin: 0 auto;
}

.portfolio-detail-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.portfolio-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-alt);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}

.portfolio-meta-item {
    display: flex;
    flex-direction: column;
}

.portfolio-meta-label {
    font-size: 0.85rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.portfolio-meta-value {
    font-weight: 600;
    color: var(--secondary);
}

.portfolio-detail-content .description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text);
    margin-bottom: 2rem;
}

/* ============================================
   FORMULARIO DE CONTACTO
   ============================================ */

.contact-section {
    background: var(--bg-alt);
    padding: 5rem 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.contact-info p {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-item-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-item-text strong {
    display: block;
    color: var(--secondary);
    margin-bottom: 0.25rem;
}

.contact-item-text span {
    color: var(--text-light);
}

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
    background: var(--bg);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ============================================
   ALERTS
   ============================================ */

.alert {
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    border-color: var(--success);
    color: #065f46;
}

.alert-danger {
    background: #fee2e2;
    border-color: var(--danger);
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    border-color: var(--primary);
    color: #1e40af;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--secondary);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand .logo {
    color: white;
    -webkit-text-fill-color: white;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: #94a3b8;
    max-width: 400px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-col ul {
    list-style: none;
}

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

.footer-col a {
    color: #94a3b8;
}

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

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 1.5rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .main-nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .hero {
        padding: 4rem 0 3rem;
    }
    
    .portfolio-meta {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .main-nav {
        display: none;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .section {
        padding: 3rem 0;
    }
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}
/* ============================================
   GALERÍA DE IMÁGENES - PORTFOLIO
   ============================================ */

.gallery-upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.gallery-upload-zone:hover,
.gallery-upload-zone.dragover {
    border-color: var(--primary);
    background: #eff6ff;
    transform: translateY(-2px);
}

.gallery-upload-zone i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.gallery-upload-zone h4 {
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.gallery-upload-zone p {
    color: var(--text-light);
    font-size: 0.9rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: grab;
}

.gallery-item:active {
    cursor: grabbing;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

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

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

.gallery-item.is-cover {
    border: 3px solid var(--primary);
}

.gallery-item.is-cover::before {
    content: '★ PORTADA';
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--primary);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.gallery-item-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}

.gallery-item:hover .gallery-item-actions {
    opacity: 1;
}

.gallery-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.9);
    color: var(--text);
}

.gallery-action-btn:hover {
    transform: scale(1.1);
}

.gallery-action-btn.btn-cover {
    color: #f59e0b;
}

.gallery-action-btn.btn-cover:hover {
    background: #f59e0b;
    color: white;
}

.gallery-action-btn.btn-delete {
    color: var(--danger);
}

.gallery-action-btn.btn-delete:hover {
    background: var(--danger);
    color: white;
}

.gallery-action-btn.btn-view {
    color: var(--primary);
}

.gallery-action-btn.btn-view:hover {
    background: var(--primary);
    color: white;
}

.gallery-preview-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.gallery-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-preview-item .remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.95);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.gallery-preview-item .remove-btn:hover {
    background: var(--danger);
    transform: scale(1.1);
}

.gallery-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-alt);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* ============================================
   LIGHTBOX MODERNO
   ============================================ */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    animation: lightboxFadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

/* ============================================
   GALERÍA PÚBLICA (Portfolio Detail)
   ============================================ */

.portfolio-gallery {
    margin: 3rem 0;
}

.portfolio-gallery-main {
    aspect-ratio: 16/9;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-lg);
    cursor: zoom-in;
    background: var(--bg-alt);
}

.portfolio-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-gallery-main:hover img {
    transform: scale(1.03);
}

.portfolio-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.portfolio-thumb {
    aspect-ratio: 4/3;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.portfolio-thumb:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.portfolio-thumb.active {
    border-color: var(--primary);
    opacity: 1;
}

.portfolio-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-alt);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.gallery-info-bar span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-weight: 500;
}

.gallery-info-bar i {
    color: var(--primary);
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    
    .lightbox-nav {
        width: 44px;
        height: 44px;
    }
    
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
}
/* ============================================
   GALERÍA SHOWCASE - PORTADA + MINIATURAS
   ============================================ */

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--primary);
    font-weight: 500;
    transition: var(--transition);
}

.back-link:hover {
    transform: translateX(-4px);
}

/* ============================================
   CARRUSEL PROFESIONAL - ACCESIBLE
   ============================================ */

.back-link-large {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-alt);
    border-radius: 8px;
    transition: var(--transition);
}

.back-link-large:hover {
    background: var(--primary);
    color: white;
    transform: translateX(-4px);
}

.portfolio-title-large {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.portfolio-info-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-alt);
    border-radius: 12px;
    margin-bottom: 2.5rem;
    border-left: 4px solid var(--primary);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.9rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.info-value {
    font-size: 1.1rem;
    color: var(--secondary);
    font-weight: 600;
}

.link-large {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.link-large:hover {
    text-decoration: underline;
}

/* ============================================
   CARRUSEL PRINCIPAL
   ============================================ */

.carousel-container {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    margin-bottom: 1.5rem;
}

.carousel-track {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #0f172a;
}

/* ============================================
   BOTONES DE NAVEGACIÓN (GRANDES)
   ============================================ */

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    color: var(--primary);
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.carousel-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn-prev {
    left: 20px;
}

.carousel-btn-next {
    right: 20px;
}

/* ============================================
   BARRA DE CONTROLES INFERIOR
   ============================================ */

.carousel-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.7));
    backdrop-filter: blur(10px);
    z-index: 10;
    flex-wrap: wrap;
}

/* CONTADOR GRANDE Y CLARO */
.carousel-counter {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1.25rem;
    border-radius: 30px;
}

.counter-current {
    font-size: 1.5rem;
    color: #60a5fa;
}

.counter-separator {
    font-size: 1rem;
    opacity: 0.8;
}

.counter-total {
    font-size: 1.3rem;
}

/* BOTÓN PAUSA/PLAY (GRANDE) */
.carousel-pause-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-pause-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

.carousel-pause-btn i {
    font-size: 1.3rem;
}

.carousel-pause-btn.paused {
    background: rgba(16, 185, 129, 0.3);
    border-color: rgba(16, 185, 129, 0.5);
}

/* INDICADORES DE POSICIÓN (GRANDES) */
.carousel-dots {
    display: flex;
    gap: 0.75rem;
}

.carousel-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: #60a5fa;
    border-color: white;
    transform: scale(1.3);
}

/* BARRA DE PROGRESO */
.carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,0.1);
    z-index: 11;
}

.carousel-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    width: 0%;
    transition: width 0.1s linear;
}

/* ============================================
   INSTRUCCIONES (TEXTO GRANDE)
   ============================================ */

.carousel-instructions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-alt);
    border-radius: 12px;
    margin-bottom: 2.5rem;
    border-left: 4px solid var(--accent);
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.05rem;
    color: var(--text);
}

.instruction-item i {
    color: var(--primary);
    font-size: 1.3rem;
    width: 24px;
    text-align: center;
}

/* ============================================
   DESCRIPCIÓN (TEXTO GRANDE)
   ============================================ */

.description-large {
    margin: 3rem 0;
}

.description-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

.description-text {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text);
}

/* ============================================
   CTA GRANDE
   ============================================ */

.cta-section {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 16px;
    margin-top: 3rem;
}

.cta-title {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.btn-large {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
    transition: var(--transition);
}

.btn-large:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-large i {
    font-size: 1.3rem;
}

/* ============================================
   RESPONSIVE - TABLET Y MÓVIL
   ============================================ */

@media (max-width: 900px) {
    .carousel-btn {
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
    }
    
    .carousel-btn-prev {
        left: 10px;
    }
    
    .carousel-btn-next {
        right: 10px;
    }
    
    .carousel-controls {
        gap: 1rem;
        padding: 0.75rem 1rem;
    }
    
    .carousel-counter {
        font-size: 1.1rem;
    }
    
    .counter-current {
        font-size: 1.3rem;
    }
    
    .carousel-pause-btn {
        padding: 0.6rem 1.25rem;
        font-size: 1rem;
    }
    
    .carousel-dots {
        gap: 0.5rem;
    }
    
    .carousel-dot {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 600px) {
    .back-link-large {
        font-size: 1rem;
        padding: 0.6rem 1.25rem;
    }
    
    .portfolio-title-large {
        font-size: 1.75rem;
    }
    
    .portfolio-info-box {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }
    
    .carousel-track {
        aspect-ratio: 4/3;
    }
    
    .carousel-btn {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
    
    .carousel-controls {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .carousel-counter {
        font-size: 1rem;
    }
    
    .carousel-pause-btn {
        width: 100%;
        justify-content: center;
    }
    
    .carousel-dots {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .instruction-item {
        font-size: 0.95rem;
    }
    
    .description-text {
        font-size: 1.05rem;
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
        padding: 1rem 1.5rem;
    }
}

/* ============================================
   ACCESIBILIDAD
   ============================================ */

/* Respetar preferencias de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    .carousel-slide {
        transition: none;
    }
    
    .carousel-progress-bar {
        transition: none;
    }
}

/* Focus visible para navegación con teclado */
.carousel-btn:focus-visible,
.carousel-pause-btn:focus-visible,
.carousel-dot:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

/* Alto contraste para personas con baja visión */
@media (prefers-contrast: high) {
    .carousel-btn {
        background: white;
        border: 3px solid black;
    }
    
    .carousel-pause-btn {
        border-width: 3px;
    }
}

.gallery-zoom-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(8px);
    border: none;
    color: var(--primary);
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    opacity: 0;
}

.gallery-showcase-main:hover .gallery-zoom-btn {
    opacity: 1;
}

.gallery-zoom-btn:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.1);
}

.gallery-hint {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.gallery-hint:hover {
    opacity: 1;
}

.hint-text-mobile {
    display: none;
}

/* COLUMNA DE MINIATURAS */
.gallery-showcase-sidebar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.gallery-sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 0.25rem;
}

.gallery-sidebar-header i {
    color: var(--primary);
}

.gallery-thumbs-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) transparent;
}

.gallery-thumbs-column::-webkit-scrollbar {
    width: 5px;
}

.gallery-thumbs-column::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 3px;
}

/* ============================================
   COLUMNA DE MINIATURAS - 150x150
   ============================================ */

.gallery-thumbs-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-light) transparent;
}

.gallery-thumbs-column::-webkit-scrollbar {
    width: 5px;
}

.gallery-thumbs-column::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 3px;
}

.gallery-thumb-item {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    background: var(--bg-alt);
}

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

.gallery-thumb-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

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

.gallery-thumb-item.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.thumb-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: var(--primary);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 2;
}

.thumb-number {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(15, 23, 42, 0.7);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}/* ============================================
   RESPONSIVE - TABLET Y MÓVIL
   ============================================ */

@media (max-width: 900px) {
    .gallery-showcase.has-gallery {
        grid-template-columns: 1fr;
    }
    
    .gallery-showcase-sidebar {
        order: 2;
    }
    
    .gallery-thumbs-column {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
        padding-bottom: 8px;
        scrollbar-width: thin;
    }
    
    /* Miniaturas 150x150 en tablet */
    .gallery-thumb-item {
        width: 150px;
        min-width: 150px;
        height: 150px;
    }
    
    .hint-text {
        display: none;
    }
    
    .hint-text-mobile {
        display: inline;
    }
}

@media (max-width: 600px) {
    .gallery-showcase {
        gap: 1rem;
    }
    
    .gallery-showcase-main {
        aspect-ratio: 4/3;
        border-radius: 12px;
    }
    
    /* Miniaturas 150x150 también en móvil */
    .gallery-thumb-item {
        width: 150px;
        min-width: 150px;
        height: 150px;
    }
    
    .gallery-hint {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
        bottom: 10px;
    }
    
    .gallery-sidebar-header {
        font-size: 0.75rem;
    }
    
    .floating-preview {
        display: none;
    }
    
    .gallery-zoom-btn {
        opacity: 1;
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
}