/**
 * Von Dir - Estilos principales
 * Minimalista, moderno, profesional, urbano
 */

/* ========================================
   VARIABLES CSS
   ======================================== */
:root {
    /* Colores */
    --color-bg-primary: #F4F2EE;
    --color-bg-secondary: #111111;
    --color-accent: #C9A86A;
    --color-text-primary: #111111;
    --color-text-secondary: #6F6A63;
    --color-text-light: #F4F2EE;
    --color-white: #FFFFFF;
    --color-border: rgba(17, 17, 17, 0.14);
    --color-border-light: rgba(244, 242, 238, 0.2);
    
    /* Tipografía */
    --font-heading: 'Sora', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Tamaños de fuente */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3.5rem;
    --text-6xl: 4.5rem;
    
    /* Espaciado */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Bordes */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;
    
    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
    
    /* Transiciones */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Z-index */
    --z-header: 100;
    --z-mobile-menu: 99;
    --z-whatsapp: 50;
    --z-cookie-banner: 200;
    --z-modal: 300;
}

/* ========================================
   RESET Y BASE
   ======================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-bg-primary);
    min-height: 100vh;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    background: none;
    border: none;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

/* Skip link para accesibilidad */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-bg-secondary);
    color: var(--color-text-light);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    z-index: 1000;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: var(--space-4);
}

/* ========================================
   UTILIDADES
   ======================================== */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-4);
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   TIPOGRAFÍA
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

@media (max-width: 768px) {
    h1 {
        font-size: var(--text-4xl);
    }
    
    h2 {
        font-size: var(--text-3xl);
    }
    
    h3 {
        font-size: var(--text-2xl);
    }
}

p {
    margin-bottom: var(--space-4);
}

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

/* Etiquetas micro */
.eyebrow {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-4);
}

/* ========================================
   BOTONES
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
}

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

.btn-primary:hover {
    background-color: #b8995a;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    border-color: var(--color-text-primary);
    transform: translateY(-2px);
}

.btn-dark {
    background-color: var(--color-bg-secondary);
    color: var(--color-text-light);
}

.btn-dark:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.btn-small {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.btn-large {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

.btn-block {
    width: 100%;
}

/* ========================================
   HEADER
   ======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    background: transparent;
    transition: background var(--transition-base), box-shadow var(--transition-base);
}

.site-header.scrolled {
    background: rgba(244, 242, 238, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--color-text-primary);
}

/* Navegación principal */
.main-nav {
    display: none;
}

@media (min-width: 1024px) {
    .main-nav {
        display: block;
    }
}

.nav-list {
    display: flex;
    gap: var(--space-8);
}

.nav-list a {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-base);
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--color-text-primary);
}

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

/* Acciones del header */
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* Selector de idioma */
.language-selector {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: var(--space-2);
    transition: color var(--transition-fast);
}

.lang-toggle:hover {
    color: var(--color-text-primary);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
}

.language-selector:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: block;
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.lang-dropdown a:hover,
.lang-dropdown a.active {
    background: var(--color-bg-primary);
    color: var(--color-text-primary);
}

/* Menú móvil toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-2);
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    transition: all var(--transition-base);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Menú móvil */
.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-primary);
    z-index: var(--z-mobile-menu);
    padding: var(--space-8) var(--space-6);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    overflow-y: auto;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-nav ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.mobile-nav a {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--color-text-primary);
    padding: var(--space-2) 0;
    display: block;
}

.mobile-actions {
    margin-top: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.mobile-lang {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border);
}

.mobile-lang a {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.mobile-lang a.active {
    color: var(--color-text-primary);
    font-weight: 600;
}

.lang-separator {
    color: var(--color-border);
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background: var(--color-bg-secondary);
    color: var(--color-text-light);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--space-8);
    margin-bottom: var(--space-12);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--color-text-light);
    display: inline-block;
    margin-bottom: var(--space-4);
}

.footer-tagline {
    color: rgba(244, 242, 238, 0.7);
    margin-bottom: var(--space-6);
}

.footer-social {
    display: flex;
    gap: var(--space-4);
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border-light);
    border-radius: 50%;
    color: var(--color-text-light);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.footer-col h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-6);
    color: rgba(244, 242, 238, 0.7);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.footer-col a {
    color: rgba(244, 242, 238, 0.8);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

.footer-col a:hover {
    color: var(--color-text-light);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    color: rgba(244, 242, 238, 0.8);
    font-size: var(--text-sm);
}

.footer-contact svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-8);
    border-top: 1px solid var(--color-border-light);
}

@media (max-width: 640px) {
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
}

.copyright {
    font-size: var(--text-sm);
    color: rgba(244, 242, 238, 0.5);
    margin: 0;
}

.footer-legal {
    display: flex;
    gap: var(--space-6);
}

.footer-legal a {
    font-size: var(--text-sm);
    color: rgba(244, 242, 238, 0.5);
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--color-text-light);
}

/* ========================================
   BOTÓN WHATSAPP FLOTANTE
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 56px;
    height: 56px;
    background: var(--color-accent);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: var(--z-whatsapp);
    transition: all var(--transition-base);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background: #b8995a;
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: var(--space-4);
        right: var(--space-4);
        width: 48px;
        height: 48px;
    }
    
    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}

/* ========================================
   BANNER DE COOKIES
   ======================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: var(--z-cookie-banner);
    padding: var(--space-6);
}

.cookie-banner-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
}

@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }
}

.cookie-banner-text h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

.cookie-banner-text p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

.cookie-banner-actions {
    display: flex;
    gap: var(--space-3);
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }
}

.cookie-btn {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.cookie-btn-accept {
    background: var(--color-accent);
    color: var(--color-white);
}

.cookie-btn-accept:hover {
    background: #b8995a;
}

.cookie-btn-configure {
    background: transparent;
    color: var(--color-text-primary);
    border: 1px solid var(--color-border);
}

.cookie-btn-configure:hover {
    border-color: var(--color-text-primary);
}

.cookie-btn-reject {
    background: transparent;
    color: var(--color-text-secondary);
}

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

/* Modal de configuración de cookies */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.cookie-settings-content {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-settings-content h3 {
    margin-bottom: var(--space-4);
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--color-border);
}

.cookie-option-text strong {
    display: block;
    margin-bottom: var(--space-1);
}

.cookie-option-text p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
}

/* Switch toggle */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition-fast);
    border-radius: 26px;
}

.cookie-slider::before {
    position: absolute;
    content: '';
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition-fast);
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background-color: var(--color-accent);
}

.cookie-switch input:checked + .cookie-slider::before {
    transform: translateX(22px);
}

.cookie-switch input:disabled + .cookie-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-settings-actions {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-6);
}

/* ========================================
   FORMULARIOS
   ======================================== */
.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-2);
    color: var(--color-text-primary);
}

.form-label-required::after {
    content: ' *';
    color: #e74c3c;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-white);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(201, 168, 106, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-secondary);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236F6A63' d='M2.5 4.5L6 8L9.5 4.5' stroke='currentColor' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.form-error {
    font-size: var(--text-sm);
    color: #e74c3c;
    margin-top: var(--space-1);
}

.form-success {
    background: #d4edda;
    color: #155724;
    padding: var(--space-4);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
}

/* ========================================
   SECCIONES COMUNES
   ======================================== */
section {
    padding: var(--space-20) 0;
}

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

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-12);
}

.section-header h2 {
    margin-bottom: var(--space-4);
}

.section-header p {
    color: var(--color-text-secondary);
    margin: 0;
}

/* ========================================
   ANIMACIONES
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease forwards;
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.6s ease forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease forwards;
}

/* Delay classes */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ========================================
   UTILIDADES RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}
