/* Layout Variables - Prevents layout jumps */
:root { 
    --header-h: 80px; 
    --footer-h: 260px;
    /* Modern Color Palette */
    --primary-color: #ff385c;
    --primary-dark: #e31c5f;
    --text-primary: #222222;
    --text-secondary: #717171;
    --text-light: #b0b0b0;
    --background-white: #ffffff;
    --border-light: #dddddd;
    --border-medium: #b0b0b0;
    --shadow-small: 0 1px 2px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 2px 4px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.08);
    --shadow-large: 0 6px 16px rgba(0, 0, 0, 0.12), 0 3px 6px rgba(0, 0, 0, 0.08);
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 16px;
    --transition: all 0.2s ease;
}

html, body { 
    overflow-x: hidden; 
}

.main-content {
    padding-top: 80px;
    min-height: calc(100vh - var(--header-h) - var(--footer-h));
}

/* Custom Font Declarations */
@font-face {
    font-family: 'Simply Rounded Bold';
    src: url('../fonts/SimplyRoundedBold.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'PointPanther';
    src: url('../fonts/PointPanther.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Base Styles Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: #fafafa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modern Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(221, 221, 221, 0.6);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-medium);
    border-bottom-color: var(--border-light);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

/* Modern Logo Styles */
.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: var(--transition);
    border-radius: var(--radius-small);
    padding: 4px 8px;
}

.logo h1 {
    font-family: 'Simply Rounded Bold', 'Inter', sans-serif;
    font-size: 23px;
    font-weight: 700;
    color: #333333;
    letter-spacing: 0.5px;
    text-align: left;
    line-height: 1;
    margin: 0;
}

.logo-tagline {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-top: 2px;
    display: block;
    text-align: center;
    line-height: 1;
}

/* Typography consistency */
.header, 
.header *:not(h1):not(.logo h1) {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* Modern Navigation Styles */
.header-nav {
    display: flex;
    align-items: center;
}

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

.nav-link {
    text-decoration: none;
    color: #000000;
    font-weight: 400;
    font-size: 16px;
    text-transform: none;
    letter-spacing: -0.01em;
    transition: var(--transition);
    position: relative;
    padding: 12px 16px;
    border-radius: 50px;
    display: inline-block;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(34, 34, 34, 0.06);
}

/* Remove the old underline animation */
.nav-link::after {
    display: none;
}

/* Modern Contact Button */
.contact-link {
    background: var(--primary-color) !important;
    color: white !important;
    padding: 12px 24px !important;
    border-radius: 50px !important;
    transition: var(--transition) !important;
    font-weight: 600 !important;
    box-shadow: var(--shadow-small);
    margin-left: 8px;
}

.contact-link:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-medium) !important;
}

.contact-link::after {
    display: none !important;
}

/* Modern Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 3px;
    padding: 8px;
    border-radius: var(--radius-small);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background: rgba(34, 34, 34, 0.06);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition);
    border-radius: 1px;
}

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

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Modern Responsive Design - ARREGLADO */
@media (max-width: 768px) {
    .header-container {
        padding: 0 20px;
        height: 70px;
    }
    
    .logo h1 {
        font-size: 22px;
        letter-spacing: 0.3px;
    }
    
    .logo-tagline {
        font-size: 9px;
        margin-top: 1px;
        letter-spacing: 1px;
    }
    
    .header-nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 60px 24px 32px;
        border-right: 1px solid var(--border-light);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
    }
    
    .header-nav.active {
        transform: translateX(0);
        box-shadow: var(--shadow-large);
    }
    
    .nav-list {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
        margin-top: 0;
    }
    
    .nav-link {
        font-size: 16px;
        color: var(--text-primary);
        padding: 16px 20px;
        border-radius: var(--radius-medium);
        font-weight: 500;
        border: 1px solid transparent;
    }
    
    .nav-link:hover {
        background: rgba(255, 56, 92, 0.08);
        border-color: var(--primary-color);
        color: var(--primary-color);
    }
    
    .contact-link {
        margin-top: 16px !important;
        display: inline-block !important;
        text-align: center !important;
        margin-left: 0 !important;
        padding: 16px 24px !important;
        font-size: 16px !important;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Mobile menu backdrop */
    .header-nav.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 100%;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: -1;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 16px;
    }
    
    .logo h1 {
        font-size: 20px;
        letter-spacing: 0.2px;
    }
    
    .logo-tagline {
        font-size: 8px;
        letter-spacing: 0.8px;
    }
    
    .header-nav {
        padding: 40px 20px 24px;
    }
    
    .nav-link {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .contact-link {
        padding: 14px 20px !important;
        font-size: 15px !important;
    }
}

/* NUEVA VARIANTE: Para pantallas muy altas */
@media (max-width: 768px) and (min-height: 800px) {
    .header-nav {
        justify-content: center;
        padding: 32px 24px;
    }
    
    .nav-list {
        margin-top: 0;
    }
}

/* NUEVA VARIANTE: Para pantallas cortas */
@media (max-width: 768px) and (max-height: 600px) {
    .header-nav {
        padding: 20px 24px 32px;
        justify-content: flex-start;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.logo-link:focus,
.nav-link:focus,
.contact-link:focus,
.mobile-menu-toggle:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: var(--radius-small);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .header-nav {
        transition: none;
    }
    
    .mobile-menu-toggle span {
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .header {
        border-bottom: 2px solid var(--text-primary);
    }
    
    .nav-link {
        border: 1px solid transparent;
    }
    
    .nav-link:hover {
        border-color: var(--text-primary);
    }
}

/* Print styles */
@media print {
    .header {
        position: static;
        background: white;
        box-shadow: none;
        border-bottom: 1px solid #000;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .header-nav {
        position: static;
        transform: none;
        height: auto;
        background: transparent;
    }
    
    .nav-list {
        flex-direction: row;
        gap: 20px;
    }
    
    .contact-link {
        background: transparent !important;
        color: var(--text-primary) !important;
        border: 1px solid var(--text-primary) !important;
    }
}