/* Variables CSS para consistencia de colores y espaciado */
:root {
    --primary-color: #4CAF50; /* Verde principal */
    --primary-dark: #388E3C;  /* Verde oscuro para hover/activos */
    --primary-light: #81C784; /* Verde claro para detalles */
    --secondary-color: #FFC107; /* Amarillo/Ámbar para acentos */
    --accent-color: #03A9F4;  /* Azul para elementos de UI */

    --dark-text: #212121;     /* Texto oscuro principal */
    --light-text: #424242;    /* Texto secundario, descripciones */
    --white: #FFFFFF;         /* Fondo blanco, texto en elementos oscuros */
    --background-light: #F8F9FA; /* Fondo claro para secciones */
    --background-medium: #E0E0E0; /* Fondo medio, bordes */
    --background-dark: #343A40; /* Fondo oscuro para footer */

    --border-radius-small: 5px;
    --border-radius-medium: 8px;
    --border-radius-card: 12px;

    --shadow-subtle: 0 4px 8px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-strong: 0 12px 24px rgba(0, 0, 0, 0.15);

    --section-padding: 80px 0; /* Padding vertical general para secciones */

    --gradient-hero: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    --gradient-button: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

/* Base global y reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: var(--light-text);
    background-color: var(--background-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 0; /* Controlado por JavaScript para header fijo y barra de anuncio */
    transition: padding-top 0.3s ease;
}

/* Contenedor principal para centrar el contenido */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Encabezados */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-text);
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
}

h1 { font-size: 3.2em; font-weight: 800;}
h2 { font-size: 2.5em; text-align: center; margin-bottom: 50px; }
h3 { font-size: 1.8em; }

/* Enlaces */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Botones genéricos */
.button {
    display: inline-block;
    background: var(--gradient-button);
    color: var(--white);
    padding: 15px 30px;
    border-radius: var(--border-radius-medium);
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-subtle);
    font-size: 1em;
}

.button:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
    color: var(--white); /* Asegura que el texto permanezca blanco */
}

.button-small {
    padding: 10px 20px;
    font-size: 0.9em;
}

.button-outline {
    background: none;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.button-outline:hover {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: var(--shadow-subtle);
}

.text-center {
    text-align: center;
}

/* --- Top Announcement Bar --- */
.top-announcement-bar {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 8px 0;
    text-align: center;
    font-size: 0.9em;
    position: sticky;
    top: 0;
    z-index: 1001; /* Mayor que el header */
    transition: max-height 0.3s ease-out, padding 0.3s ease-out, opacity 0.3s ease-out;
    overflow: hidden;
    max-height: 50px; /* Altura máxima para la transición */
}

.top-announcement-bar .container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.top-announcement-bar p {
    margin: 0;
    line-height: 1.4;
    padding-right: 30px; /* Espacio para el botón de cerrar */
}

.announcement-link {
    color: var(--white);
    font-weight: 700;
    text-decoration: underline;
    margin-left: 10px;
}

.announcement-link:hover {
    color: var(--background-medium);
}

.close-announcement-bar {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5em;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 10px;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.close-announcement-bar:hover {
    opacity: 1;
}

/* --- Header y Navegación --- */
.header {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: var(--shadow-subtle);
    position: sticky;
    top: 0; /* Permanece en la parte superior */
    z-index: 1000;
    transition: top 0.3s ease; /* Transición suave para el ajuste de top */
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2em;
    font-weight: 800;
    color: var(--dark-text);
    margin: 0;
}

.logo span {
    color: var(--primary-color);
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--light-text);
    font-weight: 600;
    font-size: 1em;
    position: relative;
    padding: 5px 0;
}

.nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

/* Estilo para el enlace activo de ScrollSpy */
.nav a:hover::after,
.nav a.active::after { /* Añadido .active */
    width: 100%;
}

.nav a.active { /* Color del texto para el enlace activo */
    color: var(--primary-color);
}


/* --- Hero Section --- */
.hero {
    background: var(--gradient-hero);
    color: var(--white);
    padding: var(--section-padding);
    display: flex;
    align-items: center;
    min-height: 70vh; /* Asegura que la sección ocupe al menos el 70% del viewport */
}

.hero .container {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
}

.hero-content h2 {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 10px;
    text-align: left; /* Ajuste para el h2 del hero */
}

.hero-content h1 {
    font-size: 3.8em;
    margin-bottom: 25px;
    color: var(--white);
    text-align: left; /* Ajuste para el h1 del hero */
}

.hero-content p {
    font-size: 1.2em;
    line-height: 1.7;
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-graphic {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 8em; /* Tamaño del icono */
    line-height: 1;
    color: var(--secondary-color); /* Color del icono */
    text-shadow: var(--shadow-medium);
}

/* --- Features Section --- */
.features-section {
    background-color: var(--white);
    padding: var(--section-padding);
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    background-color: var(--background-light);
    padding: 30px;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--background-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.feature-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
}

.feature-item h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.feature-item p {
    font-size: 0.95em;
    line-height: 1.6;
}

/* --- About Us Section --- */
.about-us-section {
    background-color: var(--background-medium);
    padding: var(--section-padding);
    text-align: center;
}

.about-us-content {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-subtle);
}

.about-us-content h2 {
    margin-bottom: 30px;
    text-align: center;
}

.about-us-content p {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--light-text);
}

.about-us-content p:last-child {
    margin-bottom: 0;
}

/* --- Services Section --- */
.services-section {
    background-color: var(--white);
    padding: var(--section-padding);
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item {
    background-color: var(--background-light);
    padding: 30px;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--background-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-light);
}

.service-icon {
    font-size: 3em;
    margin-bottom: 15px;
    display: block;
    color: var(--primary-color);
}

.service-item h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.service-item p {
    font-size: 0.95em;
    line-height: 1.6;
}

/* --- Testimonials Section --- */
.testimonials-section {
    background-color: var(--background-medium);
    padding: var(--section-padding);
    text-align: center;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.testimonial-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-subtle);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--background-medium);
}

.testimonial-quote {
    font-size: 1.1em;
    line-height: 1.7;
    color: var(--light-text);
    margin-bottom: 15px;
    font-style: italic;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.95em;
}

/* --- Pricing Section --- */
.pricing-section {
    background-color: var(--white);
    padding: var(--section-padding);
    text-align: center;
}

.pricing-description {
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 1.1em;
    color: var(--light-text);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
    align-items: flex-start;
}

.pricing-item {
    background-color: var(--background-light);
    padding: 35px;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-subtle);
    text-align: center;
    border: 1px solid var(--background-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pricing-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-light);
}

.pricing-item h3 {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.pricing-item .price {
    font-size: 2.8em;
    font-weight: 800;
    color: var(--dark-text);
    margin-bottom: 30px;
    line-height: 1;
}

.pricing-item .price span {
    font-size: 0.5em;
    font-weight: 400;
    color: var(--light-text);
}

.pricing-item .features-list {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
    text-align: left;
    flex-grow: 1;
}

.pricing-item .features-list li {
    margin-bottom: 10px;
    font-size: 1em;
    color: var(--light-text);
}

.pricing-item .button {
    margin-top: auto;
    width: 100%;
}

/* Estilo para el plan destacado */
.featured-plan {
    background: var(--gradient-hero);
    color: var(--white);
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-medium);
    border: 3px solid var(--primary-color);
    padding: 40px 35px;
}

.featured-plan h3, .featured-plan .price {
    color: var(--white);
}

.featured-plan .features-list li {
    color: #f0f0f0;
}

.featured-plan .button {
    background: var(--white);
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.featured-plan .button:hover {
    background-color: var(--primary-light);
    color: var(--white);
}

/* --- FAQ Section --- */
.faq-section {
    background-color: var(--background-medium);
    padding: var(--section-padding);
    text-align: center;
}

.faq-accordion {
    max-width: 800px;
    margin: 40px auto 0;
    border: 1px solid var(--background-light);
    border-radius: var(--border-radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
}

.accordion-item {
    background-color: var(--white);
    border-bottom: 1px solid var(--background-medium);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    background-color: var(--white);
    border: none;
    padding: 20px 30px;
    text-align: left;
    font-size: 1.15em;
    font-weight: 600;
    color: var(--dark-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.accordion-header:hover, .accordion-item.active .accordion-header {
    background-color: var(--background-light);
}

.accordion-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    /* Usamos un SVG base64 para un icono de más, se puede cambiar por un '+' o un ícono de librería */
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%234CAF50" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 5v14M5 12h14"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg); /* Gira el más a una X */
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 30px; /* Padding horizontal siempre */
    background-color: var(--white);
}

.accordion-content p {
    padding-bottom: 20px; /* Padding inferior solo cuando está visible */
    font-size: 1em;
    line-height: 1.7;
    color: var(--light-text);
}


/* --- Blog / Resources Section --- */
.blog-section {
    padding: var(--section-padding);
    text-align: center;
    background-color: var(--white);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.blog-post-item {
    display: flex;
    flex-direction: column;
    background-color: var(--background-light);
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-subtle);
    overflow: hidden;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.blog-post-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.blog-post-icon { /* Nuevo estilo para el icono de placeholder */
    font-size: 4em;
    padding: 20px;
    display: block;
    text-align: center;
    color: var(--primary-color);
    border-bottom: 1px solid var(--background-medium);
    background-color: var(--background-medium);
}


.blog-post-item h3 {
    font-size: 1.4em;
    margin: 20px 20px 10px;
    color: var(--dark-text);
    line-height: 1.4;
}

.blog-post-item p {
    font-size: 0.95em;
    color: var(--light-text);
    margin: 0 20px 15px;
    flex-grow: 1; /* Empuja el botón/enlace hacia abajo */
}

.blog-post-item .read-more {
    display: block;
    color: var(--primary-color);
    font-weight: 600;
    padding: 15px 20px 20px;
    transition: color 0.2s ease;
}

.blog-post-item .read-more:hover {
    color: var(--primary-dark);
}

.blog-section .text-center {
    margin-top: 50px;
}

/* --- Locations Section --- */
.locations-section {
    background-color: var(--background-light);
    padding: var(--section-padding);
    text-align: center;
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.location-item {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--background-medium);
    text-align: left;
    display: flex;
    flex-direction: column;
}

.location-item h3 {
    font-size: 1.6em;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center; /* Alinea el título de la ciudad */
}

.location-item p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.location-item p strong {
    color: var(--dark-text);
}

.location-item a {
    word-break: break-all; /* Rompe URLs largas para evitar desbordamiento */
}

.map-container {
    width: 100%;
    /* height: 250px; /* Altura fija para los mapas */
    margin-top: 20px;
    overflow: hidden;
    border-radius: var(--border-radius-small);
    border: 1px solid var(--background-medium);
    flex-grow: 1; /* Permite que el mapa ocupe el espacio restante */
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* --- Contact Section --- */
.contact-section {
    background-color: var(--white);
    padding: var(--section-padding);
    text-align: center;
}

.contact-description {
    max-width: 800px;
    margin: 0 auto 50px;
    font-size: 1.1em;
    color: var(--light-text);
}

.contact-details {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.contact-detail-item {
    flex: 1;
    min-width: 200px;
    max-width: 280px;
    background-color: var(--background-light);
    padding: 25px;
    border-radius: var(--border-radius-medium);
    box-shadow: var(--shadow-subtle);
    border: 1px solid var(--background-medium);
    text-align: center;
}

.contact-detail-item strong {
    display: block;
    font-size: 1.2em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.contact-detail-item p {
    font-size: 1em;
    margin: 0;
}

.contact-detail-item a {
    color: var(--light-text);
}

.contact-detail-item a:hover {
    color: var(--primary-color);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--background-light);
    padding: 40px;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-medium);
    text-align: left;
    border: 1px solid var(--background-medium);
}

.contact-form h3 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-dark);
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid var(--background-medium);
    border-radius: var(--border-radius-small);
    font-family: 'Open Sans', sans-serif;
    font-size: 1em;
    color: var(--dark-text);
    background-color: var(--white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
    outline: none;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form .g-recaptcha {
    margin-bottom: 20px;
    transform: scale(0.9); /* Ajuste para que no se desborde en móviles */
    transform-origin: 0 0;
}

.contact-form .button {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

/* --- Newsletter Section --- */
.newsletter-section {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.newsletter-section h2 {
    color: var(--white);
    margin-bottom: 20px;
}

.newsletter-section p {
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto 30px;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 12px 20px;
    border-radius: var(--border-radius-medium);
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1em;
    width: 100%; /* Por defecto, para apilar en móvil */
    max-width: 350px; /* Máximo ancho en escritorio */
}

.newsletter-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input[type="email"]:focus {
    outline: none;
    border-color: var(--white);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.newsletter-form .button {
    background-color: var(--secondary-color);
    color: var(--dark-text);
    padding: 12px 25px;
    box-shadow: none;
    font-size: 1em;
}

.newsletter-form .button:hover {
    background-color: #FFD740; /* Tono más claro de amarillo */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* --- Footer --- */
.footer {
    background-color: var(--background-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9em;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.developer-info {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.6);
}

/* --- Animaciones de Revelado (Reveal on Scroll) --- */
.reveal {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Retrasos para elementos en cuadrícula */
.features-grid .reveal:nth-child(1) { transition-delay: 0.0s; }
.features-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.features-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.features-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

.services-grid .reveal:nth-child(1) { transition-delay: 0.0s; }
.services-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.services-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.services-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

.testimonials-grid .reveal:nth-child(1) { transition-delay: 0.0s; }
.testimonials-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.testimonials-grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.testimonials-grid .reveal:nth-child(4) { transition-delay: 0.3s; }

.pricing-grid .reveal:nth-child(1) { transition-delay: 0.0s; }
.pricing-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.pricing-grid .reveal:nth-child(3) { transition-delay: 0.2s; }

.accordion-item .reveal:nth-child(1) { transition-delay: 0.0s; }
.accordion-item .reveal:nth-child(2) { transition-delay: 0.1s; }
.accordion-item .reveal:nth-child(3) { transition-delay: 0.2s; }
.accordion-item .reveal:nth-child(4) { transition-delay: 0.3s; }
.accordion-item .reveal:nth-child(5) { transition-delay: 0.4s; }

.blog-grid .reveal:nth-child(1) { transition-delay: 0.0s; }
.blog-grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.blog-grid .reveal:nth-child(3) { transition-delay: 0.2s; }

.locations-grid .reveal:nth-child(1) { transition-delay: 0.0s; }
.locations-grid .reveal:nth-child(2) { transition-delay: 0.1s; }

.contact-details .reveal:nth-child(1) { transition-delay: 0.0s; }
.contact-details .reveal:nth-child(2) { transition-delay: 0.1s; }
.contact-details .reveal:nth-child(3) { transition-delay: 0.2s; }

.contact-form.reveal { transition-delay: 0.3s; }
.newsletter-form.reveal { transition-delay: 0.0s; }

/* --- Botón "Volver Arriba" (Back-to-Top Button) --- */
#backToTopBtn {
    display: none; /* Oculto por defecto */
    position: fixed; /* Fijo en la pantalla */
    bottom: 30px; /* Distancia desde abajo */
    right: 30px; /* Distancia desde la derecha */
    z-index: 99; /* Por encima de otros elementos */
    border: none; /* Sin borde */
    outline: none; /* Sin outline al hacer foco */
    background-color: var(--primary-color);
    color: var(--white);
    cursor: pointer;
    padding: 15px 20px;
    border-radius: 50%; /* Forma circular */
    font-size: 1.5em; /* Tamaño del icono de flecha */
    box-shadow: var(--shadow-medium);
    transition: background-color 0.3s, transform 0.3s, opacity 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

#backToTopBtn:hover {
    background-color: var(--primary-dark);
    transform: translateY(0);
}

#backToTopBtn.show {
    opacity: 1;
    transform: translateY(0);
    display: block; /* Muestra el botón cuando la clase 'show' está presente */
}


/* --- Media Queries para Responsividad --- */
@media (max-width: 992px) {
    h1 { font-size: 2.8em; }
    h2 { font-size: 2.2em; }
    .hero-content h1 { font-size: 3em; }

    .nav ul {
        gap: 20px;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content h2,
    .hero-content h1 {
        text-align: center;
    }

    .hero-graphic {
        order: -1; /* Mueve el gráfico arriba en pantallas pequeñas */
        margin-bottom: 30px;
    }

    .features-grid,
    .services-grid,
    .testimonials-grid,
    .pricing-grid,
    .blog-grid,
    .locations-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .contact-details {
        flex-direction: column;
        align-items: center;
    }
    .contact-detail-item {
        max-width: 100%;
        width: 100%;
    }
    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }
    .newsletter-form input[type="email"],
    .newsletter-form .button {
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.4em; }
    h2 { font-size: 1.8em; margin-bottom: 30px; }
    h3 { font-size: 1.4em; }
    .hero-content h1 { font-size: 2.5em; }
    .hero-content h2 { font-size: 1.2em; }
    .hero-content p { font-size: 1em; }
    .button { padding: 12px 25px; font-size: 0.95em; }

    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    .nav a {
        font-size: 0.9em;
    }

    .section-padding {
        padding: 60px 0;
    }

    .pricing-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .featured-plan {
        transform: translateY(0) scale(1.0); /* Desactiva la transformación en móvil */
        padding: 35px; /* Restaura padding normal */
    }

    .accordion-header {
        font-size: 1em;
        padding: 15px 20px;
    }
    .accordion-content p {
        padding-bottom: 15px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .top-announcement-bar p {
        padding-right: 40px; /* Ajusta si el texto es muy largo */
    }
    .top-announcement-bar {
        font-size: 0.85em;
        max-height: 60px; /* Permite un poco más de altura si el texto se envuelve */
    }

    #backToTopBtn {
        bottom: 20px;
        right: 20px;
        padding: 12px 15px;
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.6em; }
    .hero-content h1 { font-size: 2.2em; }
    .hero-content p { font-size: 0.95em; }

    .features-grid,
    .services-grid,
    .testimonials-grid,
    .locations-grid {
        grid-template-columns: 1fr;
    }

    .feature-item,
    .service-item,
    .testimonial-item,
    .location-item,
    .pricing-item,
    .blog-post-item {
        padding: 25px;
    }

    .about-us-content,
    .contact-form {
        padding: 30px;
    }

    .contact-form .g-recaptcha {
        transform: scale(0.85); /* Ajusta aún más si es necesario */
    }
}

/* --- Estilos para Validación de Formularios --- */
.is-invalid {
    border-color: #dc3545 !important; /* Rojo para el borde */
}

.error-message {
    color: #dc3545; /* Rojo para el texto de error */
    font-size: 0.85em;
    margin-top: 5px;
    margin-bottom: 10px;
    display: block; /* Asegura que ocupe su propia línea */
}

/* --- Estilos para Mensajes de Alerta Dinámicos --- */
.alert {
    padding: 15px 20px;
    margin-bottom: 0; /* Quitar margen inferior para el padding del body */
    border-radius: 5px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; /* Fijo en la parte superior al hacer scroll */
    top: 0; /* Asegura que se pegue al top del viewport */
    z-index: 1000; /* Asegura que esté por encima de otros elementos */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease-in-out; /* Para la animación de cierre */
    opacity: 1; /* Por defecto visible */
    max-height: 200px; /* Un valor grande para la transición de altura */
    overflow: hidden;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.close-alert {
    background: none;
    border: none;
    font-size: 1.5em;
    font-weight: bold;
    color: inherit; /* Hereda el color del texto del alert */
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
    margin-left: 15px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.close-alert:hover {
    opacity: 1;
}