/* MODERN DESIGN SYSTEM FOR CLINICA JANDJ */
:root {
    --primary-color: #008c35; /* Clinica JandJ Green */
    --primary-dark: #006622;
    --secondary-color: #2c3e50;
    --bg-light: #f8fafc;
    --text-main: #334155;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.18);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Universal Box-Sizing & Viewport Containment */
*, *::before, *::after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

img {
    max-width: 100%;
    height: auto;
}

body {
    font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    color: var(--secondary-color);
}

/* =========================================
   MODERN HEADER (GLASSMORPHISM)
========================================= */
.modern-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.modern-header-container {
    max-width: 1260px;
    width: 100%;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.modern-logo img {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

.modern-nav {
    display: flex;
    gap: 16px;
    align-items: center;
}

.modern-nav a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    position: relative;
}

.modern-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

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

.header-contact-btn {
    background-color: var(--primary-color);
    color: white !important;
    padding: 9px 18px;
    border-radius: 30px;
    font-weight: 700;
    box-shadow: 0 4px 14px 0 rgba(0, 140, 53, 0.39);
    white-space: nowrap;
}

.header-contact-btn::after {
    display: none;
}

.header-contact-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    color: white !important;
}

.header-phone-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background-color: #fff7ed;
    color: #ea580c !important;
    border: 1.5px solid #ff7a00;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(255, 122, 0, 0.15);
    transition: var(--transition);
}

.header-phone-btn::after {
    display: none !important;
}

.header-phone-btn:hover {
    background: linear-gradient(135deg, #ff851a 0%, #ff6600 100%);
    background-color: #ff7a00;
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(255, 122, 0, 0.35);
}

.header-phone-btn svg {
    display: inline-block;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.header-phone-btn:hover svg {
    transform: scale(1.15) rotate(8deg);
}

@media (min-width: 1240px) {
    .modern-nav {
        gap: 20px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .modern-nav {
        gap: 10px;
    }
    .modern-nav a {
        font-size: 13.5px;
    }
    .header-contact-btn {
        padding: 8px 14px;
        font-size: 13.5px;
    }
    .header-phone-btn {
        padding: 7px 12px;
        font-size: 13px;
        gap: 5px;
    }
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

@media (max-width: 991px) {
    .modern-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        box-sizing: border-box;
        background: var(--glass-bg);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        gap: 18px;
    }
    
    .modern-nav.active {
        display: flex;
    }
    
    .mobile-toggle {
        display: flex;
    }

    .header-contact-btn,
    .header-phone-btn {
        display: inline-flex;
        text-align: center;
        justify-content: center;
        width: 100%;
        max-width: 280px;
        box-sizing: border-box;
        margin: 2px auto;
    }
}

/* =========================================
   MODERN FOOTER
========================================= */
.modern-footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 60px 20px 20px;
    margin-top: 60px;
}

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

.footer-col h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #34d399;
}

.footer-col p, .footer-col ul {
    color: #f1f5f9;
    font-size: 0.95rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul a {
    color: #f1f5f9;
    text-decoration: none;
    transition: var(--transition);
    display: inline-block;
}

.footer-col ul a:hover {
    color: #34d399;
    text-decoration: underline;
    transform: translateX(5px);
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
    text-align: center;
    color: #cbd5e1;
    font-size: 0.95rem;
}

/* =========================================
   FLOATING ACTION BUTTONS (WHATSAPP & LLAMADA)
========================================= */
.modern-whatsapp {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    animation: bounce-subtle 2s infinite;
    text-decoration: none;
}

.modern-whatsapp img {
    width: 35px;
    height: 35px;
    filter: brightness(0) invert(1);
}

.modern-whatsapp:hover,
.modern-whatsapp:focus {
    transform: scale(1.1);
    animation: none;
    color: white;
    text-decoration: none;
}

/* Botón flotante para llamar (móvil) */
.modern-call {
    display: none;
    position: fixed;
    bottom: 92px;
    right: 20px;
    z-index: 9999;
    background-color: #ff7a00;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 14px rgba(255, 122, 0, 0.45);
    transition: var(--transition);
    animation: bounce-subtle 2s infinite;
    text-decoration: none;
}

.modern-call:hover,
.modern-call:focus {
    transform: scale(1.1);
    animation: none;
    color: white;
    text-decoration: none;
}

@media (max-width: 991px) {
    .modern-call {
        display: flex;
    }
}

@keyframes bounce-subtle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* =========================================
   WRAPPER ADJUSTMENT
========================================= */
#wrapper {
    padding-top: 80px; /* Space for fixed header */
    min-height: calc(100vh - 300px);
}
