/* 
  Cardiocentro de Concepción - Design System
  Author: Antigravity AI
  Aesthetic: Premium Clinical Precision
*/

:root {
    /* Color System */
    --primary: #1F3A5F;
    --secondary: #3E6A8E;
    --gray: #6E7B87;
    --white: #FFFFFF;
    --accent: #C83A3A;
    --bg-light: #F8FAFC;
    --text-dark: #1A202C;
    --text-muted: #4A5568;
    --border: #E2E8F0;

    /* Typography */
    --font-headings: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;

    /* Spacing & Transitions */
    --section-padding: 100px 5%;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-headings);
    color: var(--primary);
    line-height: 1.2;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

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

.section {
    padding: var(--section-padding);
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 6px;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    color: var(--white);
}

.text-accent {
    color: var(--accent);
}

.text-center {
    text-align: center;
}

/* Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 20px 0;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Ensure links and logo are readable over the dark hero section */
header:not(.scrolled) .nav-links a {
    color: #FFFFFF;
}

header:not(.scrolled) .logo {
    color: #FFFFFF;
}

header:not(.scrolled) .menu-toggle {
    color: #FFFFFF;
}

.logo {
    font-family: var(--font-headings);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--primary);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
}

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

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    background: var(--primary);
    /* Deep blue base */
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(31, 58, 95, 0.95) 0%, rgba(31, 58, 95, 0.7) 50%, rgba(31, 58, 95, 0.3) 100%), url('img/frente2-cardiocentro.webp') no-repeat center center/cover;
    z-index: 1;
    opacity: 0.9;
}

.hero-content {
    max-width: 1000px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
    font-weight: 700;
    color: #FFFFFF;
}

.hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 32px;
    max-width: 500px;
}

/* Custom contrast for hero buttons */
.hero .btn-primary {
    background-color: var(--white);
    color: var(--primary);
}

.hero .btn-primary:hover {
    background-color: var(--secondary);
    color: var(--white);
}

.hero .btn-secondary {
    border-color: var(--white);
    color: var(--white);
}

.hero .btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary);
}

/* Trust Indicators */
.trust-indicators {
    background-color: var(--white);
    padding: 60px 0;
    border-bottom: 1px solid var(--border);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.trust-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.trust-item i {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 15px;
}

.trust-item h4 {
    font-size: 1rem;
    color: var(--primary);
}

/* Section Headers */
.section-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Services */
.services {
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary);
}

.service-card h3 {
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.service-card p {
    color: var(--text-muted);
    margin-bottom: 24px;
    flex-grow: 1;
}

.service-card .when {
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.service-card .when strong {
    display: block;
    color: var(--primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Medical Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 40px;
}

.team-card {
    text-align: center;
}

.team-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 24px;
    overflow: hidden;
    background: var(--bg-light);
    border: 4px solid var(--white);
    box-shadow: var(--shadow-md);
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Process Section */
.process {
    background-color: var(--primary);
    color: var(--white);
}

.process h2 {
    color: var(--white);
}

.process .section-header p {
    color: #CBD5E0;
}

.process-steps {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    position: relative;
}

.process-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--white);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 24px;
    box-shadow: 0 0 0 10px rgba(255, 255, 255, 0.1);
}

.process-step h3 {
    color: var(--white);
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.process-step p {
    color: #CBD5E0;
    font-size: 0.95rem;
}

/* Exams & Accordion */
.exams-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    border-bottom: 1px solid var(--border);
}

.accordion-header {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
}

.accordion-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
}

.accordion-icon {
    width: 24px;
    height: 24px;
    position: relative;
}

.accordion-icon::before,
.accordion-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 2px;
    background-color: var(--primary);
    transform: translate(-50%, -50%);
    transition: var(--transition);
}

.accordion-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.accordion-item.active .accordion-icon::after {
    transform: translate(-50%, -50%) rotate(0deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.accordion-content p {
    padding-bottom: 24px;
    color: var(--text-muted);
}

/* Patient Info */
.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.info-box {
    background: var(--bg-light);
    padding: 40px;
    border-radius: 12px;
}

.info-box h3 {
    margin-bottom: 24px;
}

.info-list li {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.info-list li::before {
    content: '→';
    color: var(--accent);
    font-weight: bold;
}

/* Location and Contact */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.map-container {
    width: 100%;
    height: 450px;
    border-radius: 12px;
    overflow: hidden;
}

.contact-info h3 {
    margin-bottom: 24px;
}

.contact-details {
    margin-bottom: 40px;
}

.contact-details div {
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128C7E;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .trust-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 5%;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: block;
    }

    .hero {
        height: auto;
        padding: 120px 0 80px;
        text-align: center;
    }

    .hero::before {
        display: none;
    }

    .hero-content {
        max-width: 100%;
    }

    .process-steps {
        flex-direction: column;
        gap: 40px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .trust-grid {
        grid-template-columns: 1fr;
    }
}