/* Variables CSS para una gestión de colores fácil */
:root {
    --primary-color: #0056b3; /* Azul principal más institucional */
    --primary-color-dark: #003e80; /* Azul más oscuro para hover/fondo */
    --secondary-color: #007bff; /* Azul para el botón de iniciar sesión (o menos prominente) */
    --tertiary-color: #28a745; /* Verde para acentos o éxito */
    --text-color-dark: #343a40; /* Gris oscuro para texto principal */
    --text-color-light: #6c757d; /* Gris más claro para texto secundario */
    --bg-light-gray: #f8f9fa; /* Fondo gris claro */
    --bg-white: #ffffff;
    --border-color: #dee2e6;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* Base y Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-color-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px; /* Más padding para los lados */
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color-dark);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-color-dark);
    margin-bottom: 15px;
    font-weight: 600; /* Más peso para los encabezados */
}

h1 { font-size: 3.2em; line-height: 1.2; font-weight: 700; }
h2 { font-size: 2.4em; line-height: 1.3; font-weight: 600; }
h3 { font-size: 1.8em; line-height: 1.4; font-weight: 600; }
h4 { font-size: 1.2em; line-height: 1.5; font-weight: 600; }

p {
    margin-bottom: 1em;
    font-size: 1em; /* Asegura un tamaño de párrafo estándar */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Iconos de FontAwesome */
.fas, .fab, .far {
    margin-right: 8px;
}

/* Sección de títulos general */
.section-title {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 5px;
}

.section-description {
    text-align: center;
    font-size: 1.1em;
    color: var(--text-color-light);
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: var(--font-heading);
    border: 2px solid transparent;
    font-size: 1em;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
}

.btn-primary-outline {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary-outline:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.btn-secondary { /* Para Iniciar Sesión en el Nav */
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 8px 18px; /* Más pequeño */
    font-size: 0.9em;
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
}


.btn-white-outline {
    background-color: transparent;
    color: var(--bg-white);
    border-color: var(--bg-white);
}

.btn-white-outline:hover {
    background-color: var(--bg-white);
    color: var(--primary-color-dark);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    padding: 0;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.95em;
}

.btn-link:hover {
    color: var(--primary-color-dark);
    text-decoration: underline;
}

.btn-large {
    padding: 15px 35px;
    font-size: 1.15em;
}

/* Layout Grid */
.grid-2-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); /* Min-width ajustado */
    gap: 50px; /* Más espacio */
    align-items: center;
}

.grid-4-cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.text-center {
    text-align: center;
}

.bg-light-gray {
    background-color: var(--bg-light-gray);
}

/* Header */
.main-header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 10px var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Top Bar */
.top-bar {
    background-color: var(--primary-color-dark);
    color: var(--bg-white);
    padding: 10px 0;
    font-size: 0.9em;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
    display: inline-block;
}

.contact-info i {
    color: var(--tertiary-color); /* Un color de acento para los iconos */
}

.social-links-top a {
    color: var(--bg-white);
    margin-left: 15px;
    transition: color 0.3s ease;
}

.social-links-top a:hover {
    color: var(--tertiary-color);
}

/* Navbar Area (Logo y Navegación) */
.navbar-area {
    padding: 20px 0;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--text-color-dark);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.6em;
}

.logo-img {
    height: 50px; /* Ajusta el tamaño de tu logo */
    margin-right: 12px;
}

.logo-text {
    color: var(--primary-color-dark);
}

.main-nav .nav-list {
    list-style: none;
    display: flex;
    gap: 30px; /* Más espacio entre elementos */
}

.main-nav .nav-list a {
    color: var(--text-color-dark);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    font-size: 1em;
}

.main-nav .nav-list a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.main-nav .nav-list a:hover::after,
.main-nav .nav-list a.active::after {
    width: 100%;
}

/* Ocultar Iniciar Sesión en el nav por defecto en desktop */
.nav-login {
    display: none;
}

.btn-cta-header {
    margin-left: 20px;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none; /* Oculto en desktop */
    background: none;
    border: none;
    font-size: 1.8em;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('img/fuspancra-img.png') no-repeat center center/cover;
    color: var(--bg-white);
    text-align: center;
    padding: 120px 20px; /* Más padding */
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative; /* Para posibles efectos */
}

.hero-section h1 {
    color: var(--bg-white);
    font-size: 3.8em;
    margin-bottom: 25px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 1.5em;
    margin-bottom: 40px;
    font-weight: 300;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons .btn {
    margin: 10px 15px;
    font-size: 1.15em;
}

/* About Section */
.about-section {
    padding: 100px 0;
}

.about-content {
    text-align: left;
}

.about-content p {
    font-size: 1.05em;
    color: var(--text-color-light);
}

.about-content .btn {
    margin-top: 20px;
}

.mission-vision-cards {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.card {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px var(--shadow-light); /* Sombra más sutil */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.card-icon i {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.card h3 {
    color: var(--primary-color-dark);
    margin-top: 0;
}

/* Services Section */
.services-section {
    padding: 100px 0;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px var(--shadow-light);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.service-card i {
    font-size: 3em;
    color: var(--primary-color);
    margin: 0 auto 20px;
    display: block;
}

.service-card h3 {
    color: var(--primary-color-dark);
    margin-top: 15px;
    font-size: 1.5em;
}

/* CTA Section */
.cta-section {
    padding: 100px 20px;
    background-color: var(--primary-color-dark);
    color: var(--bg-white);
}

.cta-section h2 {
    color: var(--bg-white);
    margin-bottom: 25px;
    font-size: 2.5em;
}

.cta-section p {
    font-size: 1.3em;
    margin-bottom: 45px;
    font-weight: 300;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
}

.contact-section p {
    margin-bottom: 12px;
    font-size: 1.05em;
    color: var(--text-color-light);
}

.contact-section p i {
    color: var(--primary-color);
}

.social-links-footer {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.social-links-footer a {
    background-color: var(--primary-color);
    color: var(--bg-white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
}

.social-links-footer a:hover {
    background-color: var(--primary-color-dark);
}

.map-container {
    background-color: var(--border-color);
    height: 350px; /* Más alto */
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-light);
}

.map-container iframe {
    border-radius: 10px;
}


/* Footer */
.main-footer {
    background-color: var(--text-color-dark);
    color: #e0e0e0;
    padding: 60px 0 20px;
    font-size: 0.95em;
}

.main-footer a {
    color: #e0e0e0;
    transition: color 0.3s ease;
}

.main-footer a:hover {
    color: var(--bg-white);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--bg-white);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col p {
    color: #cccccc;
    line-height: 1.7;
}

.about-fuspancra .footer-logo {
    height: 60px; /* Ajusta el tamaño del logo blanco */
    margin-bottom: 15px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85em;
}

.footer-bottom p {
    margin-bottom: 8px;
}

/* Responsive Design (Media Queries) */
@media (max-width: 992px) {
    h1 { font-size: 2.8em; }
    h2 { font-size: 2em; }
    h3 { font-size: 1.6em; }

    .top-bar-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .contact-info span {
        margin: 0 10px;
    }

    .navbar-content {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .main-nav {
        order: 3; /* Mueve la navegación debajo en móvil */
        width: 100%;
        margin-top: 15px;
    }

    .main-nav .nav-list {
        justify-content: center;
        gap: 20px;
    }

    .btn-cta-header {
        margin-left: 0;
        order: 2;
    }

    .hero-section {
        padding: 100px 20px;
    }

    .hero-section h1 {
        font-size: 2.5em;
    }
    .hero-subtitle {
        font-size: 1.2em;
    }

    .grid-2-cols {
        grid-template-columns: 1fr;
    }

    .about-content, .mission-vision-cards {
        text-align: center;
    }

    .mission-vision-cards {
        margin-top: 30px;
    }

    .card-icon i {
        margin-left: auto;
        margin-right: auto;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    .map-container {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        display: none; /* Oculta la top bar en móviles pequeños para simplificar */
    }

    .navbar-area {
        padding: 15px 0;
    }

    .navbar-content {
        justify-content: space-between;
        gap: 0;
    }

    .logo {
        flex-grow: 1; /* Permite que el logo ocupe más espacio */
        text-align: left;
    }

    .btn-cta-header {
        display: none; /* Oculta el botón "Agendar Cita" flotante en móvil */
    }

    .menu-toggle {
        display: block; /* Muestra el menú hamburguesa */
    }

    .main-nav {
        display: none; /* Oculta el menú principal por defecto */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Debajo de la navbar */
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        padding: 20px 0;
        border-top: 1px solid var(--border-color);
    }

    .main-nav.active {
        display: flex; /* Muestra el menú cuando está activo */
    }

    .main-nav .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .main-nav .nav-list a {
        font-size: 1.1em;
        padding: 10px 0;
        width: 80%; /* Para que los enlaces sean más fáciles de tocar */
        text-align: center;
    }
     .main-nav .nav-list a::after {
        left: 50%;
        transform: translateX(-50%);
     }

    .nav-login {
        display: block !important; /* Muestra el botón de Iniciar Sesión dentro del nav en móvil */
        width: auto;
        margin-top: 20px;
    }

    .hero-section h1 {
        font-size: 2em;
    }

    .hero-subtitle {
        font-size: 1em;
    }

    .hero-buttons .btn {
        display: block;
        margin: 10px auto;
        width: 80%;
    }

    .section-title {
        font-size: 1.8em;
    }

    .section-description {
        font-size: 1em;
        margin-bottom: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .about-fuspancra .footer-logo {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.6em; }
    h3 { font-size: 1.3em; }

    .hero-section {
        padding: 60px 15px;
        min-height: 400px;
    }

    .hero-section h1 {
        font-size: 1.8em;
    }

    .hero-subtitle {
        font-size: 0.95em;
    }

    .hero-buttons .btn {
        font-size: 1em;
        padding: 10px 20px;
    }

    .container {
        padding: 0 15px;
    }

    .btn-large {
        font-size: 1em;
        padding: 12px 25px;
    }
}