/* Estilos para la página de Contacto - CDMAFE */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Paleta de colores principal */
    --primary-red-dark: #9A1815;  /* Rojo oscuro */
    --primary-red: #7D0809;       /* Rojo principal */
    --secondary-beige: #BBA38E;   /* Beige oscuro */
    --secondary-cream: #E6D7BE;   /* Crema claro */
    --dark: #070705;              /* Negro */
    --accent-blue: #457B9D;       /* Azul acento */
    
    /* Colores adicionales para la interfaz */
    --text-color: #333333;
    --light-text: #ffffff;
    --background-color: #ffffff;
    --light-bg: #f9f7f4;
    --border-color: #e5e0d8;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    --overlay: rgba(7, 7, 5, 0.7);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --gradient-primary: linear-gradient(135deg, var(--primary-red), var(--primary-red-dark));
    --gradient-dark: linear-gradient(135deg, var(--dark), #1a1a1a);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 62.5%; /* 1rem = 10px */
}

body {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    font-size: 1.6rem;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 10rem 0;
    position: relative;
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
    transition: var(--transition);
}

h1 {
    font-size: 4.8rem;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 3.6rem;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 2.4rem;
}

h4 {
    font-size: 2rem;
}

p {
    margin-bottom: 1.6rem;
    font-size: 1.6rem;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.2rem 2.4rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    font-size: 1.6rem;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    transition: var(--transition);
    z-index: -1;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--light-text);
    border: none;
}

.btn-primary::before {
    background-color: var(--primary-red-dark);
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
}

.btn-secondary:hover {
    background-color: var(--primary-red);
    color: var(--light-text);
}

/* Secciones del Header */
.section-header {
    text-align: center;
    margin-bottom: 6rem;
    position: relative;
}

.section-header .subtitle {
    display: inline-block;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.section-header h2 {
    color: var(--text-color);
    font-weight: 700;
    position: relative;
    display: inline-block;
    margin-bottom: 2.5rem;
    transition: var(--transition);
}

.section-header h2 span {
    color: var(--primary-red);
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 50%;
    transform: translateX(-50%);
    width: 6rem;
    height: 3px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.section-header:hover h2::after {
    width: 10rem;
}

.section-header p {
    font-size: 1.8rem;
    max-width: 70rem;
    margin: 0 auto;
    color: var(--text-color);
    opacity: 0.8;
    transition: var(--transition);
}

.section-header:hover p {
    opacity: 1;
}

/* Header y Navegación */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(7, 7, 5, 0.9);
    transition: var(--transition);
    padding: 0.5rem 4rem; /* Valor positivo y razonable */
    height: 10rem;
}

header.scrolled {
    padding: 1.5rem 4rem;
    background-color: rgba(7, 7, 5, 0.95);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.logo-container:hover {
    transform: scale(1.05);
}

.logo-container a {
    display: flex;
    align-items: center;
}

.logo-container a img {
    height: 10rem;
    width: auto;
    margin-right: 1rem;
    transition: var(--transition);
}
.logo-container:hover img {
    transform: rotate(5deg);
}

.logo-container h1 {
    color: var(--light-text);
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    margin-bottom: 0;
}

.main-menu {
    display: flex;
    align-items: center;
}

.main-menu li {
    margin-left: 3rem;
    position: relative;
}

.main-menu a {
    color: var(--light-text);
    font-weight: 500;
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
    transition: var(--transition);
}

.main-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-beige);
    transition: var(--transition);
}

.main-menu a:hover::after,
.main-menu a.active::after {
    width: 100%;
}

.main-menu a:hover {
    color: var(--secondary-beige);
    transform: translateY(-2px);
}

.main-menu a.active {
    color: var(--secondary-beige);
}

.lang-switch {
    border: 1px solid var(--secondary-beige);
    padding: 0.5rem 1rem;
    border-radius: 0.4rem;
    transition: var(--transition);
}

.lang-switch:hover {
    background-color: var(--secondary-beige);
    color: var(--dark);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 2.4rem;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-toggle:hover {
    transform: rotate(90deg);
}

/* Hero de Contacto */
.contact-hero {
    height: 60vh;
    min-height: 400px;
    background: linear-gradient(to right, rgba(7, 7, 5, 0.9), rgba(125, 8, 9, 0.8)), url('../img/contact-bg.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    padding-top: 8rem;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/pattern.png');
    opacity: 0.1;
    z-index: 1;
}

.contact-hero .hero-content {
    position: relative;
    color: var(--light-text);
    z-index: 2;
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.contact-hero .hero-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-beige);
    padding: 0.8rem 1.5rem;
    border-radius: 3rem;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 2rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-hero h2 {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 2rem;
    line-height: 1.2;
    color: var(--light-text);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.contact-hero p {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    max-width: 600px;
    line-height: 1.6;
    color: var(--light-text);
    opacity: 0.9;
    margin-left: auto;
    margin-right: auto;
}

/* Sección de Información de Contacto */
.contact-info-section {
    padding: 10rem 0;
    background-color: var(--background-color);
    position: relative;
}

.contact-info-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background-color: var(--light-bg);
    clip-path: circle(50% at 100% 0);
    z-index: 0;
}

.contact-info-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 200px;
    height: 200px;
    background-color: var(--light-bg);
    clip-path: circle(50% at 0 100%);
    z-index: 0;
}

.contact-info-wrapper {
    position: relative;
    z-index: 1;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    margin-top: 4rem;
}

.contact-card {
    background-color: var(--background-color);
    padding: 3rem 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
}

.contact-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
}

.contact-card:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.contact-icon {
    width: 7rem;
    height: 7rem;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    transition: var(--transition);
    border: 1px dashed var(--primary-red);
}

.contact-card:hover .contact-icon {
    background: var(--gradient-primary);
    transform: rotateY(180deg);
}

.contact-icon i {
    font-size: 2.8rem;
    color: var(--primary-red);
    transition: var(--transition);
}

.contact-card:hover .contact-icon i {
    color: var(--light-text);
    transform: rotateY(180deg);
}

.contact-card h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    transition: var(--transition);
}

.contact-card:hover h3 {
    color: var(--primary-red);
}

.contact-card p {
    font-size: 1.5rem;
    color: var(--text-color);
    opacity: 0.8;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.contact-link {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-red);
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.contact-link i {
    margin-left: 0.8rem;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--primary-red-dark);
}

.contact-link:hover i {
    transform: translateX(5px);
}

/* Sección de Formulario y Mapa */
.contact-form-section {
    padding: 10rem 0;
    background-color: var(--light-bg);
    position: relative;
    overflow: hidden;
}

.contact-form-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background-color: var(--secondary-cream);
    opacity: 0.5;
    border-radius: 50%;
}

.contact-form-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background-color: var(--secondary-beige);
    opacity: 0.3;
    border-radius: 50%;
}

.form-map-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    position: relative;
    z-index: 1;
}

.contact-form-container {
    background-color: var(--background-color);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.contact-form-container:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-5px);
}

.form-header {
    background: var(--gradient-primary);
    padding: 3rem;
    color: var(--light-text);
}

.form-header h3 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
    color: var(--light-text);
}

.form-header p {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.contact-form {
    padding: 3rem;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.form-group label span {
    color: var(--primary-red);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.8rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    color: var(--text-color);
    background-color: var(--light-bg);
    transition: var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(125, 8, 9, 0.1);
    background-color: var(--background-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 1rem;
    accent-color: var(--primary-red);
}

.checkbox-group label {
    margin-bottom: 0;
    font-size: 1.3rem;
    font-weight: 500;
}

.contact-form .btn {
    width: 100%;
    margin-top: 1rem;
    padding: 1.4rem;
}

/* Mapa container */
.map-container {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 100%;
    min-height: 500px;
    transition: var(--transition);
}

.map-container:hover {
    box-shadow: var(--hover-shadow);
    transform: translateY(-5px);
}

#map {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

.map-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(7, 7, 5, 0.9), transparent);
    padding: 4rem 3rem 3rem;
    color: var(--light-text);
    transform: translateY(70%);
    transition: var(--transition);
}

.map-container:hover .map-overlay {
    transform: translateY(0);
}

.overlay-content h3 {
    font-size: 2.4rem;
    margin-bottom: 1rem;
    color: var(--light-text);
}

.overlay-content p {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Sección de FAQ */
.faq-section {
    padding: 10rem 0;
    background-color: var(--background-color);
    position: relative;
    overflow: hidden;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.faq-item {
    background-color: var(--light-bg);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.faq-question {
    padding: 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0;
    color: var(--text-color);
    flex: 1;
    transition: var(--transition);
}

.faq-item:hover .faq-question h3 {
    color: var(--primary-red);
}

.faq-icon {
    color: var(--primary-red);
    font-size: 1.6rem;
    transition: var(--transition);
}

.faq-item.active .faq-icon i {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 2rem 2rem;
}

.faq-answer p {
    font-size: 1.5rem;
    line-height: 1.7;
    color: var(--text-color);
    opacity: 0.8;
}

/* CTA Section */
.contact-cta {
    padding: 8rem 0;
    background: linear-gradient(to right, rgba(7, 7, 5, 0.9), rgba(125, 8, 9, 0.9)), url('../img/cta-bg.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    color: var(--light-text);
}

.contact-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/pattern.png');
    opacity: 0.1;
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 3.6rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--light-text);
}

.cta-content p {
    font-size: 1.8rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Footer */
footer {
    background-color: var(--dark);
    color: var(--light-text);
    padding: 8rem 0 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/pattern.png');
    opacity: 0.05;
    pointer-events: none;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(25rem, 1fr));
    gap: 5rem;
    margin-bottom: 5rem;
    position: relative;
    z-index: 1;
}

.footer-logo h2 {
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    color: var(--light-text);
    transition: var(--transition);
}

.footer-logo:hover h2 {
    color: var(--secondary-beige);
}

.footer-logo p {
    font-size: 1.5rem;
    color: #aaa;
    max-width: 30rem;
    transition: var(--transition);
}

.footer-logo:hover p {
    color: #ddd;
}

.footer-links h3,
.footer-social h3,
.footer-contact h3 {
    font-size: 1.8rem;
    margin-bottom: 2.5rem;
    color: var(--light-text);
    position: relative;
    padding-bottom: 1rem;
}

.footer-links h3::after,
.footer-social h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 5rem;
    height: 2px;
    background-color: var(--primary-red);
    transition: var(--transition);
}

.footer-links h3:hover::after,
.footer-social h3:hover::after,
.footer-contact h3:hover::after {
    width: 8rem;
}

.footer-links ul li {
    margin-bottom: 1.2rem;
}

.footer-links ul li a {
    color: #aaa;
    font-size: 1.5rem;
    transition: var(--transition);
    position: relative;
}

.footer-links ul li a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: var(--transition);
}

.footer-links ul li a:hover {
    color: var(--secondary-beige);
    padding-left: 2rem;
}

.footer-links ul li a:hover::before {
    opacity: 1;
    left: 0;
}

.footer-social p {
    color: #aaa;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.social-icons {
    display: flex;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    margin-right: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-red);
    transform: scale(0);
    transition: var(--transition);
    border-radius: 50%;
}

.social-icons a:hover::before {
    transform: scale(1);
}

.social-icons a i {
    font-size: 1.8rem;
    color: var(--light-text);
    transition: var(--transition);
    z-index: 1;
}

.social-icons a:hover i {
    transform: scale(1.2);
}

.footer-contact p {
    color: #aaa;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.footer-contact p:hover {
    color: #ddd;
    transform: translateX(5px);
}

.footer-contact p i {
    margin-right: 1rem;
    color: var(--primary-red);
    transition: var(--transition);
}

.footer-contact p:hover i {
    transform: rotate(15deg);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: #777;
    font-size: 1.4rem;
    transition: var(--transition);
}

.footer-bottom p:hover {
    color: #aaa;
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 6rem;
    height: 6rem;
    background-color: #25D366;
    color: var(--light-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    box-shadow: var(--shadow);
    z-index: 100;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.4);
}

/* Botón Volver Arriba */
.scroll-top-btn {
    position: fixed;
    bottom: 3rem;
    right: 10rem;
    width: 5rem;
    height: 5rem;
    background-color: var(--primary-red);
    color: var(--light-text);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background-color: var(--primary-red-dark);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(125, 8, 9, 0.4);
}

.scroll-top-btn i {
    animation: bounce 2s infinite;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(3rem);
    transition: all 0.6s ease;
}

.animate-on-scroll.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Loading animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--secondary-beige);
    border-top: 5px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sistema de notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background-color: #2ecc71;
}

.notification.error {
    background-color: #e74c3c;
}

.notification.info {
    background-color: #3498db;
}

.notification i {
    font-size: 1.8rem;
}

/* Media queries para responsividad */
@media (max-width: 1200px) {
    html {
        font-size: 56.25%; /* 1rem = 9px */
    }
    
    .contact-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    html {
        font-size: 50%; /* 1rem = 8px */
    }

    header {
        padding: 2rem;
    }

    header.scrolled {
        padding: 1.5rem 2rem;
    }

    .form-map-wrapper {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .map-container {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    /* Seleccionamos tanto nav como main-nav para mantener compatibilidad */
    nav, .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--dark);
        transition: right 0.3s ease;
        overflow-y: auto;
        padding: 10rem 2rem;
    }
    
    nav.active, .main-nav.active {
        right: 0;
    }
    
    .main-menu {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .main-menu li {
        margin: 1rem 0;
        width: 100%;
    }

    .contact-hero {
        height: 50vh;
    }

    .contact-info-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 1.5rem;
    }

    .whatsapp-btn {
        bottom: 2rem;
        right: 2rem;
        width: 5rem;
        height: 5rem;
        font-size: 2.4rem;
    }

    .scroll-top-btn {
        bottom: 2rem;
        right: 8rem;
        width: 4.5rem;
        height: 4.5rem;
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .section-header h2 {
        font-size: 3rem;
    }

    .contact-hero h2 {
        font-size: 3.6rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links h3::after,
    .footer-social h3::after,
    .footer-contact h3::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-social .social-icons {
        justify-content: center;
    }
    .footer-logo p {
        text-align: center;
        max-width: 50rem;
    }

    .footer-logo {
        text-align: center;
        width: 100%;
    }

    .footer-contact p {
        justify-content: center;
    }

    .btn {
        padding: 1rem 2rem;
        font-size: 1.4rem;
    }
    
    .notification {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        transform: translateY(120%);
    }
    
    .notification.show {
        transform: translateY(0);
    }
}