/* ==========================================================================
   SOVASA.CL - Rediseño Premium Estilo Apple
   ========================================================================== */

/* Variables del Sistema de Diseño */
:root {
    /* Light Theme variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-tertiary: #e8e8ed;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --text-tertiary: #b6b6bb;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-glow: rgba(0, 113, 227, 0.12);
    --border: rgba(0, 0, 0, 0.08);
    --card-shadow: 0 12px 40px rgba(0, 0, 0, 0.04);
    --card-hover-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-border: rgba(255, 255, 255, 0.4);
    --success: #34c759;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --transition-fast: all 0.2s ease;
}

[data-theme="dark"] {
    /* Dark Theme variables */
    --bg-primary: #000000;
    --bg-secondary: #161617;
    --bg-tertiary: #222224;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --text-tertiary: #424245;
    --accent: #2997ff;
    --accent-hover: #54aeff;
    --accent-glow: rgba(41, 151, 255, 0.2);
    --border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    --glass-bg: rgba(22, 22, 23, 0.72);
    --glass-border: rgba(255, 255, 255, 0.06);
    --success: #30d158;
}

/* Reset & Estilos Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 10px;
    border: 3px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* ==========================================================================
   Header & Navbar (Estilo Glassmorphism de Apple)
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-color: var(--glass-bg);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition-smooth);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
    transition: var(--transition-smooth);
}

header.scrolled {
    height: 60px;
    background-color: var(--glass-bg);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

header.scrolled .navbar-container {
    height: 60px;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
    border-radius: 6px;
    transition: var(--transition-smooth);
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 36px;
}

nav a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
    letter-spacing: -0.01em;
    transition: var(--transition-fast);
    position: relative;
    padding: 8px 0;
}

nav a:hover {
    opacity: 1;
    color: var(--accent);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Theme Switcher Button */
.theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    outline: none;
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
    transform: scale(1.05);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.5s ease;
}

/* Hide sun/moon depending on active theme */
[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
}
[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
}
[data-theme="light"] .theme-toggle .sun-icon {
    display: none;
}
[data-theme="light"] .theme-toggle .moon-icon {
    display: block;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 0;
}

.mobile-menu-btn .bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-smooth);
    transform-origin: left;
}

.mobile-menu-btn[aria-expanded="true"] .bar:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-btn[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-btn[aria-expanded="true"] .bar:nth-child(3) {
    transform: rotate(-45deg);
}

/* Mobile Nav Overlay */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-primary);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav ul {
    flex-direction: column;
    gap: 32px;
    text-align: center;
}

.mobile-nav a {
    font-size: 24px;
    font-weight: 600;
}

/* ==========================================================================
   Hero Section (Impresión Premium)
   ========================================================================== */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #000;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-image: url('../images/hero_background.png');
    background-size: cover;
    background-position: center;
    z-index: 0;
    will-change: transform;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.7) 60%, rgba(0,0,0,0.9) 100%);
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding-top: 80px;
}

.hero-content {
    max-width: 900px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.4s;
}

.hero-tag {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 16px;
    display: inline-block;
}

.hero-section h1 {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #ffffff;
}

.hero-section p {
    font-size: 22px;
    font-weight: 400;
    color: #e8e8ed;
    margin-bottom: 48px;
    line-height: 1.5;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.01em;
}

/* Button UI */
.hero-ctas {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.cta-primary, .cta-secondary {
    display: inline-block;
    padding: 16px 36px;
    border-radius: 980px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.cta-primary {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 18px var(--accent-glow);
}

.cta-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(41, 151, 255, 0.4);
}

.cta-secondary {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-secondary:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* Scroll indicator mouse */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 1s ease forwards 1.5s;
}

.scroll-indicator .mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    display: flex;
    justify-content: center;
    padding-top: 8px;
}

.scroll-indicator .wheel {
    width: 4px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 2px;
    animation: scrollMouse 1.8s ease-in-out infinite;
}

.scroll-indicator .scroll-text {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Sections General & Typography
   ========================================================================== */
section {
    padding: 120px 0;
    position: relative;
}

.section-tag {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 12px;
    display: block;
    text-align: center;
}

h2 {
    font-size: 42px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: center;
    max-width: 640px;
    margin: 0 auto 64px auto;
    font-weight: 400;
}

/* Fade In animation on Scroll */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Clients Section (Social Proof - Logo Cards)
   ========================================================================== */
.clients-section {
    padding: 70px 0;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.clients-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 40px;
}

.clients-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.client-card {
    width: 210px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff; /* Fijo en blanco para mantener la integridad de los fondos de marcas */
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    transition: var(--transition-smooth);
    padding: 18px;
    cursor: pointer;
    text-decoration: none;
}

[data-theme="dark"] .client-card {
    background-color: #ffffff; /* Mantener tarjetas blancas para logos oscuros/color y compatibilidad JPG */
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.25);
}

.client-card img {
    max-height: 55px;
    max-width: 140px;
    object-fit: contain;
    filter: none; /* Siempre a color */
    opacity: 0.9; /* Sutil integración */
    transition: var(--transition-smooth);
}

/* Hover effects */
.client-card:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: var(--accent);
    box-shadow: 0 16px 30px var(--accent-glow);
}

[data-theme="dark"] .client-card:hover {
    box-shadow: 0 16px 30px rgba(41, 151, 255, 0.2);
}

.client-card:hover img {
    opacity: 1;
}

@media (max-width: 768px) {
    .clients-section {
        padding: 50px 0;
    }
    .clients-grid {
        gap: 16px;
    }
    .client-card {
        width: 145px;
        height: 80px;
        border-radius: 12px;
        padding: 10px;
    }
    .client-card img {
        max-height: 40px;
        max-width: 110px;
    }
}

/* ==========================================================================
   Services Section (Glassmorphism Cards)
   ========================================================================== */
.services-section {
    background-color: var(--bg-secondary);
}

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

.service-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border);
    padding: 48px 40px;
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

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

.service-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    color: var(--accent);
    transition: var(--transition-smooth);
}

.service-card:hover .service-icon-wrapper {
    background-color: var(--accent);
    color: #ffffff;
    transform: scale(1.05);
}

.service-icon {
    width: 30px;
    height: 30px;
}

.service-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.service-card p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.service-link {
    text-decoration: none;
    color: var(--accent);
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
}

.service-card:hover .service-link {
    color: var(--accent-hover);
}

/* ==========================================================================
   Stats Section
   ========================================================================== */
.stats-section {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number-wrapper {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 64px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1;
}

.stat-suffix {
    font-size: 40px;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   Portfolio Section (Portafolio Interactivo)
   ========================================================================== */
.portfolio-section {
    background-color: var(--bg-primary);
}

.portfolio-filters-container {
    display: flex;
    justify-content: flex-start; /* Evita bug de recorte en scroll horizontal */
    margin-bottom: 40px;
    overflow-x: auto;
    padding: 4px 20px 12px 20px; /* Separación de bordes de pantalla */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    -webkit-overflow-scrolling: touch; /* Scroll táctil inercial para móviles */
}

.portfolio-filters-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

@media (min-width: 769px) {
    .portfolio-filters-container {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }
}

.portfolio-filters {
    display: flex;
    gap: 8px;
    background-color: var(--bg-secondary);
    padding: 6px;
    border-radius: 980px;
    white-space: nowrap;
}

.filter-btn {
    background: none;
    border: none;
    outline: none;
    padding: 10px 22px;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    color: var(--text-primary);
}

.filter-btn.active {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Grid Layout */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    min-height: 400px;
}

/* Project Card */
.portfolio-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    opacity: 0;
    transform: scale(0.95);
    animation: scaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.portfolio-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0) 100%);
    opacity: 1; /* Siempre visible */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 2;
}

.portfolio-item-meta {
    transform: translateY(0); /* Siempre visible en su posición */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.portfolio-item-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 6px;
    display: inline-block;
}

.portfolio-item-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.portfolio-item-desc {
    font-size: 13px;
    color: #d2d2d7;
    opacity: 0.9;
}

.portfolio-item-zoom {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.portfolio-item:hover .portfolio-item-zoom {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   About Us Section
   ========================================================================== */
.about-section {
    background-color: var(--bg-secondary);
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image-wrapper {
    position: relative;
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glassmorphism Abstract Graphic */
.about-graphic {
    position: relative;
    width: 80%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-graphic .circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(30px);
}

.about-graphic .circle-1 {
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, var(--accent) 0%, rgba(13, 148, 136, 0.4) 100%);
    top: 10%;
    left: 10%;
    animation: floatShape 8s ease-in-out infinite alternate;
}

.about-graphic .circle-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, rgba(82, 0, 255, 0.3) 0%, rgba(255, 0, 150, 0.2) 100%);
    bottom: 10%;
    right: 10%;
    animation: floatShape 10s ease-in-out infinite alternate-reverse;
}

.about-graphic .glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 48px;
    border-radius: 28px;
    box-shadow: var(--card-shadow);
    z-index: 2;
    text-align: center;
    max-width: 320px;
    transform: rotate(-3deg);
    transition: transform 0.5s ease;
}

.about-graphic .glass-panel:hover {
    transform: rotate(0deg) scale(1.03);
}

.about-graphic .glass-panel h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.about-graphic .glass-panel p {
    font-size: 14px;
    color: var(--text-secondary);
}

.about-content h2 {
    text-align: left;
    margin-bottom: 24px;
}

.about-content p {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.values-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 36px;
}

.value-item strong {
    font-size: 16px;
    color: var(--text-primary);
    display: block;
    margin-bottom: 8px;
}

.value-item p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

/* ==========================================================================
   Contact Section & Custom Form
   ========================================================================== */
.contact-section {
    background-color: var(--bg-primary);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
}

.contact-info h2 {
    text-align: left;
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 17px;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-detail-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.detail-icon {
    width: 48px;
    height: 48px;
    padding: 12px;
    border-radius: 12px;
    background-color: var(--bg-secondary);
    color: var(--accent);
    flex-shrink: 0;
}

.contact-detail-item h4 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.contact-detail-item p {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.contact-detail-item a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.contact-detail-item a:hover {
    color: var(--accent);
}

/* Custom Floating Label Form */
.contact-form-wrapper {
    position: relative;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 48px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.contact-form {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.contact-form.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.form-row {
    margin-bottom: 24px;
}

.form-row.flex-row {
    display: flex;
    gap: 20px;
}

.form-group {
    position: relative;
    width: 100%;
}

.form-group.half {
    width: 50%;
}

/* Input Styles */
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 18px 16px 6px 16px;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    border-radius: 12px;
    border: 1px solid var(--border);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    height: 58px;
}

.form-group textarea {
    height: 120px;
    resize: none;
    padding-top: 22px;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

/* Floating Label Logic */
.form-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: 0.2s ease all;
}

/* Textarea specific label position */
.form-group textarea + label {
    top: 22px;
    transform: none;
}

/* Floating state */
.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label,
.form-group select:focus + label,
.form-group select:valid + label {
    top: 8px;
    transform: none;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
}

/* Select icon arrow */
.dropdown-group::after {
    content: '';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--text-secondary);
    pointer-events: none;
}

/* Input Focus Glow */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}

/* Error States */
.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: #ff3b30;
}

.form-group.error label {
    color: #ff3b30;
}

.form-group .error-msg {
    position: absolute;
    bottom: -18px;
    left: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #ff3b30;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

.form-group.error .error-msg {
    opacity: 1;
    visibility: visible;
}

/* Submit Button & Loader */
.submit-button {
    width: 100%;
    height: 56px;
    background-color: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 12px var(--accent-glow);
    overflow: hidden;
}

.submit-button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(41, 151, 255, 0.3);
}

.submit-button:active {
    transform: translateY(1px);
}

.submit-button span {
    transition: opacity 0.2s ease;
}

.submit-button .spinner {
    position: absolute;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    opacity: 0;
    visibility: hidden;
    animation: spin 0.8s linear infinite;
    transition: var(--transition-fast);
}

.submit-button.loading span {
    opacity: 0;
}

.submit-button.loading .spinner {
    opacity: 1;
    visibility: visible;
}

/* Success Card */
.form-success {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px;
    opacity: 0;
    visibility: hidden;
    transform: scale(1.05);
    transition: var(--transition-smooth);
    z-index: 10;
}

.form-success.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.success-icon {
    width: 64px;
    height: 64px;
    background-color: rgba(48, 209, 88, 0.1);
    color: var(--success);
    border-radius: 50%;
    padding: 14px;
    margin-bottom: 24px;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: drawCheck 0.6s ease forwards 0.3s;
}

.form-success h3 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.form-success p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 320px;
    line-height: 1.6;
}

.success-close {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
}

.success-close:hover {
    background-color: var(--bg-primary);
    transform: scale(1.02);
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 80px 0 0 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    padding-bottom: 60px;
}

.footer-brand .footer-logo {
    height: 48px;
    width: auto;
    border-radius: 6px;
    margin-bottom: 20px;
}

.footer-brand p {
    max-width: 360px;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: 0.05em;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 30px 0;
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-tertiary);
    font-size: 12px;
}

/* ==========================================================================
   Lightbox Gallery Modal (Elegante & Fluido)
   ========================================================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 85%;
    max-height: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.92);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-content img.loaded {
    opacity: 1;
}

.lightbox-caption {
    margin-top: 20px;
    text-align: center;
    color: #ffffff;
    max-width: 600px;
}

.lightbox-caption h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #ffffff;
}

.lightbox-caption p {
    font-size: 14px;
    color: #a1a1a6;
}

/* Lightbox Buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 40px;
    line-height: 1;
    transition: all 0.2s ease;
    z-index: 2001;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.lightbox-close {
    top: 24px;
    right: 24px;
    font-size: 32px;
}

.lightbox-prev {
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
}

/* Keyboard keys helper hint */
.lightbox::after {
    content: 'ESC para cerrar | ← anterior | → siguiente';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.3);
    font-size: 11px;
    letter-spacing: 0.05em;
    pointer-events: none;
}

/* ==========================================================================
   Keyframes & Animations
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes floatShape {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    100% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes scrollMouse {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(8px);
        opacity: 0.3;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

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

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
    h2 {
        font-size: 36px;
    }

    .hero-section h1 {
        font-size: 52px;
    }

    .hero-section p {
        font-size: 19px;
    }

    .about-container, .contact-container {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-image-wrapper {
        height: 380px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

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

    .section-subtitle {
        margin-bottom: 40px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    nav {
        display: none;
    }

    .hero-section h1 {
        font-size: 40px;
    }

    .hero-section p {
        font-size: 17px;
        margin-bottom: 36px;
    }

    .hero-ctas {
        flex-direction: column;
        width: 100%;
        max-width: 280px;
    }

    .cta-primary, .cta-secondary {
        text-align: center;
        padding: 14px 28px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 36px 28px;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .portfolio-filters-container {
        justify-content: flex-start;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .portfolio-item-overlay {
        padding: 20px;
    }
    
    .portfolio-item-title {
        font-size: 16px;
    }
    
    .portfolio-item-desc {
        font-size: 12px;
    }

    .form-row.flex-row {
        flex-direction: column;
        gap: 24px;
    }

    .form-group.half {
        width: 100%;
    }

    .contact-form-wrapper {
        padding: 32px 24px;
    }

    .lightbox-prev, .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 28px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox::after {
        display: none;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}