/* ============================================================
   POTENCIANDOTE — COMMON.CSS v2.5
   Variables, reset, navbar, footer, utilidades, responsive
   ============================================================ */

/* ---------- VARIABLES ---------- */
:root {
    --bg: #0a0a3e;
    --bg-card: rgba(71, 121, 152, 0.08);
    --accent: #C4D6B0;
    --accent-hover: #a8c090;
    --text: #F7F7F7;
    --text-dim: rgba(255, 221, 226, 0.6);
    --border: rgba(196, 214, 176, 0.15);
    --danger: #e74c3c;
    --success: #2ecc71;
    --warning: #f59e0b;

    /* Header */
    --header-bg: #C4D6B0;
    --header-height: 90px;
    --header-height-mobile: 70px;
    --logo-size: 64px;
    --logo-size-mobile: 44px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Lato', sans-serif;
    background: linear-gradient(135deg, var(--bg) 0%, #0E0E52 100%);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }

/* ---------- NAVBAR ---------- */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--header-bg);
    height: var(--header-height);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Linea dorada de gradiente */
.nav-gold-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        #D4AF37 15%,
        #FFD700 35%,
        #FFF8DC 50%,
        #FFD700 65%,
        #D4AF37 85%,
        transparent 100%
    );
}

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

/* Logo */
.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
    min-width: 0;
}

.nav-logo-img {
    width: var(--logo-size);
    height: var(--logo-size);
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #0a0a3e;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-brand:hover .nav-logo-img {
    transform: scale(1.05);
}

.nav-logo-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: #0a0a3e;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-logo-text span {
    color: #0E0E52;
    font-weight: 400;
}

/* Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-menu li a {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #0a0a3e;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: rgba(10, 10, 62, 0.1);
    color: #0a0a3e;
}

/* Item activo del menu */
.nav-menu li a.active {
    background: rgba(10, 10, 62, 0.15);
    color: #0a0a3e;
    font-weight: 700;
    box-shadow: inset 0 -2px 0 0 #0a0a3e;
}

.nav-menu li a.btn-nav.active,
.nav-menu li a.btn-nav-outline.active,
.nav-menu li a.btn-nav-admin.active {
    box-shadow: inset 0 -2px 0 0 var(--accent);
}

/* Botones especiales del nav */
.btn-nav {
    background: #0a0a3e;
    color: var(--accent) !important;
}

.btn-nav:hover {
    background: #0E0E52 !important;
    transform: translateY(-1px);
}

.btn-nav-outline {
    border: 1.5px solid #0a0a3e;
    color: #0a0a3e !important;
}

.btn-nav-outline:hover {
    background: #0a0a3e;
    color: var(--accent) !important;
}

.btn-nav-admin {
    background: rgba(212, 175, 55, 0.2);
    border: 1.5px solid #D4AF37;
    color: #0a0a3e !important;
}

.btn-nav-admin:hover {
    background: #D4AF37;
    color: #0a0a3e !important;
}

/* Hamburger */
.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #0a0a3e;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s, transform 0.2s;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.hamburger:hover {
    background: rgba(10, 10, 62, 0.1);
}

.hamburger:active {
    transform: scale(0.95);
}

/* Efecto scroll */
.nav-scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* ---------- CONTENIDO PRINCIPAL ---------- */
.page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
}

.page-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    margin-bottom: 12px;
    color: var(--text);
}

.page-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    margin-bottom: 16px;
    margin-top: 32px;
    color: var(--text);
}

.page-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    margin-bottom: 12px;
    margin-top: 24px;
    color: var(--text);
}

.page-content p {
    margin-bottom: 16px;
    line-height: 1.8;
    color: var(--text-dim);
}

.page-content p strong {
    color: var(--text);
}

.page-content ul {
    margin-left: 24px;
    margin-bottom: 16px;
}

.page-content ul li {
    list-style: disc;
    margin-bottom: 8px;
    color: var(--text-dim);
    line-height: 1.7;
}

.page-content .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
}

.page-content .card h2 {
    margin-top: 0;
}

/* ---------- FOOTER ---------- */
.site-footer {
    background: rgba(10, 10, 62, 0.8);
    border-top: 1px solid var(--border);
    padding: 48px 24px 24px;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h4 {
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-section a {
    display: block;
    color: var(--text-dim);
    font-size: 0.9rem;
    padding: 6px 0;
    transition: color 0.3s;
}

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

.footer-section p {
    color: var(--text-dim);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    color: var(--text-dim);
    font-size: 0.85rem;
}

.footer-social {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 16px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    transition: all 0.3s;
    font-size: 1.1rem;
}

.footer-social a:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

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

.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .navbar {
        height: var(--header-height-mobile);
    }

    .nav-logo-img {
        width: var(--logo-size-mobile);
        height: var(--logo-size-mobile);
    }

    .nav-logo-text {
        font-size: 1.1rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height-mobile);
        left: 0;
        right: 0;
        background: var(--header-bg);
        flex-direction: column;
        align-items: stretch;
        padding: 12px 16px 20px;
        gap: 2px;
        transform: translateY(-150%);
        opacity: 0;
        transition: transform 0.35s ease, opacity 0.35s ease;
        pointer-events: none;
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
        max-height: calc(100vh - var(--header-height-mobile));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-bottom-left-radius: 16px;
        border-bottom-right-radius: 16px;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
        z-index: 1001;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu li a {
        padding: 14px 16px;
        width: 100%;
        justify-content: center;
        font-size: 1rem;
        border-radius: 10px;
    }

    .nav-menu li a:hover,
    .nav-menu li a.active {
        background: rgba(10, 10, 62, 0.12);
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .page-content {
        padding: 24px 16px;
    }

    .page-content h1 {
        font-size: 1.8rem;
    }

    .page-content .card {
        padding: 20px;
    }
}

/* Ajuste de padding para paginas con header fijo */
body {
    padding-top: calc(var(--header-height) + 40px);
}

@media (max-width: 768px) {
    body {
        padding-top: calc(var(--header-height-mobile) + 60px);
    }
}

/* MARGEN ADICIONAL para main y page-content en movil - MUY ESPECIFICO */
@media (max-width: 768px) {
    main {
        margin-top: 20px !important;
    }

    .page-content {
        padding-top: 30px !important;
    }

    .hero-section {
        padding-top: 30px !important;
    }
}

/* Prevenir scroll horizontal en movil */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Mejorar toques en movil */
@media (max-width: 768px) {
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* VERSION 2.5 - Padding movil con margin-top especifico */