/* Loader */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #6B4E8B 0%, #9B6BB3 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    text-align: center;
}

.scales {
    position: relative;
    width: 100px;
    height: 80px;
    margin: 0 auto 20px;
}

.scale-left,
.scale-right {
    position: absolute;
    width: 40px;
    height: 4px;
    background: white;
    border-radius: 2px;
    top: 20px;
}

.scale-left {
    left: 0;
    transform-origin: right center;
    animation: scaleLeft 1.5s ease-in-out infinite;
}

.scale-right {
    right: 0;
    transform-origin: left center;
    animation: scaleRight 1.5s ease-in-out infinite;
}

.scale-base {
    position: absolute;
    width: 4px;
    height: 60px;
    background: white;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    border-radius: 2px;
}

@keyframes scaleLeft {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-15deg); }
}

@keyframes scaleRight {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(15deg); }
}

.loader-text {
    color: white;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 2px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Barra de Progreso */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    width: 0%;
    z-index: 9998;
    transition: width 0.1s ease;
    box-shadow: 0 0 10px rgba(107, 78, 139, 0.5);
}

/* Partículas en Hero */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Variables de Color */
:root {
    --primary-color: #6B4E8B;
    --secondary-color: #9B6BB3;
    --accent-color: #C8A2D6;
    --dark-color: #4A3B5F;
    --light-color: #F5F3F8;
    --text-color: #2C2C2C;
    --text-light: #666;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

/* Reset y Estilos Globales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

/* Navegación */
.navbar {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

.nav-links a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

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

.nav-links a:hover {
    color: var(--secondary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: url('../images/palacio.jpg') center/cover no-repeat;
    background-size: cover;
    background-position: center center;
    color: white;
    padding: 100px 20px;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    text-align: center;
}

.hero-text {
    text-align: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    font-weight: 300;
    letter-spacing: 0.3px;
}

.hero-image {
    display: none;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 14px 40px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: white;
    color: var(--secondary-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

/* Secciones */
section {
    padding: 80px 20px;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Servicios */
.servicios {
    background-color: var(--light-color);
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.servicio-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 3px solid var(--secondary-color);
}

.servicio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--primary-color);
}

.servicio-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    color: var(--secondary-color);
    font-weight: 300;
}

.servicio-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
}

.servicio-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Portfolio */
.portfolio {
    background-color: white;
}

/* About */
.about {
    background-color: var(--light-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 2.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.stat h3 {
    font-size: 2.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stat p {
    color: var(--text-light);
    margin-bottom: 0;
    font-weight: 500;
    font-size: 0.95rem;
}

/* Sección Por Qué Nosotros */
.why-us {
    background-color: white;
    padding: 80px 20px;
}

.why-us h2 {
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2.5rem;
}

.why-card {
    background: linear-gradient(135deg, rgba(44, 27, 61, 0.02), rgba(139, 58, 98, 0.05));
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    border-top: 3px solid var(--secondary-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.why-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    display: block;
    color: var(--secondary-color);
    font-weight: 300;
}

.why-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
    font-size: 1.2rem;
}

.why-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Sección Testimonios */
.testimonios {
    background: linear-gradient(135deg, rgba(44, 27, 61, 0.05), rgba(139, 58, 98, 0.05));
    padding: 80px 20px;
}

.testimonios h2 {
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.testimonios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.testimonio-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-left: 4px solid var(--secondary-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.testimonio-card:hover {
    box-shadow: var(--shadow-md);
}

.testimonio-text {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonio-autor {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0;
}

/* Sección FAQ */
.faq {
    background-color: white;
    padding: 80px 20px;
}

.faq h2 {
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.faq-item {
    background: linear-gradient(135deg, rgba(107, 78, 139, 0.03), rgba(155, 107, 179, 0.05));
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.faq-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.faq-item h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.faq-item p {
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}

/* Sección Emergencia */
.emergencia {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 80px 20px;
    color: white;
}

.emergencia h2 {
    color: white;
    margin-bottom: 1rem;
}

.emergencia-subtitle {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    opacity: 0.95;
}

.emergencia-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.emergencia-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.emergencia-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
}

.emergencia-card h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.emergencia-card p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-emergencia {
    display: inline-block;
    padding: 12px 30px;
    background: white;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition);
}

.btn-emergencia:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

/* Contacto */
.contacto {
    background-color: var(--light-color);
}

.contacto h2 {
    color: var(--primary-color);
}

/* Sección Proceso - Timeline */
.proceso {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f8f5fc 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.proceso h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.proceso-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(107, 78, 139, 0.3);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-number {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    z-index: 2;
    box-shadow: 0 4px 20px rgba(107, 78, 139, 0.4);
    transition: transform 0.4s ease;
    flex-shrink: 0;
}

.timeline-item:hover .timeline-number {
    transform: scale(1.15) rotate(360deg);
}

.timeline-content {
    flex: 1;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 0 2rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--secondary-color);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: 3rem;
    margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-right: 3rem;
    margin-left: auto;
}

.timeline-item:hover .timeline-content {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(107, 78, 139, 0.2);
}

.timeline-content h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.timeline-content p {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.timeline-duration {
    display: inline-block;
    background: linear-gradient(135deg, rgba(107, 78, 139, 0.1), rgba(155, 107, 179, 0.1));
    color: var(--primary-color);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .timeline::before {
        left: 35px;
    }

    .timeline-item,
    .timeline-item:nth-child(even) {
        flex-direction: row !important;
    }

    .timeline-number {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        margin-left: 10px;
    }

    .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 2rem !important;
        margin-right: 0 !important;
    }

    .proceso h2 {
        font-size: 2rem;
    }

    .proceso-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }
}

/* Contacto */
.contacto {
    background-color: var(--light-color);
}

.contacto h2 {
    color: var(--primary-color);
}

.contacto-form {
    margin-bottom: 3rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    color: var(--text-color);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(155, 107, 179, 0.1);
}

/* Validación de Formulario */
.form-group input.error,
.form-group textarea.error {
    border-color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.05);
}

.form-group input.error:focus,
.form-group textarea.error:focus {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.error-message {
    display: none;
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.4rem;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.required {
    color: #e74c3c;
    font-weight: 700;
}

.success-message {
    background-color: #4CAF50;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    animation: slideIn 0.3s ease;
    font-weight: 600;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contacto-form button {
    width: 100%;
    background: var(--secondary-color);
    color: white;
    padding: 16px;
    font-size: 1.1rem;
}

.contacto-form button:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.contacto-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.info-item h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 700;
}

.info-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.info-item a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
}

.info-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.contacto-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.info-item h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.info-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.info-item a:hover {
    text-decoration: underline;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 20px;
    text-align: center;
}

.footer p {
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    margin: 0;
}

.footer .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.social-links a {
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
}

/* Text Gradient Animado */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease infinite;
    display: inline-block;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Badge Online en WhatsApp */
.whatsapp-btn {
    position: relative;
}

.online-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #10D876;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(16, 216, 118, 0.4);
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(16, 216, 118, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(16, 216, 118, 0.6);
    }
}

/* Efecto Ripple en Botones */
.btn-primary,
.whatsapp-btn,
button[type="submit"] {
    position: relative;
    overflow: hidden;
}

.btn-primary::after,
.whatsapp-btn::after,
button[type="submit"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::after,
.whatsapp-btn:active::after,
button[type="submit"]:active::after {
    width: 300px;
    height: 300px;
}

/* Shake animation para WhatsApp */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.whatsapp-btn.shake {
    animation: shake 0.5s;
}

/* Glassmorphism mejorado */
.testimonial-card,
.emergency-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Indicador de sección activa en navbar */
.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Badges de confianza flotantes */
.trust-badges {
    position: fixed;
    bottom: 120px;
    left: 20px;
    z-index: 997;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trust-badge {
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 6px;
    animation: slideInLeft 0.5s ease;
    border-left: 3px solid var(--secondary-color);
}

.trust-badge::before {
    content: '✓';
    display: inline-block;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 0.7rem;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .trust-badges {
        display: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        gap: 0.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-text {
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-text p {
        font-size: 1.1rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .carol-content {
        grid-template-columns: 1fr;
    }

    .carol-text h2 {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .emergencia-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    section {
        padding: 40px 20px;
    }

    section h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .stat h3 {
        font-size: 2rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulseLight {
    0%, 100% {
        box-shadow: var(--shadow-sm);
    }
    50% {
        box-shadow: var(--shadow-md);
    }
}

.servicio-card,
.why-card,
.testimonio-card,
.stat,
.carol-stat {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
}

.servicio-card:nth-child(1) { animation-delay: 0.1s; }
.servicio-card:nth-child(2) { animation-delay: 0.2s; }
.servicio-card:nth-child(3) { animation-delay: 0.3s; }
.servicio-card:nth-child(4) { animation-delay: 0.4s; }
.servicio-card:nth-child(5) { animation-delay: 0.5s; }
.servicio-card:nth-child(6) { animation-delay: 0.6s; }

.why-card:nth-child(1) { animation-delay: 0.1s; }
.why-card:nth-child(2) { animation-delay: 0.2s; }
.why-card:nth-child(3) { animation-delay: 0.3s; }
.why-card:nth-child(4) { animation-delay: 0.4s; }

.testimonio-card:nth-child(1) { animation-delay: 0.1s; }
.testimonio-card:nth-child(2) { animation-delay: 0.2s; }
.testimonio-card:nth-child(3) { animation-delay: 0.3s; }

.stat:nth-child(1) { animation-delay: 0.1s; }
.stat:nth-child(2) { animation-delay: 0.2s; }
.stat:nth-child(3) { animation-delay: 0.3s; }

.carol-stat:nth-child(1) { animation-delay: 0.1s; }
.carol-stat:nth-child(2) { animation-delay: 0.2s; }
.carol-stat:nth-child(3) { animation-delay: 0.3s; }

/* Botón Flotante WhatsApp */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
    z-index: 999;
    animation: fadeIn 0.6s ease-out;
}

.whatsapp-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn:active {
    transform: scale(0.95);
}

.whatsapp-logo {
    width: 24px;
    height: 24px;
}

.whatsapp-text {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .whatsapp-btn {
        padding: 12px 20px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-logo {
        width: 20px;
        height: 20px;
    }

    .whatsapp-text {
        font-size: 0.85rem;
    }
}

/* Sección Carol Machado */
.carol-section {
    background: white;
    padding: 80px 20px;
}

.carol-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.carol-text h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.carol-text p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.carol-text p strong {
    color: var(--secondary-color);
    font-weight: 700;
}

.carol-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.carol-stat {
    background: linear-gradient(135deg, rgba(44, 27, 61, 0.02), rgba(139, 58, 98, 0.05));
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--secondary-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.carol-stat:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.carol-stat .year {
    font-size: 2.2rem;
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.carol-stat .desc {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .carol-content {
        grid-template-columns: 1fr;
    }

    .carol-text h2 {
        font-size: 2rem;
    }
}

/* Botón Volver Arriba */
.scroll-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 998;
    box-shadow: 0 4px 20px rgba(107, 78, 139, 0.4);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 6px 30px rgba(107, 78, 139, 0.5);
}

.scroll-to-top:active {
    transform: translateY(-2px) scale(0.95);
}

/* Animaciones de entrada al scroll */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mejoras en hover de cards */
.servicio-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.servicio-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 45px rgba(107, 78, 139, 0.25);
}

.servicio-card:hover .servicio-icon {
    transform: scale(1.15) rotate(5deg);
}

.testimonial-card:hover,
.faq-card:hover,
.why-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(107, 78, 139, 0.2);
}

/* Animación de pulso para WhatsApp */
@keyframes pulse-ring {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-btn {
    animation: pulse-ring 2.5s infinite;
}

.whatsapp-btn:hover {
    animation: none;
    transform: scale(1.1);
}

/* Gradiente animado en botones */
.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.btn-primary:hover::before {
    left: 100%;
}

/* Mejora visual en form focus */
input:focus,
textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(107, 78, 139, 0.15);
}

/* Parallax efecto en hero */
.hero-content {
    transition: transform 0.1s ease-out, opacity 0.3s ease-out;
}

/* Efecto glass en emergency cards */
.emergency-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.emergency-card:hover {
    transform: translateY(-5px) scale(1.03);
    backdrop-filter: blur(20px);
}

/* Animación smooth para navbar */
.navbar {
    transition: all 0.3s ease;
}

/* Efecto de brillo en iconos de servicio */
.servicio-icon {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover mejorado para FAQ */
.faq-card h3 {
    transition: color 0.3s ease;
}

.faq-card:hover h3 {
    color: var(--primary-color);
}

/* Smooth transitions globales */
a, button {
    transition: all 0.3s ease;
}
/* Responsive Formulario */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px;
        font-size: 16px;
    }

    .contacto-form button {
        padding: 14px;
        font-size: 1rem;
    }

    .error-message {
        font-size: 0.75rem;
    }
}