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

body {
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

header {
    background: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
}

nav a {
    margin: 0 15px;
    text-decoration: none;
    color: #333;
}

.logo {
    font-weight: bold;
    font-size: 20px;
}

html {
    scroll-behavior: smooth;
}

#servicios,
#nosotros {
    scroll-margin-top: 100px;
}




.hero {

    height: 90vh;

    background-image: linear-gradient(rgba(0, 0, 0, 0.4),
            rgba(0, 0, 0, 0.4)),
        url("img/hero.jpg");

    background-size: cover;

    background-position: center;

    background-repeat: no-repeat;

    display: flex;

    align-items: center;

    color: white;

    padding-left: 8%;

}

.hero-content {

    max-width: 600px;

    animation: fadeUp 1s ease;

}

.hero h1 {

    font-size: 56px;

    margin-bottom: 15px;

}

.hero p {

    font-size: 20px;

    margin-bottom: 25px;

}

.btn {
    background: #0071BC;
    color: white;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    transition: background 0.25s ease;
    border-radius: 4px;
}

.btn:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 24px rgba(0, 113, 188, 0.45);
    background: #0085d9;
}

.btn:hover::after {
    background: rgba(255, 255, 255, 0.08);
}

.btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 3px 10px rgba(0, 113, 188, 0.3);
}

.services {
    padding: 80px 0;
    text-align: center;
}

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

.card {
    background: white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-top 0.3s ease;
    border-top: 3px solid transparent;
    cursor: default;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 113, 188, 0.2);
    border-top: 3px solid #0071BC;
}

.card img {
    width: 60px;

    height: auto;

    display: block;

    margin: 0 auto 15px auto;
}

/* ── Insurance Banner ── */
.insurance-banner {
    background: linear-gradient(135deg, #0071BC 0%, #132163 100%);
    padding: 60px 0;
    color: white;
}

.insurance-inner {
    display: flex;
    align-items: center;
    gap: 40px;
}

.insurance-icon {
    width: 110px;
    height: 110px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 16px rgba(255, 255, 255, 0.25));
    animation: insurancePulse 2.6s ease-in-out infinite;
}

@keyframes insurancePulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 4px 16px rgba(255, 255, 255, 0.25));
    }

    50% {
        transform: scale(1.07);
        filter: drop-shadow(0 6px 24px rgba(255, 255, 255, 0.5));
    }
}

.insurance-text h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.insurance-text p {
    font-size: 16px;
    opacity: 0.88;
    max-width: 600px;
}

.about {
    background: #f5f5f5;
    padding: 80px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about img {
    width: 100%;
    border-radius: 8px;
}

.cta {
    background: #0071BC;
    color: white;
    text-align: center;
    padding: 60px 0;
}

.appointment {
    padding: 80px 0;
    text-align: center;
}

form {
    max-width: 500px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input,
textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

input:focus,
textarea:focus {
    border-color: #0071BC;
    box-shadow: 0 0 0 3px rgba(0, 113, 188, 0.2);
}


/* ── Language switcher ── */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-btn {
    background: none;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 3px 6px;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    opacity: 0.55;
}

.lang-btn:hover {
    transform: scale(1.18);
    opacity: 1;
}

.lang-btn.lang-active {
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 113, 188, 0.18);
    opacity: 1;
}

footer {
    background: #132163;
    color: white;
    padding: 40px 0;
}


.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

footer a,
footer a:visited,
footer a:hover,
footer a:active {
    color: white;
    text-decoration: none;
}

nav a {
    margin: 0 15px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: 0.3s;
    display: inline-block;
}

nav a:hover {
    transform: scale(1.2);
    color: #0071BC;
}

.logo img {
    height: 50px;
    width: auto;
}




/* ── Hamburger button (hidden on desktop) ── */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 200;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    background: #0071BC;
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ── Tablet ── */
@media (max-width: 900px) {

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

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

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

/* ── Mobile ── */
@media (max-width: 768px) {

    /* Header / Nav */
    .hamburger {
        display: flex;
        order: 3;
    }

    .nav {
        flex-wrap: wrap;
        padding: 14px 0;
        gap: 10px;
        position: relative;
    }

    nav {
        display: none;
        flex-direction: column;
        width: 100%;
        background: white;
        padding: 10px 0 16px;
        gap: 4px;
        order: 10;
        border-top: 1px solid #eee;
    }

    nav.open {
        display: flex;
    }

    nav a {
        margin: 0;
        padding: 10px 16px;
        font-size: 16px;
        border-radius: 6px;
    }

    nav a:hover {
        background: #f0f7ff;
    }

    /* Move lang switcher and btn to right side */
    .lang-switcher {
        order: 2;
    }

    /* Hide the header "Reservar cita" button on small screens */
    header>.container.nav>.btn {
        display: none;
    }

    /* Hero */
    .hero {
        padding: 30px 20px;
        text-align: center;
        padding-top: 40px;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 17px;
    }

    /* Services */
    .grid {
        grid-template-columns: 1fr;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about img {
        margin-top: 20px;
    }

    /* CTA */
    .cta {
        padding: 40px 20px;
    }

    /* Form section */
    .appointment {
        padding: 50px 20px;
    }

    /* Insurance Banner */
    .insurance-inner {
        flex-direction: column;
        text-align: center;
    }

    .insurance-text h2 {
        font-size: 22px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    footer {
        padding: 30px 20px;
    }
}