* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colores Hospitalarios - Rojo, Azul y Plomo (Más Vivos) */
    --hospital-red: #FF1744;
    --hospital-dark-red: #D50000;
    --hospital-blue: #2196F3;
    --hospital-dark-blue: #1976D2;
    --hospital-plomo: #607D8B;
    --hospital-dark-plomo: #37474F;
    --hospital-light-plomo: #B0BEC5;
    
    /* Colores del Sistema */
    --nav-blue: #2196F3;
    --nav-dark: #1976D2;
    --text-dark: #263238;
    --text-light: #546E7A;
    --bg-light: #ECEFF1;
    --bg-white: #ffffff;
    --border-light: #CFD8DC;
}

html {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background: var(--bg-white);
    width: 100%;
    max-width: 100%;
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-top {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.container-header {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   BARRA SUPERIOR DE INFORMACIÓN
   ============================================ */
.top-info-bar-hospital {
    background: linear-gradient(135deg, var(--hospital-plomo) 0%, var(--hospital-dark-plomo) 100%);
    color: white;
    padding: 0.6rem 0;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.top-info-hospital {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.hospital-address,
.hospital-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.how-to-arrive {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: opacity 0.3s ease;
}

.how-to-arrive:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ============================================
   HEADER PRINCIPAL MEJORADO
   ============================================ */
.main-header-hospital {
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 50%, #e8ecf1 100%);
    padding: 2.5rem 0;
    border-bottom: 4px solid var(--hospital-blue);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.main-header-hospital::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF1744 0%, #2196F3 50%, #607D8B 100%);
}

.main-header-hospital::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(33, 150, 243, 0.05) 0%, transparent 70%);
    animation: header-pulse 8s ease-in-out infinite;
    z-index: 0;
}

@keyframes header-pulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.6; }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.hospital-logo-section {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.hospital-logo-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--hospital-blue) 0%, var(--hospital-dark-blue) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid var(--hospital-blue);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.hospital-logo-circle::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF1744, #2196F3, #607D8B);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.hospital-logo-circle:hover::before {
    opacity: 0.3;
}

.hospital-logo-circle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 35px rgba(33, 150, 243, 0.6);
}

.logo-inner {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-inner i {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--hospital-blue) 0%, var(--hospital-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: transform 0.3s ease;
}

.hospital-logo-circle:hover .logo-inner i {
    transform: scale(1.1);
}

.hospital-name h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #2196F3 0%, #FF1744 50%, #607D8B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.hospital-logo-section:hover .hospital-name h1 {
    transform: translateX(5px);
}

.hospital-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0.5rem 0 0 0;
    font-weight: 600;
    letter-spacing: 1px;
}

.hospital-slogan {
    text-align: right;
    position: relative;
}

.hospital-slogan h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #FF1744 0%, #2196F3 50%, #607D8B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.hospital-slogan:hover h2 {
    transform: scale(1.05);
}

.slogan-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0.5rem 0 0 0;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ============================================
   LAYOUT PRINCIPAL CON SIDEBAR
   ============================================ */
.main-layout {
    display: flex;
    min-height: calc(100vh - 300px);
}

/* ============================================
   SIDEBAR DE NAVEGACIÓN
   ============================================ */
.sidebar-navigation {
    width: 280px;
    background: linear-gradient(180deg, var(--hospital-dark-plomo) 0%, #263238 100%);
    min-height: 100%;
    padding: 0;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.sidebar-navigation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #FF1744 0%, #2196F3 50%, #607D8B 100%);
    z-index: 1;
}

.sidebar-nav {
    padding: 0;
}

.nav-main-categories {
    list-style: none;
}

.nav-category {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-link {
    display: block;
    padding: 1.2rem 1.5rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background 0.3s ease;
}

.nav-category.active .category-link {
    background: linear-gradient(90deg, rgba(33, 150, 243, 0.2) 0%, rgba(33, 150, 243, 0.1) 100%);
    border-left: 4px solid var(--hospital-blue);
    box-shadow: inset 0 0 10px rgba(33, 150, 243, 0.2);
}

.category-link:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(5px);
    transition: all 0.3s ease;
    box-shadow: inset 4px 0 10px rgba(33, 150, 243, 0.3);
}

.nav-sub-items {
    list-style: none;
    background: rgba(0, 0, 0, 0.2);
    padding: 0;
    display: none;
}

.nav-category.active .nav-sub-items {
    display: block;
}

.nav-sub-items li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-sub-items a {
    display: block;
    padding: 0.8rem 1.5rem 0.8rem 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.nav-sub-items a:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 3rem;
    color: white;
}

/* ============================================
   PANEL DE LLAMADA A LA ACCIÓN (SIDEBAR)
   ============================================ */
.sidebar-cta {
    padding: 1.5rem;
    margin-top: 2rem;
}

.cta-box {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid var(--hospital-red);
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 23, 68, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 23, 68, 0.3);
}

.cta-header {
    margin-bottom: 1rem;
}

.cta-header i {
    font-size: 3rem;
    color: var(--hospital-red);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.15) 0%, rgba(255, 23, 68, 0.08) 100%);
    padding: 1rem;
    border-radius: 15px;
    display: inline-block;
    transition: all 0.4s ease;
}

.cta-box:hover .cta-header i {
    transform: scale(1.15) rotate(10deg);
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.25) 0%, rgba(255, 23, 68, 0.15) 100%);
    box-shadow: 0 4px 15px rgba(255, 23, 68, 0.4);
}

.cta-header h3 {
    font-size: 1.2rem;
    color: var(--hospital-red);
    font-weight: 700;
    margin: 0;
}

.cta-content {
    color: var(--text-dark);
}

.cta-info {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
}

.cta-hours {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.cta-button {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--hospital-red) 0%, var(--hospital-dark-red) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(255, 23, 68, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.cta-button:hover::before {
    width: 300px;
    height: 300px;
}

.cta-button:hover {
    background: linear-gradient(135deg, var(--hospital-dark-red) 0%, var(--hospital-red) 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 23, 68, 0.6);
}

.cta-button span {
    position: relative;
    z-index: 1;
}

/* ============================================
   CONTENIDO PRINCIPAL MEJORADO
   ============================================ */
.main-content-area {
    flex: 1;
    padding: 3rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    min-height: 100vh;
    position: relative;
}

.main-content-area::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(33, 150, 243, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.main-content-area::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 23, 68, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.welcome-section {
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.welcome-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2196F3 0%, #FF1744 50%, #607D8B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    padding-bottom: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: title-glow 3s ease-in-out infinite;
}

@keyframes title-glow {
    0%, 100% { filter: drop-shadow(0 0 5px rgba(33, 150, 243, 0.3)); }
    50% { filter: drop-shadow(0 0 15px rgba(33, 150, 243, 0.6)); }
}

.welcome-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 5px;
    background: linear-gradient(90deg, #FF1744 0%, #2196F3 50%, #607D8B 100%);
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(33, 150, 243, 0.4);
    animation: line-expand 2s ease-in-out infinite;
}

@keyframes line-expand {
    0%, 100% { width: 150px; }
    50% { width: 200px; }
}

/* Imagen del Hospital Mejorada */
.hospital-image-container {
    position: relative;
    margin-bottom: 2rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
    border: 4px solid var(--hospital-blue);
    transition: all 0.4s ease;
}

.hospital-image-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(33, 150, 243, 0.3);
    border-color: var(--hospital-red);
}

.hospital-main-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hospital-image-container:hover .hospital-main-image {
    transform: scale(1.08);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    padding: 2.5rem;
    color: white;
    z-index: 2;
}

.overlay-content h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.overlay-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    font-weight: 600;
}

.ambulance-access-sign {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, #FF1744 0%, #D50000 100%);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    border: 2px solid white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(255, 23, 68, 0.4);
    z-index: 10;
    animation: pulse-red 2s ease-in-out infinite;
}

@keyframes pulse-red {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 23, 68, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(255, 23, 68, 0.6);
    }
}

.ambulance-access-sign i {
    font-size: 1.2rem;
}

/* Mapa e Imagen Secundaria */
.map-image-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.map-container {
    border: 4px solid var(--hospital-blue);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    transition: all 0.4s ease;
}

.map-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(33, 150, 243, 0.4);
    border-color: var(--hospital-red);
}

.map-placeholder {
    width: 100%;
    height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    position: relative;
}

.map-placeholder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(33,150,243,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.map-placeholder i {
    font-size: 4rem;
    color: var(--hospital-blue);
    margin-bottom: 1.5rem;
    z-index: 1;
    position: relative;
    background: white;
    padding: 1.5rem;
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
    transition: all 0.4s ease;
}

.map-container:hover .map-placeholder i {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.5);
}

.map-placeholder p {
    color: var(--hospital-dark-plomo);
    font-weight: 700;
    font-size: 1.3rem;
    z-index: 1;
    position: relative;
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.map-address {
    color: var(--hospital-plomo) !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    margin-top: 0.5rem !important;
}

.hospital-secondary-image {
    position: relative;
    border: 4px solid var(--hospital-red);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(255, 23, 68, 0.3);
    transition: all 0.4s ease;
}

.hospital-secondary-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(255, 23, 68, 0.4);
    border-color: var(--hospital-blue);
}

.secondary-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hospital-secondary-image:hover .secondary-img {
    transform: scale(1.1);
}

.image-badge {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 23, 68, 0.95) 0%, rgba(213, 0, 0, 0.95) 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    z-index: 2;
}

.hospital-secondary-image:hover .image-badge {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.image-badge i {
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 8px;
}

/* Información de Contacto Mejorada */
.contact-info-section {
    padding: 2.5rem;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 50%, #90caf9 100%);
    border-radius: 20px;
    border-left: 6px solid var(--hospital-blue);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.contact-info-section:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(33, 150, 243, 0.4);
    border-left-color: var(--hospital-red);
}

.contact-info-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(33, 150, 243, 0.15) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.contact-info-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 23, 68, 0.1) 0%, transparent 70%);
    animation: rotate-reverse 25s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes rotate-reverse {
    from {
        transform: rotate(360deg);
    }
    to {
        transform: rotate(0deg);
    }
}

.contact-address,
.contact-location,
.contact-phone {
    margin-bottom: 1rem;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.contact-address i,
.contact-phone i {
    font-size: 1.3rem;
    color: var(--hospital-blue);
    background: rgba(33, 150, 243, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-location {
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 500;
}

.how-to-arrive-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--hospital-blue);
    text-decoration: none;
    font-weight: 700;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(33, 150, 243, 0.1);
    border-radius: 10px;
    border: 2px solid var(--hospital-blue);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.how-to-arrive-link:hover {
    background: var(--hospital-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
    text-decoration: none;
}

.how-to-arrive-link i {
    font-size: 1.2rem;
}

/* ============================================
   ACCESOS RÁPIDOS
   ============================================ */
.quick-access-section {
    margin-top: 5rem;
    padding-top: 4rem;
    border-top: 4px solid var(--hospital-blue);
    position: relative;
}

.quick-access-section::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, #FF1744 0%, #2196F3 50%, #607D8B 100%);
    border-radius: 2px;
    box-shadow: 0 2px 10px rgba(33, 150, 243, 0.4);
    animation: line-glow 2s ease-in-out infinite;
}

@keyframes line-glow {
    0%, 100% { box-shadow: 0 2px 10px rgba(33, 150, 243, 0.4); }
    50% { box-shadow: 0 2px 20px rgba(33, 150, 243, 0.7); }
}

.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.quick-access-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid transparent;
    border-radius: 20px;
    padding: 2.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.quick-access-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05) 0%, rgba(255, 23, 68, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.quick-access-card:hover::before {
    opacity: 1;
}

.quick-access-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(33, 150, 243, 0.1) 0%, transparent 70%);
    transition: transform 0.6s ease;
    transform: scale(0);
    z-index: 0;
}

.quick-access-card:hover::after {
    transform: scale(1);
}

.quick-access-card:hover {
    border-color: var(--hospital-blue);
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 15px 40px rgba(33, 150, 243, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
}

.quick-access-card i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.15) 0%, rgba(33, 150, 243, 0.08) 100%);
    padding: 1.5rem;
    border-radius: 20px;
    display: inline-block;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.quick-access-card i::before {
    background: linear-gradient(135deg, var(--hospital-blue) 0%, var(--hospital-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quick-access-card:hover i {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.25) 0%, rgba(255, 23, 68, 0.15) 100%);
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
}

.quick-access-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 2;
    background: linear-gradient(135deg, #2196F3 0%, #FF1744 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.quick-access-card:hover h3 {
    transform: translateY(-3px);
}

.quick-access-card--formularios {
    border-color: #7b1fa2;
    background: linear-gradient(145deg, #fff 0%, #f3e5f5 100%);
}

.quick-access-card--formularios i {
    color: #7b1fa2;
}

.quick-access-card--formularios:hover {
    border-color: #6a1b9a;
    box-shadow: 0 10px 28px rgba(123, 31, 162, 0.22);
}

.quick-access-card p {
    color: var(--text-light);
    font-size: 1rem;
    position: relative;
    z-index: 2;
    font-weight: 500;
}

/* ============================================
   FOOTER MEJORADO
   ============================================ */
.footer {
    background: linear-gradient(180deg, #1a1a1a 0%, #2d2d2d 50%, #263238 100%);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF1744 0%, #2196F3 50%, #607D8B 100%);
}

.footer::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(33, 150, 243, 0.05) 0%, transparent 70%);
    animation: footer-pulse 8s ease-in-out infinite;
    z-index: 0;
}

@keyframes footer-pulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.6; }
}

.footer .container {
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    text-align: center;
}

.footer-section {
    position: relative;
    padding: 1.5rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.footer-section:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #2196F3 0%, #FF1744 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #FF1744 0%, #2196F3 100%);
    border-radius: 2px;
}

.footer-section > p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1rem;
    font-weight: 500;
}

.footer-contact {
    margin-top: 1.5rem;
}

.footer-contact p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
}

.footer-contact p:hover {
    color: white;
    background: rgba(33, 150, 243, 0.1);
    transform: translateX(5px);
}

.footer-contact p i {
    font-size: 1.2rem;
    color: #2196F3;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(33, 150, 243, 0.15);
    border-radius: 50%;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.footer-contact p:hover i {
    background: rgba(33, 150, 243, 0.3);
    transform: scale(1.1);
    color: #FF1744;
}

.footer-contact p span {
    flex: 1;
    text-align: left;
}

.footer-contact p a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-contact p a:hover {
    color: #2196F3;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 2.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    position: relative;
}

.footer-bottom::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 2px;
    background: linear-gradient(90deg, #FF1744 0%, #2196F3 50%, #607D8B 100%);
    border-radius: 2px;
}

.footer-bottom p {
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar-navigation {
        width: 100%;
        order: 2;
    }
    
    .main-content-area {
        order: 1;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .hospital-slogan {
        text-align: center;
    }
    
    .map-image-container {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   RESPONSIVE PARA MÓVILES - MEJORADO
   ============================================ */

/* Menú Hamburguesa para Móvil */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: linear-gradient(135deg, var(--hospital-blue) 0%, var(--hospital-dark-blue) 100%);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
    transition: all 0.3s ease;
}

.mobile-menu-toggle i {
    pointer-events: none;
}

.mobile-menu-toggle[aria-expanded="true"] {
    background: linear-gradient(135deg, var(--hospital-red) 0%, var(--hospital-dark-red) 100%);
    box-shadow: 0 8px 24px rgba(255, 23, 68, 0.45);
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.6);
}

.mobile-menu-toggle:focus {
    outline: 3px solid rgba(33, 150, 243, 0.5);
    outline-offset: 2px;
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(2px);
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

body.menu-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar-navigation {
        width: 100%;
        order: 2;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .sidebar-navigation.mobile-open {
        max-height: 1000px;
    }
    
    .main-content-area {
        order: 1;
        padding: 2rem 1.5rem;
        margin-top: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Asegurar que el header no se superponga con el botón del menú */
    .main-header-hospital {
        position: relative;
        z-index: 1;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .hospital-slogan {
        text-align: center;
    }
    
    .map-image-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .main-content-area::before,
    .main-content-area::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .main-layout {
        min-height: auto;
    }

    /* Barra Superior */
    .top-info-bar-hospital {
        padding: 0.5rem 0;
        font-size: 0.8rem;
    }
    
    .top-info-hospital {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0 1rem;
    }
    
    .hospital-address,
    .hospital-phone {
        font-size: 0.75rem;
    }
    
    .how-to-arrive {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Header Principal */
    .main-header-hospital {
        padding: 1.5rem 0;
    }
    
    .container-header {
        padding: 0 1rem;
    }
    
    .hospital-logo-section {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .hospital-logo-circle {
        width: 90px;
        height: 90px;
    }
    
    .logo-inner {
        width: 70px;
        height: 70px;
    }
    
    .logo-inner i {
        font-size: 2.2rem;
    }
    
    .hospital-name h1 {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }
    
    .hospital-subtitle {
        font-size: 0.85rem;
    }
    
    .hospital-slogan {
        text-align: center;
        width: 100%;
    }
    
    .hospital-slogan h2 {
        font-size: 1.6rem;
        letter-spacing: 1px;
    }
    
    .slogan-subtitle {
        font-size: 0.85rem;
    }
    
    /* Menú Móvil */
    .mobile-menu-toggle {
        display: block;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        padding: 0;
        border-radius: 14px;
        backdrop-filter: blur(8px);
    }
    
    .sidebar-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        max-width: 85vw;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-top-right-radius: 18px;
        border-bottom-right-radius: 18px;
    }
    
    .sidebar-navigation.mobile-open {
        left: 0;
        max-height: 100vh;
    }
    
    .mobile-menu-overlay.active {
        display: block;
    }
    
    /* Ajustar contenido cuando el menú está abierto */
    body.menu-open {
        overflow: hidden;
    }
    
    /* Ajustar padding del sidebar en móvil */
    .sidebar-nav {
        padding-top: 1rem;
    }
    
    .nav-category {
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }
    
    .category-link {
        padding: 1rem 1.25rem;
        font-size: 1rem;
    }
    
    .nav-sub-items a {
        padding: 0.75rem 1.25rem 0.75rem 2rem;
        font-size: 0.9rem;
    }
    
    .main-content-area {
        padding: 1.5rem 1rem;
        margin-top: 0;
    }

    .quick-access-card {
        border-radius: 16px;
    }

    .quick-access-card:hover {
        transform: translateY(-6px);
    }
    
    /* Sección de Bienvenida */
    .welcome-title {
        font-size: 2rem;
        letter-spacing: 1px;
        margin-bottom: 2rem;
    }
    
    .welcome-title::after {
        width: 100px;
    }
    
    /* Imágenes */
    .hospital-image-container {
        margin-bottom: 1.5rem;
        border-radius: 15px;
    }
    
    .hospital-main-image {
        height: 250px;
    }
    
    .image-overlay {
        padding: 1.5rem;
    }
    
    .overlay-content h3 {
        font-size: 1.5rem;
    }
    
    .overlay-content p {
        font-size: 0.9rem;
    }
    
    .ambulance-access-sign {
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
    
    .hospital-secondary-image {
        margin-bottom: 1.5rem;
    }
    
    .secondary-img {
        height: 200px;
    }
    
    .image-badge {
        bottom: 1rem;
        left: 1rem;
        right: 1rem;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .map-container {
        margin-bottom: 1.5rem;
    }
    
    .map-placeholder {
        padding: 2rem 1rem;
    }
    
    .map-placeholder i {
        font-size: 2.5rem;
        padding: 1rem;
    }
    
    .map-placeholder p {
        font-size: 1rem;
    }
    
    .map-address {
        font-size: 0.85rem;
    }
    
    /* Información de Contacto */
    .contact-info-section {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .contact-address,
    .contact-phone {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .contact-address i,
    .contact-phone i {
        font-size: 1.1rem;
        width: 35px;
        height: 35px;
    }
    
    .contact-location {
        font-size: 0.85rem;
    }
    
    .how-to-arrive-link {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        margin-top: 0.75rem;
    }
    
    /* Tarjetas de Acceso Rápido */
    .quick-access-section {
        margin-top: 3rem;
        padding-top: 2rem;
    }
    
    .quick-access-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .quick-access-card {
        padding: 2rem 1.5rem;
    }
    
    .quick-access-card i {
        width: 80px;
        height: 80px;
        font-size: 3rem;
        margin-bottom: 1rem;
    }
    
    .quick-access-card h3 {
        font-size: 1.2rem;
    }
    
    .quick-access-card p {
        font-size: 0.9rem;
    }
    
    /* Sidebar */
    .sidebar-cta {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    .cta-box {
        padding: 1.5rem;
    }
    
    .cta-header i {
        font-size: 2.5rem;
        padding: 0.75rem;
    }
    
    .cta-header h3 {
        font-size: 1rem;
    }
    
    .cta-info,
    .cta-hours {
        font-size: 0.85rem;
    }
    
    .cta-button {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        padding: 3rem 1rem 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section {
        padding: 1.5rem 1rem;
    }
    
    .footer-section h3 {
        font-size: 1.3rem;
    }
    
    .footer-section > p {
        font-size: 0.9rem;
    }
    
    .footer-contact p {
        font-size: 0.9rem;
        justify-content: center;
        padding: 0.4rem;
    }
    
    .footer-contact p i {
        font-size: 1.1rem;
        width: 28px;
        height: 28px;
    }
    
    .footer-bottom {
        font-size: 0.85rem;
        padding-top: 2rem;
    }
}

@media (max-width: 480px) {
    /* Barra Superior - Móviles Pequeños */
    .top-info-bar-hospital {
        font-size: 0.7rem;
        padding: 0.4rem 0;
        margin-top: 60px; /* Espacio para el botón del menú */
    }
    
    .hospital-address,
    .hospital-phone {
        font-size: 0.7rem;
    }
    
    .hospital-address span,
    .hospital-phone span {
        display: none;
    }
    
    .hospital-address i,
    .hospital-phone i {
        margin-right: 0.25rem;
    }
    
    .main-header-hospital {
        margin-top: 0;
    }
    
    /* Header - Móviles Pequeños */
    .main-header-hospital {
        padding: 1rem 0;
    }
    
    .hospital-logo-circle {
        width: 70px;
        height: 70px;
    }
    
    .logo-inner {
        width: 55px;
        height: 55px;
    }
    
    .logo-inner i {
        font-size: 1.8rem;
    }
    
    .hospital-name h1 {
        font-size: 1.2rem;
        letter-spacing: 0.5px;
    }
    
    .hospital-subtitle {
        font-size: 0.75rem;
    }
    
    .hospital-slogan h2 {
        font-size: 1.3rem;
        letter-spacing: 0.5px;
    }
    
    .slogan-subtitle {
        font-size: 0.75rem;
    }
    
    /* Menú Móvil */
    .mobile-menu-toggle {
        top: 0.5rem;
        left: 0.5rem;
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    .sidebar-navigation {
        width: 100%;
    }
    
    /* Contenido */
    .main-content-area {
        padding: 1rem 0.75rem;
        margin-top: 0;
    }
    
    .welcome-title {
        font-size: 1.6rem;
        padding-bottom: 1rem;
    }
    
    .hospital-main-image {
        height: 200px;
    }
    
    .overlay-content h3 {
        font-size: 1.2rem;
    }
    
    .overlay-content p {
        font-size: 0.8rem;
    }
    
    .ambulance-access-sign {
        top: 0.5rem;
        right: 0.5rem;
        padding: 0.4rem 0.75rem;
        font-size: 0.65rem;
    }
    
    .secondary-img {
        height: 150px;
    }
    
    .image-badge {
        padding: 0.6rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .map-placeholder {
        padding: 1.5rem 0.75rem;
    }
    
    .map-placeholder i {
        font-size: 2rem;
        padding: 0.75rem;
    }
    
    .contact-info-section {
        padding: 1rem;
    }
    
    .contact-address,
    .contact-phone {
        font-size: 0.85rem;
    }
    
    .contact-address i,
    .contact-phone i {
        font-size: 1rem;
        width: 30px;
        height: 30px;
    }
    
    .quick-access-card {
        padding: 1.5rem 1rem;
    }
    
    .quick-access-card i {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }
    
    .quick-access-card h3 {
        font-size: 1.1rem;
    }
    
    .quick-access-card p {
        font-size: 0.85rem;
    }
    
    .cta-box {
        padding: 1rem;
    }
    
    .cta-header i {
        font-size: 2rem;
    }
    
    .cta-header h3 {
        font-size: 0.9rem;
    }
    
    .footer {
        padding: 2.5rem 1rem 1.5rem;
    }
    
    .footer-content {
        gap: 1.5rem;
    }
    
    .footer-section {
        padding: 1.25rem 0.75rem;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
        padding-bottom: 0.5rem;
    }
    
    .footer-section h3::after {
        width: 50px;
        height: 2px;
    }
    
    .footer-section > p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }
    
    .footer-contact p {
        font-size: 0.8rem;
        padding: 0.35rem;
        margin-bottom: 0.5rem;
    }
    
    .footer-contact p i {
        font-size: 1rem;
        width: 25px;
        height: 25px;
    }
    
    .footer-bottom {
        font-size: 0.75rem;
        padding-top: 1.5rem;
    }
    
    .footer-bottom::before {
        width: 100px;
    }
    
    /* Asegurar que los botones sean fáciles de tocar */
    button,
    .btn-submit,
    .btn-cancel,
    .cta-button,
    .how-to-arrive-link {
        min-height: 44px; /* Tamaño mínimo recomendado para toques */
        min-width: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   ESTILOS PARA PÁGINA DE ÁREAS DE MEDICINA
   ============================================ */

/* Barra Superior de Áreas */
.top-info-bar-areas {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 0.75rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.container-top-areas {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.top-info-areas {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.hospital-info-areas {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.hospital-info-areas i {
    color: #FF1744;
    font-size: 1.2rem;
}

.top-info-links-areas {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.emergency-link-areas, .home-link-areas {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9rem;
}

.emergency-link-areas {
    background: linear-gradient(135deg, #FF1744 0%, #D50000 100%);
    box-shadow: 0 2px 8px rgba(255, 23, 68, 0.3);
}

.emergency-link-areas:hover {
    background: linear-gradient(135deg, #D50000 0%, #FF1744 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.5);
}

.home-link-areas {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.home-link-areas:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Header Principal de Áreas */
.main-header-areas {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 50%, #FF1744 100%);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.3);
}

.container-header-areas {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.header-areas-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
}

.hospital-brand-areas {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.logo-areas-wrapper {
    position: relative;
}

.logo-areas-circle {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    animation: pulse-logo 3s ease-in-out infinite;
}

@keyframes pulse-logo {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2); }
    50% { transform: scale(1.05); box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3); }
}

.logo-areas-inner {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FF1744;
    font-size: 2.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.hospital-title-areas {
    color: white;
}

.hospital-title-areas h1 {
    font-size: 2.8rem;
    margin: 0;
    font-weight: 800;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: 2px;
    background: linear-gradient(135deg, #ffffff 0%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle-areas {
    font-size: 1.2rem;
    margin-top: 0.5rem;
    opacity: 0.95;
    font-weight: 500;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

.header-areas-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.decoration-wave {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: wave-animation 8s ease-in-out infinite;
}

.wave-1 {
    top: -50%;
    right: -50%;
    animation-delay: 0s;
}

.wave-2 {
    bottom: -50%;
    left: -50%;
    animation-delay: 4s;
}

@keyframes wave-animation {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.3; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 0.6; }
}

.decoration-circle-areas {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.decoration-circle-areas.circle-1 {
    width: 150px;
    height: 150px;
    top: -75px;
    right: 10%;
    animation-delay: 0s;
}

.decoration-circle-areas.circle-2 {
    width: 100px;
    height: 100px;
    bottom: -50px;
    left: 15%;
    animation-delay: 2s;
}

.decoration-circle-areas.circle-3 {
    width: 80px;
    height: 80px;
    top: 50%;
    right: 5%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) translateX(0); }
    33% { transform: translateY(-20px) translateX(10px); }
    66% { transform: translateY(20px) translateX(-10px); }
}

/* Contenedor de Áreas Médicas */
.medicine-areas-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.welcome-banner {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    margin-bottom: 3rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.3);
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.welcome-banner h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.welcome-banner p {
    font-size: 1.2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.success-message {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 5px solid #28a745;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message i {
    font-size: 2rem;
    color: #28a745;
}

.search-section {
    margin-bottom: 3rem;
}

.search-box {
    display: flex;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 3px solid #2196F3;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2);
    border-color: #1976D2;
}

.search-box button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.search-box button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .areas-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.area-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.area-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.05) 0%, rgba(255, 23, 68, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.area-card:hover::before {
    opacity: 1;
}

.area-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(33, 150, 243, 0.1) 0%, transparent 70%);
    transition: transform 0.6s ease;
    transform: scale(0);
}

.area-card:hover::after {
    transform: scale(1);
}

.area-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(33, 150, 243, 0.25);
    border-color: #2196F3;
}

.area-card-content {
    padding: 2.5rem;
    position: relative;
    z-index: 2;
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.area-icon-wrapper {
    position: relative;
    margin-bottom: 2rem;
    display: inline-block;
}

.area-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.4);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
}

.area-icon::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: linear-gradient(135deg, #2196F3 0%, #FF1744 100%);
    border-radius: 25px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.area-card:hover .area-icon::before {
    opacity: 0.3;
}

.area-card:hover .area-icon {
    background: linear-gradient(135deg, #FF1744 0%, #D50000 100%);
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 12px 35px rgba(255, 23, 68, 0.5);
}

.area-card h3 {
    font-size: 1.8rem;
    color: #263238;
    margin-bottom: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, #2196F3 0%, #FF1744 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.area-card:hover h3 {
    transform: translateX(5px);
}

.area-card p {
    color: #546E7A;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.area-features {
    list-style: none;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #2196F3;
}

.area-features li {
    padding: 0.75rem 0;
    color: #607D8B;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.area-features li:hover {
    color: #2196F3;
    transform: translateX(5px);
}

.area-features li i {
    color: #2196F3;
    font-size: 1rem;
    width: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.area-card:hover .area-features li i {
    color: #FF1744;
    transform: scale(1.2);
}

.area-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
    width: 100%;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.area-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.area-btn:hover::before {
    width: 300px;
    height: 300px;
}

.area-btn:hover {
    background: linear-gradient(135deg, #FF1744 0%, #D50000 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 23, 68, 0.5);
}

.area-btn span {
    position: relative;
    z-index: 1;
}

.area-btn i {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.area-btn:hover i {
    transform: rotate(15deg) scale(1.2);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #2196F3;
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    background: white;
    border-radius: 8px;
    border: 2px solid #2196F3;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.back-link:hover {
    background: #2196F3;
    color: white;
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.4);
}

/* Estilos globales para prevenir overflow en todas las páginas */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

table {
    width: 100%;
    table-layout: fixed;
    word-wrap: break-word;
}

/* Responsive para Áreas de Medicina */
@media (max-width: 1024px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    .container-header-areas {
        padding: 0 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .header-areas-content {
        gap: 1.5rem;
        width: 100%;
    }
    
    .areas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .medicine-areas-container {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .area-card {
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    /* Prevenir overflow horizontal */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
        position: relative;
    }
    
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Barra Superior de Áreas */
    .top-info-bar-areas {
        padding: 0.5rem 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    .container-top-areas {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .top-info-areas {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        width: 100%;
    }
    
    .hospital-info-areas {
        justify-content: center;
        font-size: 0.85rem;
        width: 100%;
        flex-wrap: wrap;
    }
    
    .top-info-links-areas {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }
    
    .emergency-link-areas,
    .home-link-areas {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
        font-size: 0.85rem;
        box-sizing: border-box;
        word-wrap: break-word;
    }
    
    /* Header de Áreas */
    .main-header-areas {
        padding: 2rem 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    .container-header-areas {
        padding: 0 1rem;
        width: 100%;
        max-width: 100%;
    }
    
    .header-areas-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        width: 100%;
    }
    
    .hospital-brand-areas {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .hospital-title-areas {
        width: 100%;
    }
    
    .hospital-title-areas h1 {
        font-size: 1.8rem;
        letter-spacing: 1px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .subtitle-areas {
        font-size: 0.9rem;
        word-wrap: break-word;
    }
    
    .logo-areas-circle {
        width: 80px;
        height: 80px;
        flex-shrink: 0;
    }
    
    .logo-areas-inner {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .header-areas-decoration {
        display: none;
    }
    
    /* Contenedor de Áreas */
    .medicine-areas-container {
        padding: 1.5rem 1rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .welcome-banner {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
        width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
    }
    
    .welcome-banner h1 {
        font-size: 1.8rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .welcome-banner p {
        font-size: 1rem;
        word-wrap: break-word;
    }
    
    /* Grid de Áreas */
    .areas-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .area-card {
        padding: 1.5rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .area-card-content {
        width: 100%;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .area-icon-wrapper {
        width: 70px;
        height: 70px;
        flex-shrink: 0;
    }
    
    .area-icon {
        font-size: 2.5rem;
    }
    
    .area-card h3 {
        font-size: 1.3rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .area-card p {
        font-size: 0.9rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .area-features {
        padding: 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .area-features li {
        font-size: 0.9rem;
        padding: 0.5rem 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .area-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        box-sizing: border-box;
        word-wrap: break-word;
    }
    
    .search-box {
        flex-direction: column;
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
        box-sizing: border-box;
    }
    
    .search-box button {
        width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    /* Prevenir overflow horizontal en móviles pequeños */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100% !important;
        position: relative;
    }
    
    * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Barra Superior - Móviles Pequeños */
    .top-info-bar-areas {
        font-size: 0.8rem;
        width: 100%;
        overflow-x: hidden;
    }
    
    .container-top-areas {
        padding: 0 0.75rem;
    }
    
    .hospital-info-areas {
        font-size: 0.75rem;
    }
    
    .hospital-info-areas span {
        display: none;
    }
    
    /* Header - Móviles Pequeños */
    .main-header-areas {
        padding: 1.5rem 0;
        width: 100%;
        overflow-x: hidden;
    }
    
    .container-header-areas {
        padding: 0 0.75rem;
    }
    
    .hospital-title-areas h1 {
        font-size: 1.4rem;
        letter-spacing: 0.5px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.3;
    }
    
    .subtitle-areas {
        font-size: 0.8rem;
        word-wrap: break-word;
    }
    
    .logo-areas-circle {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }
    
    .logo-areas-inner {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
    
    /* Contenedor */
    .medicine-areas-container {
        padding: 1rem 0.75rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .welcome-banner {
        padding: 1.5rem 1rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .welcome-banner h1 {
        font-size: 1.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .welcome-banner p {
        font-size: 0.9rem;
        word-wrap: break-word;
    }
    
    /* Tarjetas de Áreas */
    .area-card {
        padding: 1.25rem;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .area-icon-wrapper {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }
    
    .area-icon {
        font-size: 2rem;
    }
    
    .area-card h3 {
        font-size: 1.1rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
        line-height: 1.3;
    }
    
    .area-card p {
        font-size: 0.85rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .area-features {
        padding: 0.75rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .area-features li {
        font-size: 0.85rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .area-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        width: 100%;
        box-sizing: border-box;
    }
    
    .search-box {
        width: 100%;
        padding: 0;
    }
    
    .search-box input,
    .search-box button {
        width: 100%;
        box-sizing: border-box;
    }
}

/* ============================================
   ESTILOS PARA PÁGINA DE REGISTRO DE PACIENTES
   ============================================ */

/* Barra Superior de Registro */
.hospital-info-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
}

.hospital-info-header i {
    font-size: 1.3rem;
    color: #2196F3;
    background: rgba(33, 150, 243, 0.15);
    padding: 0.5rem;
    border-radius: 6px;
}

.top-info-links-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.emergency-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    background: rgba(255, 23, 68, 0.2);
    border-radius: 6px;
    border: 2px solid rgba(255, 23, 68, 0.4);
    transition: all 0.3s ease;
}

.emergency-link:hover {
    background: rgba(255, 23, 68, 0.3);
    border-color: #FF1744;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 23, 68, 0.3);
}

.emergency-link i {
    font-size: 1.1rem;
    color: #FF1744;
}

/* Header Principal de Registro */
.main-header-registro {
    background: linear-gradient(135deg, #ffffff 0%, #f5f7fa 50%, #e8ecf1 100%);
    padding: 2rem 0;
    border-bottom: 4px solid #2196F3;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.main-header-registro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FF1744 0%, #2196F3 50%, #607D8B 100%);
}

.header-registro-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.hospital-brand {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-registro {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
    position: relative;
    transition: transform 0.3s ease;
}

.logo-registro:hover {
    transform: scale(1.05);
}

.logo-registro::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 12px;
    padding: 3px;
    background: linear-gradient(135deg, #FF1744, #2196F3, #607D8B);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    z-index: -1;
}

.logo-registro i {
    font-size: 2rem;
    color: white;
    z-index: 1;
    position: relative;
}

.hospital-title-registro h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #263238;
    margin: 0;
    line-height: 1.2;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle-registro {
    font-size: 0.95rem;
    color: #607D8B;
    margin: 0.5rem 0 0 0;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.header-decoration {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.decoration-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: float-decoration 3s ease-in-out infinite;
}

.decoration-circle.circle-1 {
    background: #FF1744;
    animation-delay: 0s;
}

.decoration-circle.circle-2 {
    background: #2196F3;
    animation-delay: 0.5s;
}

.decoration-circle.circle-3 {
    background: #607D8B;
    animation-delay: 1s;
}

@keyframes float-decoration {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(-10px);
        opacity: 0.7;
    }
}

/* Estilos del Formulario de Registro */
.registration-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
    border-radius: 12px;
}

.registration-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.4);
    position: relative;
    overflow: hidden;
}

.registration-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

.registration-header h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.registration-header p {
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
    opacity: 0.95;
}

.registration-form {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(30, 144, 255, 0.1);
}

.form-section {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 10px;
    border-left: 5px solid var(--hospital-blue);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(30, 144, 255, 0.15);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section-title {
    font-size: 1.4rem;
    color: #2196F3;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-section-title i {
    color: #FF1744;
    font-size: 1.6rem;
    background: rgba(255, 23, 68, 0.15);
    padding: 0.5rem;
    border-radius: 8px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 23, 68, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--hospital-dark-plomo);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.form-group label .required {
    color: #FF1744;
    margin-left: 3px;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 4px rgba(33, 150, 243, 0.2);
    transform: translateY(-1px);
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--hospital-plomo);
}

/* Estilos para campos con formato incorrecto */
.form-group input:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: #FF1744;
    box-shadow: 0 0 0 3px rgba(255, 23, 68, 0.1);
}

.form-group input:valid:not(:placeholder-shown) {
    border-color: #28a745;
}

/* Indicador visual para campos numéricos */
input[inputmode="numeric"] {
    text-align: center;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Indicador visual para campos de solo letras */
input[pattern*="[A-Za-z"]:not([pattern*="0-9"]) {
    text-transform: capitalize;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Mensaje de ayuda para campos del formulario */
.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: #607D8B;
    font-size: 0.85rem;
    line-height: 1.4;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #e3f2fd 100%);
    border-radius: 6px;
    border-left: 3px solid #2196F3;
}

.form-group small i {
    color: #2196F3;
    margin-right: 0.5rem;
}

/* Estilo especial para el campo de fecha */
#fecha_nacimiento {
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-align: center;
    font-weight: 600;
}

#fecha_nacimiento::placeholder {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    font-weight: 400;
    color: #90A4AE;
    text-align: left;
}

#fecha_nacimiento:focus::placeholder {
    opacity: 0.5;
}

.form-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-light);
}

.btn-submit {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 1.1rem 3.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #1976D2 0%, #2196F3 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.5);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-cancel {
    background: linear-gradient(135deg, #607D8B 0%, #37474F 100%);
    color: white;
    padding: 1.1rem 3.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(96, 125, 139, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cancel:hover {
    background: linear-gradient(135deg, #37474F 0%, #607D8B 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(96, 125, 139, 0.4);
}

.alert {
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    display: none;
    border-left: 5px solid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-color: #28a745;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-color: #FF1744;
}

/* Responsive para Registro de Pacientes */
@media (max-width: 1024px) {
    .registration-container {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Barra Superior de Registro */
    .top-info-bar-hospital {
        padding: 0.5rem 0;
        font-size: 0.85rem;
    }
    
    .container-top {
        padding: 0 1rem;
    }
    
    .top-info-hospital {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .hospital-info-header {
        font-size: 0.8rem;
    }
    
    .top-info-links-header {
        width: 100%;
    }
    
    .emergency-link {
        width: 100%;
        justify-content: center;
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    /* Header de Registro */
    .main-header-registro {
        padding: 2rem 0;
    }
    
    .container-header {
        padding: 0 1rem;
    }
    
    .header-registro-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .hospital-brand {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hospital-title-registro h1 {
        font-size: 1.6rem;
        letter-spacing: 1px;
    }
    
    .subtitle-registro {
        font-size: 0.9rem;
    }
    
    .logo-registro {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }
    
    .header-decoration {
        justify-content: center;
    }
    
    /* Formulario de Registro */
    .registration-container {
        padding: 1.5rem 1rem;
        margin: 1.5rem auto;
    }
    
    .registration-header {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .registration-header h2 {
        font-size: 1.5rem;
    }
    
    .registration-header p {
        font-size: 0.9rem;
    }
    
    .registration-form {
        padding: 1.5rem;
    }
    
    .form-section {
        margin-bottom: 1.5rem;
    }
    
    .form-section-title {
        font-size: 1.2rem;
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    /* Campo de fecha más grande y fácil de usar en móvil */
    #fecha_nacimiento {
        font-size: 1.2rem;
        padding: 1rem;
        letter-spacing: 2px;
        text-align: center;
    }
    
    #fecha_nacimiento::placeholder {
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }
    
    .form-group small {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .btn-submit,
    .btn-cancel {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .alert {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    /* Barra Superior - Móviles Pequeños */
    .top-info-bar-hospital {
        font-size: 0.75rem;
        padding: 0.4rem 0;
    }
    
    .hospital-info-header span {
        display: none;
    }
    
    .emergency-link span {
        display: none;
    }
    
    /* Header - Móviles Pequeños */
    .main-header-registro {
        padding: 1.5rem 0;
    }
    
    .hospital-title-registro h1 {
        font-size: 1.3rem;
        letter-spacing: 0.5px;
    }
    
    .subtitle-registro {
        font-size: 0.8rem;
    }
    
    .logo-registro {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    /* Formulario - Móviles Pequeños */
    .registration-container {
        padding: 1rem 0.75rem;
        margin: 1rem auto;
    }
    
    .registration-header {
        padding: 1rem;
    }
    
    .registration-header h2 {
        font-size: 1.3rem;
    }
    
    .registration-header p {
        font-size: 0.85rem;
    }
    
    .registration-form {
        padding: 1rem;
    }
    
    .form-section-title {
        font-size: 1.1rem;
        padding: 0.6rem 0.75rem;
    }
    
    .form-group label {
        font-size: 0.85rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.6rem;
        font-size: 0.85rem;
    }
    
    /* Campo de fecha aún más grande en móviles pequeños */
    #fecha_nacimiento {
        font-size: 1.3rem;
        padding: 1.1rem;
        letter-spacing: 3px;
        text-align: center;
        font-weight: 700;
    }
    
    #fecha_nacimiento::placeholder {
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }
    
    .form-group small {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
        line-height: 1.3;
    }
    
    .btn-submit,
    .btn-cancel {
        padding: 0.85rem;
        font-size: 0.9rem;
    }
    
    .alert {
        padding: 0.85rem;
        font-size: 0.85rem;
    }
    
    /* Asegurar que los campos sean fáciles de usar en móvil */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    input[type="time"],
    select,
    textarea {
        min-height: 44px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    textarea {
        min-height: 100px;
    }
}

/* =============================================================================
   RESPONSIVE GLOBAL — móvil / tablet (admin + vistas con styles.css)
   ============================================================================= */

@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
    }

    img, video, canvas, svg {
        max-width: 100%;
        height: auto;
    }

    /* Scroll horizontal táctil en tablas anchas */
    .table-responsive,
    .table-scroll {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 0.75rem;
    }

    .table-responsive table,
    .table-scroll table {
        min-width: 520px;
    }

    /* Evita zoom automático en iOS al enfocar campos */
    input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]):not([type="file"]),
    select,
    textarea {
        min-height: 44px;
        font-size: 16px;
    }

    textarea {
        min-height: 88px;
    }

    .container,
    .container-top,
    .container-header {
        padding-left: max(12px, env(safe-area-inset-left, 0px));
        padding-right: max(12px, env(safe-area-inset-right, 0px));
    }

    body {
        padding-left: env(safe-area-inset-left, 0px);
        padding-right: env(safe-area-inset-right, 0px);
    }
}

@media (max-width: 480px) {
    .container,
    .container-top,
    .container-header {
        padding-left: max(10px, env(safe-area-inset-left, 0px));
        padding-right: max(10px, env(safe-area-inset-right, 0px));
    }
}
