/* VARIABLES DE DISEÑO PROFESIONAL */
:root {
    --primary: #0046ad;
    --secondary: #00b894;
    --accent: #ff7675;
    --dark: #1e272e;
    --light: #f1f2f6;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* RESET & BASE */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
    scroll-behavior: smooth;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* SKIP LINK (Accesibilidad) */
.skip-link {
    position: absolute;
    top: -100%;
    left: 10px;
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 0 0 8px 8px;
    z-index: 9999;
    font-weight: 700;
    text-decoration: none;
}
.skip-link:focus {
    top: 0;
}

/* SCREEN READER ONLY */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* FOCUS VISIBLE (Accesibilidad teclado) */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

/* IMAGES RESPONSIVE */
img { max-width: 100%; height: auto; }

/* NAVBAR */
.navbar { background: var(--white); padding: 15px 0; position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.6rem; font-weight: 700; color: var(--primary); text-decoration: none; }
.logo span { color: var(--secondary); }
.nav-links a { text-decoration: none; color: var(--dark); margin-left: 25px; font-weight: 600; font-size: 0.95rem; }
.nav-btn { background: var(--primary); color: white !important; padding: 10px 20px; border-radius: 8px; }

/* HERO SECTION */
.hero { background: linear-gradient(135deg, var(--primary) 0%, #002d72 100%); color: white; padding: 120px 0 150px; text-align: center; border-radius: 0 0 80px 80px; }
.hero-content { max-width: 850px; margin: 0 auto; }
.hero h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; }
.hero p { font-size: 1.3rem; opacity: 0.9; margin-bottom: 40px; }
.badge { background: var(--accent); padding: 6px 18px; border-radius: 50px; font-weight: 700; font-size: 0.8rem; letter-spacing: 1px; }
.hero-btns { display: flex; justify-content: center; gap: 20px; }
.btn-main { background: var(--secondary); color: white; padding: 18px 40px; border-radius: 12px; text-decoration: none; font-weight: 700; box-shadow: 0 10px 20px rgba(0,184,148,0.3); transition: 0.3s; }
.btn-outline { border: 2px solid white; color: white; padding: 16px 40px; border-radius: 12px; text-decoration: none; font-weight: 700; transition: 0.3s; }
.btn-main:hover { transform: translateY(-3px); box-shadow: 0 15px 25px rgba(0,184,148,0.4); }

/* AD SPACE */
.ad-container { background: #e2e8f0; height: 100px; margin: 30px auto; border-radius: 10px; display: flex; align-items: center; justify-content: center; border: 1px dashed #94a3b8; color: #64748b; font-size: 0.8rem; }

/* SEARCH BOX */
.search-box { background: var(--white); padding: 50px; border-radius: 30px; margin-top: -100px; box-shadow: var(--shadow); text-align: center; }
.search-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 20px; margin-top: 30px; }
.input-group { text-align: left; }
.input-group label { display: block; font-weight: 700; margin-bottom: 10px; color: var(--primary); font-size: 0.9rem; }
input { width: 100%; padding: 16px; border: 2px solid #edf2f7; border-radius: 12px; font-size: 1rem; font-family: inherit; }
input:focus { outline: none; border-color: var(--primary); }
.btn-search { background: var(--primary); color: white; border: none; padding: 0 50px; border-radius: 12px; cursor: pointer; font-weight: 700; height: 58px; transition: 0.3s; }

/* RESULTS AREA */
.results-area { margin-top: 40px; }
.hosp-card { background: white; padding: 30px; border-radius: 20px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; border-left: 10px solid var(--secondary); box-shadow: 0 5px 15px rgba(0,0,0,0.03); }
.hosp-info h3 { margin-bottom: 8px; color: var(--primary); font-size: 1.5rem; }
.hosp-info p { color: #64748b; margin: 4px 0; }
.hosp-btns { display: flex; gap: 15px; }
.btn-hosp { padding: 14px 25px; border-radius: 10px; text-decoration: none; font-weight: 700; font-size: 0.9rem; }
.btn-call { background: #e6ffed; color: var(--secondary); }
.btn-map { background: #f0f4ff; color: var(--primary); }

/* PROFILE SECTION (TU PERFIL) */
.author-profile { margin: 80px auto; }
.profile-grid { background: var(--white); padding: 50px; border-radius: 40px; box-shadow: var(--shadow); display: grid; grid-template-columns: 2fr 1fr; gap: 60px; align-items: center; }
.profile-badge { background: var(--primary); color: white; padding: 6px 15px; border-radius: 6px; font-size: 0.8rem; font-weight: 700; display: inline-block; margin-bottom: 20px; }
.profile-quote { font-size: 1.4rem; font-style: italic; color: #475569; border-left: 5px solid var(--secondary); padding-left: 25px; margin: 25px 0; }
.tech-stack { display: flex; flex-wrap: wrap; gap: 12px; }
.tech-stack span { background: #f1f5f9; color: var(--primary); padding: 10px 20px; border-radius: 50px; font-weight: 700; font-size: 0.85rem; }
.profile-stats { display: flex; flex-direction: column; gap: 30px; border-left: 2px solid #f1f5f9; padding-left: 60px; }
.stat-box strong { font-size: 2.5rem; color: var(--primary); display: block; line-height: 1; }
.stat-box span { color: #94a3b8; font-weight: 600; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }

/* INFO SECTION */
.info-section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2.2rem; color: var(--primary); }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.info-card { background: white; padding: 40px; border-radius: 25px; transition: 0.3s; border-bottom: 6px solid transparent; }
.info-card:hover { transform: translateY(-10px); border-color: var(--secondary); }
.info-card i { font-size: 2.5rem; color: var(--secondary); margin-bottom: 25px; }
.info-card h3 { margin-bottom: 15px; color: var(--primary); font-size: 1.4rem; }

/* DONATION CARD */
.donation-section { margin-bottom: 80px; }
.donation-card { background: var(--white); padding: 60px; border-radius: 40px; text-align: center; border: 4px dashed var(--secondary); }
.donation-card h3 { font-size: 2rem; margin-bottom: 20px; }
.phone-number { font-size: 2.5rem; font-weight: 700; color: var(--secondary); display: block; margin: 20px 0; }

/* FOOTER */
.main-footer { background: var(--dark); color: white; padding: 60px 0; text-align: center; border-radius: 60px 60px 0 0; }

/* STATUS MESSAGES */
.status-msg {
    padding: 16px 24px;
    border-radius: 12px;
    margin: 20px 0;
    font-weight: 600;
    display: none;
}
.status-loading {
    background: #e0f2fe;
    color: #0369a1;
    border-left: 4px solid #0284c7;
}
.status-success {
    background: #dcfce7;
    color: #166534;
    border-left: 4px solid #22c55e;
}
.status-error {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}
.status-warning {
    background: #fffbeb;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

/* CARD ANIMATION */
.hosp-card {
    animation: fadeInUp 0.4s ease-out both;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .profile-grid { grid-template-columns: 1fr; }
    .profile-stats { border-left: none; padding-left: 0; flex-direction: row; justify-content: space-around; border-top: 2px solid #f1f5f9; padding-top: 40px; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.4rem; }
    .search-grid { grid-template-columns: 1fr; }
    .btn-search { padding: 0; }
    .hosp-card { flex-direction: column; text-align: center; gap: 20px; }
    .hero-btns { flex-direction: column; padding: 0 40px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    .hero { padding: 80px 0 120px; border-radius: 0 0 40px 40px; }
    .search-box { padding: 30px 20px; margin-top: -80px; }
    .info-card { padding: 25px; }
    .donation-card { padding: 30px 20px; }
    .profile-grid { padding: 30px 20px; }
    .phone-number { font-size: 1.8rem; }
    .nav-links a { margin-left: 12px; font-size: 0.85rem; }
    .logo { font-size: 1.3rem; }
    .hosp-btns { flex-direction: column; width: 100%; }
    .btn-hosp { text-align: center; }
}

/* PREFERS REDUCED MOTION (Accesibilidad) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .hosp-card { animation: none; }
    .btn-main:hover, .info-card:hover { transform: none; }
}

/* PRINT STYLES */
@media print {
    .navbar, .ad-container, .donation-section, .main-footer, .btn-search, .hosp-btns { display: none !important; }
    body { background: white; color: black; }
    .hero { background: none; color: black; padding: 20px 0; border-radius: 0; }
    .hosp-card { break-inside: avoid; border: 1px solid #ccc; box-shadow: none; }
}