/* ===== VARIABLES CSS (FÁCIL PERSONALIZACIÓN) ===== */
:root {
    /* Colores principales - CAMBIAR AQUÍ PARA PERSONALIZAR */
    --primary-color: #4CAF50;
    --primary-dark: #45a049;
    --secondary-color: #f1f1f1;
    --accent-color: #25D366; /* WhatsApp green */
    --text-color: #333;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.2);
    
    /* Medidas */
    --navbar-height: 70px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

/* ===== NAVEGACIÓN ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--navbar-height);
    background: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

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

.nav-link:hover::after {
    width: 100%;
}

/* Menú hamburguesa */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 3px;
}

/* Animación del menú hamburguesa */
.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* ===== CONTENIDO PRINCIPAL ===== */
.main-content {
    margin-top: var(--navbar-height);
    height: calc(100vh - var(--navbar-height));
    padding: 20px;
    background: var(--secondary-color);
}

.pdf-container {
    width: 100%;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px var(--shadow);
    overflow: hidden;
    position: relative;
}

.pdf-container iframe {
    border: none;
    display: block;
}

.pdf-fallback {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1;
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px var(--shadow);
}

.pdf-fallback h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.pdf-fallback a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.pdf-fallback a:hover {
    text-decoration: underline;
}

/* ===== BOTÓN DE WHATSAPP ===== */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
    animation: bounce 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-icon {
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--accent-color);
    animation: pulse 2s infinite;
    opacity: 0.7;
}

/* Tooltip de WhatsApp */
.whatsapp-tooltip {
    position: fixed;
    bottom: 95px;
    right: 25px;
    background: var(--text-color);
    color: var(--white);
    padding: 10px 15px;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: var(--transition);
    z-index: 999;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-color);
}

.whatsapp-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* ===== ANIMACIONES ===== */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

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

/* Tablets */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: var(--navbar-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--navbar-height));
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        gap: 40px;
        transition: var(--transition);
        box-shadow: 0 4px 20px var(--shadow);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-link {
        font-size: 1.2rem;
    }

    .main-content {
        padding: 15px;
    }

    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-icon svg {
        width: 24px;
        height: 24px;
    }
}

/* Móviles */
@media screen and (max-width: 480px) {
    :root {
        --navbar-height: 60px;
    }

    .nav-logo h2 {
        font-size: 1.3rem;
    }

    .main-content {
        padding: 10px;
        height: calc(100vh - var(--navbar-height));
    }

    .pdf-container {
        border-radius: 5px;
    }

    .pdf-fallback {
        padding: 30px 20px;
    }

    .pdf-fallback h3 {
        font-size: 1.3rem;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }

    .whatsapp-icon svg {
        width: 22px;
        height: 22px;
    }

    .whatsapp-tooltip {
        bottom: 75px;
        right: 15px;
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

/* Pantallas muy pequeñas */
@media screen and (max-width: 320px) {
    .nav-container {
        padding: 0 15px;
    }

    .main-content {
        padding: 8px;
    }

    .pdf-fallback {
        padding: 20px 15px;
    }
}

/* ===== MODO LANDSCAPE EN MÓVILES ===== */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .nav-menu {
        flex-direction: row;
        height: auto;
        padding: 20px;
        gap: 30px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-link {
        font-size: 1rem;
    }
}