/* Base Styles */
:root {
    --primary-color: #2c3e50; /* Azul oscuro elegante */
    --secondary-color: #34495e; /* Azul grisáceo */
    --accent-color: #3498db; /* Azul vibrante para CTA */
    --text-color: #34495e; /* Antes era #7f8c8d, ahora con mejor contraste */
    --light-bg: #f4f7f6; /* Fondo muy claro */
    --dark-bg: #2c3e50; /* Fondo oscuro para footer */
    --white-color: #ffffff;
    --hover-dark: #233140; /* Hover para primary */
    --accent-dark: #2980b9; /* Nuevo hover para accent-color */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color 0.3s ease, transform 0.2s ease;
}

a:hover {
    color: var(--accent-dark);
    transform: translateY(-2px);
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-weight: 700;
}

h1 { font-size: 2.2rem; line-height: 1.2; margin-bottom: 1rem; }
h2 { font-size: 1.8rem; margin-bottom: 2.5rem; position: relative; display: inline-block;}
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -10px;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.cta-button {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white-color);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.cta-button:hover {
    color: var(--white-color);
    background-color: var(--accent-dark);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.5);
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
    flex-wrap: wrap;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 15px rgba(0,0,0,0.15);
}

.logo a {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .header {
        flex-direction: row;
        gap: 2rem;
        padding: 1rem 2rem;
    }

    .nav ul {
        flex-direction: row;
        gap: 2rem;
    }
    
    .nav a::after {
        left: 0;
        transform: none;
    }

    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    p { font-size: 1.15rem; }
}

.nav a {
    font-weight: 500;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 5px;
}

.nav a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
    transform: translateX(-50%);
}

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

/* Hero Section (Parallax & Overlay) */
.hero-section {
    position: relative;
    height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    /* ¡IMPORTANTE! Se elimina el background-image para que la carga la controle el HTML */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Sections */
section {
    padding: 4rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

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

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: 3rem;
}

.service-card {
    background-color: var(--white-color);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-bottom: 3px solid var(--accent-color);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.service-card p {
    font-size: 1rem;
    color: var(--secondary-color);
}

/* About Section */
.about-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    text-align: left;
    background-color: var(--white-color);
    gap: 3rem;
    flex-direction: column;
    text-align: center;
}

.about-content, .about-image {
    flex: 1;
    min-width: 300px;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Contact Section */
.contact-section {
    background-color: var(--light-bg);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem 1.2rem;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    font-size: 1.05rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--white-color);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-status {
    margin-top: 1.5rem;
    font-weight: bold;
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background-color: var(--dark-bg);
    color: var(--white-color);
    padding: 2rem 1rem;
    text-align: center;
}

.footer-container {
    display: grid;
    max-width: 1000px;
    margin: 0 auto;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.footer-block h3 {
    color: var(--white-color);
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.footer-block p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.footer-block .social-links {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
}

.footer-block .social-links a {
    color: var(--white-color);
    font-size: 1.5rem;
    opacity: 0.8;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.footer-block .social-links a:hover {
    opacity: 1;
    transform: scale(1.1);
}

.footer-block .map-container iframe {
    width: 100%;
    border-radius: 8px;
}

.copyright-text {
    margin-top: 2rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Mouse Trail Effect */
#mouse-trail-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.trail-dot {
    position: absolute;
    background-color: var(--accent-color);
    border-radius: 50%;
    opacity: 0.7;
    animation: fadeOutTrail 1s forwards;
    pointer-events: none;
    transform: scale(0);
}

@keyframes fadeOutTrail {
    0% { transform: scale(0.5); opacity: 0.7; }
    50% { transform: scale(1); opacity: 0.4; }
    100% { transform: scale(0); opacity: 0; }
}

/* WhatsApp Button */
.whatsapp-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: var(--white-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.whatsapp-button img {
    width: 30px;
    height: 30px;
}

/* Cookie Consent Modal */
.cookie-consent-modal {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(44, 62, 80, 0.95);
    color: var(--white-color);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 2000;
    width: 90%;
    max-width: 500px;
    text-align: center;
    animation: fadeIn 0.5s ease forwards;
}

.cookie-consent-modal.show {
    display: block;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cookie-content p {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.8);
}

.cookie-content a {
    color: var(--accent-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    width: 100%;
}

.cookie-accept-button, .cookie-reject-button {
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid var(--accent-color);
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.cookie-accept-button {
    background-color: var(--accent-color);
    color: var(--white-color);
}

.cookie-accept-button:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    transform: scale(1.05);
}

.cookie-reject-button {
    background-color: transparent;
    color: var(--accent-color);
}

.cookie-reject-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px) translateX(-50%); }
    to { opacity: 1; transform: translateY(0) translateX(-50%); }
}

/*
    Enfoque Mobile-First:
    Ahora el CSS base está optimizado para móviles.
    Las media queries solo se usan para "expandir" el diseño a pantallas más grandes.
*/
@media (min-width: 768px) {
    .header {
        flex-direction: row;
        gap: 2rem;
        padding: 1rem 2rem;
    }

    .nav ul {
        flex-direction: row;
        gap: 2rem;
    }

    .nav a::after {
        left: 0;
        transform: none;
    }

    h1 { font-size: 2.8rem; }
    h2 { font-size: 2.2rem; }
    p { font-size: 1.15rem; }

    section {
        padding: 6rem 2rem;
    }

    .hero-section {
        height: 65vh;
        padding: 8rem 2rem;
    }

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

    .about-section {
        flex-direction: row;
        text-align: left;
    }

    .about-image {
        margin-top: 0;
    }

    .footer-container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (min-width: 900px) {
    h1 { font-size: 3.5rem; }
    h2 { font-size: 2.8rem; }
}
