/* ===============================================
   MAIN.CSS - ESTILOS BASE TUJUGUETE.CO
   Estilos compartidos: Header, Footer, Variables
   =============================================== */

/* ===============================================
   RESET Y VARIABLES GLOBALES
   =============================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #6BC5A0;
    --color-primary-dark: #5BA888;
    --color-whatsapp: #25d366;
    --color-whatsapp-dark: #20b954;
    --color-text: #333333;
    --color-text-light: #4a4a4a;
    --color-background: #ffffff;
    --color-background-light: #f8f9fa;
    --color-danger: #e74c3c;
    --color-danger-dark: #c0392b;
    --color-footer: #2c3e50;
    --color-urgent: #ff4757;
    --color-urgent-dark: #ff3742;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

html {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===============================================
   HEADER COMPARTIDO
   =============================================== */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding-top: env(safe-area-inset-top);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 60px;
}

.nav-brand h1 {
    color: var(--color-primary);
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-brand a {
    text-decoration: none;
    color: inherit;
}

.nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    flex-direction: column;
    padding: 1rem 0;
    -webkit-overflow-scrolling: touch;
}

.nav-menu.active {
    display: flex;
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    padding: 1rem;
    transition: color 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.nav-menu a:hover {
    color: var(--color-primary);
    background: var(--color-background-light);
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    justify-content: center;
    align-items: center;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--color-text);
    margin: 2px 0;
    transition: 0.3s ease;
    border-radius: 1px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-4px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-4px, -5px);
}

.nav-toggle:focus,
.nav-menu a:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ===============================================
   BREADCRUMB COMPARTIDO
   =============================================== */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--color-text-light);
    padding: 1rem 0;
}

.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ===============================================
   FOOTER COMPARTIDO
   =============================================== */
.footer {
    background: var(--color-footer);
    color: white;
    padding: 40px 0 20px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom));
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--color-primary);
    font-size: 1.2rem;
    font-weight: bold;
}

.footer-section p,
.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: block;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 0.25rem 0;
    min-height: 32px;
}

.footer-section a:hover {
    color: var(--color-primary);
}

.footer-section a:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.footer-section nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.whatsapp-footer-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ecf0f1;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
    min-height: 44px;
}

.whatsapp-footer-link:hover {
    color: var(--color-primary);
}

.whatsapp-footer-link svg {
    width: 18px;
    height: 18px;
    fill: var(--color-whatsapp);
    flex-shrink: 0;
}

.whatsapp-number {
    font-weight: 500;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===============================================
   UTILIDADES GENERALES
   =============================================== */
.text-center {
    text-align: center;
}

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

/* ===============================================
   RESPONSIVE BREAKPOINTS
   =============================================== */
@media (min-width: 768px) {
    .nav-menu {
        display: flex;
        position: static;
        flex-direction: row;
        background: transparent;
        box-shadow: none;
        padding: 0;
        gap: 2rem;
        width: auto;
    }
    
    .nav-menu a {
        padding: 0.5rem 0;
        border-bottom: none;
        background: transparent;
    }
    
    .nav-toggle {
        display: none;
    }
    
    .nav-brand h1 {
        font-size: 1.8rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        text-align: left;
    }
    
    .footer-section h3 {
        font-size: 1.3rem;
    }
    
    .footer-section p,
    .footer-section a {
        font-size: 1rem;
    }
}

@media (min-width: 1024px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .nav-brand h1 {
        font-size: 2rem;
    }
}

/* ===============================================
   ACCESIBILIDAD
   =============================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .nav-toggle span,
    .nav-menu a,
    .footer-section a {
        transition: none;
    }
}

/* Estados focus consistentes */
a:focus,
button:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 3px;
}

/* ===============================================
   PRINT STYLES
   =============================================== */
@media print {
    .header,
    .nav-toggle,
    .footer {
        display: none !important;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}