/* ===== VARIABLES CSS ===== */
:root {
    /* Paleta de colores de la marca */
    --primary-blue: #3B5998;
    --accent-pink: #D81B60;
    --secondary-teal: #00838F;
    --text-color: #333333;
    --bg-color: #FFFFFF;
    --light-gray: #f7f9fa;
    --white: #FFFFFF;
    --call-button-color: #3498db;
    --call-button-hover: #2980b9;
    --footer-bg: #263238;
    
    /* Tipografía */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    
    /* Espaciado */
    --container-max-width: 900px;
    --section-padding: 60px 20px;
    --border-radius: 15px;
    --border-radius-small: 10px;
    
    /* Sombras */
    --shadow-light: 0 4px 8px rgba(0,0,0,0.05);
    --shadow-medium: 0 8px 20px rgba(0,0,0,0.08);
    --shadow-heavy: 0 15px 35px rgba(0,0,0,0.12);
    --shadow-button: 0 4px 15px rgba(0,0,0,0.2);
    
    /* Transiciones */
    --transition-fast: 0.3s ease;
    --transition-medium: 0.5s ease;
}

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: var(--line-height-base);
    overflow-x: hidden;
}

/* ===== CONTENEDORES ===== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 20px;
}

/* ===== NAVEGACIÓN ===== */
nav {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-fast);
}

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

nav .logo {
    font-weight: bold;
    color: var(--primary-blue);
    text-decoration: none;
    font-size: 1.3em;
    transition: var(--transition-fast);
}

nav .logo:hover {
    color: var(--accent-pink);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition-fast);
    padding: 10px 15px;
    border-radius: 25px;
    position: relative;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--white);
    background-color: var(--accent-pink);
    transform: translateY(-2px);
}

/* ===== TIPOGRAFÍA ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 15px;
}

h1 {
    font-size: 2.8em;
    color: var(--white);
    margin-bottom: 15px;
}

h2 {
    color: var(--primary-blue);
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 30px;
}

h3 {
    color: var(--accent-pink);
    font-size: 1.5em;
}

h4 {
    color: var(--primary-blue);
    font-size: 1.3em;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
    font-size: 1.05em;
}

/* ===== HEADERS DE PÁGINA ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-teal));
    color: var(--white);
    text-align: center;
    padding: 80px 20px 60px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header p {
    font-size: 1.2em;
    margin-bottom: 20px;
    opacity: 0.95;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, rgba(59, 89, 152, 0.9), rgba(0, 131, 143, 0.9)), url('header-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    text-align: center;
    padding: 120px 20px 80px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.3em;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===== BOTONES ===== */
.button {
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1em;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-button);
    display: inline-block;
    text-align: center;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: var(--transition-medium);
}

.button:hover::before {
    left: 100%;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.whatsapp-button {
    background-color: #25D366;
    color: var(--white);
}

.whatsapp-button:hover {
    background-color: #128C7E;
}

.call-button {
    background-color: var(--call-button-color);
    color: var(--white);
}

.call-button:hover {
    background-color: var(--call-button-hover);
}

.service-button {
    background-color: var(--accent-pink);
    color: var(--white);
    font-size: 0.9em;
    padding: 10px 20px;
}

.service-button:hover {
    background-color: #a01447;
}

.form-button {
    background-color: var(--accent-pink);
    color: var(--white);
}

.form-button:hover {
    background-color: #a01447;
}

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

.primary-button:hover {
    background-color: #2d4373;
}

.secondary-button {
    background-color: var(--white);
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

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

/* ===== SECCIONES ===== */
section {
    padding: var(--section-padding);
}

section:nth-of-type(even) {
    background-color: var(--light-gray);
}

.section-intro {
    text-align: center;
    font-size: 1.1em;
    color: #666;
    max-width: 700px;
    margin: 0 auto 40px;
}

/* ===== GRIDS ===== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* ===== TARJETAS ===== */
.service-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-fast);
    position: relative;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition-fast);
}

.service-card:hover img {
    transform: scale(1.05);
}

.service-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.service-card .price {
    font-size: 2em;
    font-weight: bold;
    color: var(--secondary-teal);
    margin: 15px 0;
}

.service-card p {
    flex-grow: 1;
    margin-bottom: 20px;
    font-size: 1.05em;
}

.service-card .description {
    color: #666;
    font-size: 0.95em;
    margin-bottom: 20px;
}

.contact-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-fast);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.contact-icon {
    font-size: 3em;
    margin-bottom: 20px;
    color: var(--secondary-teal);
}

.info-card {
    background: var(--white);
    border-radius: var(--border-radius-small);
    padding: 25px;
    box-shadow: var(--shadow-light);
    transition: var(--transition-fast);
}

.info-card:hover {
    box-shadow: var(--shadow-medium);
}

.feature-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-medium);
    transition: var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-heavy);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 20px;
    color: var(--accent-pink);
}

/* ===== FAQ ===== */
.faq-section {
    background-color: var(--light-gray);
}

.faq-item {
    margin-bottom: 15px;
}

.faq-item details {
    background: var(--white);
    border-radius: var(--border-radius-small);
    box-shadow: var(--shadow-light);
    transition: var(--transition-fast);
}

.faq-item details:hover {
    box-shadow: var(--shadow-medium);
}

.faq-item summary {
    font-weight: 600;
    color: var(--primary-blue);
    padding: 20px;
    cursor: pointer;
    list-style: none;
    font-size: 1.1em;
    transition: var(--transition-fast);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    float: right;
    font-size: 1.5em;
    line-height: 1;
    transition: var(--transition-fast);
}

.faq-item details[open] summary::after {
    content: '−';
    transform: rotate(180deg);
}

.faq-item summary:hover {
    color: var(--accent-pink);
}

.faq-item div {
    padding: 0 20px 20px;
    font-size: 1.05em;
    line-height: 1.6;
}

/* ===== FORMULARIOS ===== */
.form-section {
    background-color: var(--light-gray);
}

.form-container {
    background: var(--white);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-medium);
    margin-top: 40px;
}

.form-container h3 {
    text-align: center;
    margin-bottom: 30px;
}

.form-iframe-container {
    width: 100%;
    height: 800px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.form-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===== MAPAS ===== */
.map-section {
    background-color: var(--light-gray);
}

.map-container {
    width: 100%;
    height: 450px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    margin-top: 30px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ===== TABLAS ===== */
.hours-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.hours-table th,
.hours-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.hours-table th {
    background-color: var(--light-gray);
    color: var(--primary-blue);
    font-weight: 600;
}

/* ===== BOTONES DE CONTACTO ===== */
.contact-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

/* ===== SECCIONES ESPECIALES ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-teal));
    color: var(--white);
    text-align: center;
    padding: 80px 20px;
    position: relative;
}

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

.cta-section p {
    font-size: 1.2em;
    margin-bottom: 30px;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 30px;
    background-color: var(--footer-bg);
    color: var(--white);
}

footer p {
    margin-bottom: 10px;
    opacity: 0.9;
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    /* Navegación móvil */
    nav ul {
        display: none;
    }
    
    /* Tipografía móvil */
    h1 {
        font-size: 2.2em;
    }
    
    h2 {
        font-size: 1.8em;
    }
    
    .hero h1 {
        font-size: 2.5em;
    }
    
    .hero p {
        font-size: 1.1em;
    }
    
    /* Grids móvil */
    .services-grid,
    .contact-grid,
    .info-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    /* Botones móvil */
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .button {
        width: 100%;
        max-width: 300px;
    }
    
    /* Contenedores móvil */
    .container {
        padding: 15px;
    }
    
    section {
        padding: 40px 15px;
    }
    
    /* Mapas y formularios móvil */
    .map-container {
        height: 300px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .form-iframe-container {
        height: 600px;
    }
    
    /* Hero móvil */
    .hero {
        padding: 80px 20px 60px;
        background-attachment: scroll;
    }
    
    .page-header {
        padding: 60px 20px 40px;
    }
}

@media (max-width: 480px) {
    /* Ajustes para pantallas muy pequeñas */
    h1 {
        font-size: 1.8em;
    }
    
    h2 {
        font-size: 1.5em;
    }
    
    .hero h1 {
        font-size: 2em;
    }
    
    .button {
        padding: 12px 20px;
        font-size: 1em;
    }
    
    .service-card-content,
    .contact-card,
    .info-card {
        padding: 20px;
    }
    
    .form-iframe-container {
        height: 500px;
    }
}

/* ===== UTILIDADES ===== */
.text-center {
    text-align: center;
}

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

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

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.hidden {
    display: none;
}

.visible {
    display: block;
}

/* ===== ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ===== FOCUS STATES ===== */
.button:focus,
nav ul li a:focus,
.faq-item summary:focus {
    outline: 2px solid var(--accent-pink);
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    nav,
    .button,
    .form-container,
    .map-container {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}
