/* ==========================================================================
   1. VARIABLES Y RESET
   ========================================================================== */
:root {
    --bg-dark: #2a2a2a;
    --bg-darker: #1c1c1c;
    --gold: #cfa163;
    --text-light: #ffffff;
    --text-dark: #333333;
    --border-color: #e0e0e0;
}

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

body {
    font-family: 'Times New Roman', Times, serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden; /* Evita el scroll horizontal en móviles */
}

h1, h2, h3, h4, h5, summary {
    font-family: 'Times New Roman', Times, serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.mt-2 {
    margin-top: 20px;
}

/* ==========================================================================
   2. COMPONENTES GLOBALES (Botones Elegantes)
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 14px 35px;
    font-family: 'Times New Roman', Times, serif;
    font-size: 0.95rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.4s ease;
    text-align: center;
    border-radius: 2px;
}

.btn-primary {
    background-color: transparent;
    color: var(--gold);
    border: 1px solid var(--gold);
}

.btn-primary:hover {
    background-color: var(--gold);
    color: var(--bg-darker);
    box-shadow: 0 5px 15px rgba(207, 161, 99, 0.3);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--bg-dark);
    color: var(--text-light);
    border: 1px solid var(--bg-dark);
}

.btn-secondary:hover {
    background-color: var(--gold);
    color: var(--bg-darker);
    border: 1px solid var(--gold);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-light);
    border: 1px solid rgba(255, 255, 255, 0.5);
    width: 100%;
}

.btn-outline:hover {
    background-color: var(--gold);
    color: var(--bg-darker);
    border-color: var(--gold);
}

/* ==========================================================================
   3. CABECERA (HEADER) Y NAVEGACIÓN
   ========================================================================== */
.header-estatico {
    background-color: var(--text-light);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 50px;
    width: auto;
    display: block;
}

.logo-text {
    font-size: 1.4rem;
    letter-spacing: 1px;
    margin: 0;
    white-space: nowrap;
}

nav a {
    margin-left: 20px;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--gold);
}

nav a.active {
    border-bottom: 2px solid var(--text-dark);
    padding-bottom: 5px;
}

/* ==========================================================================
   4. SECCIÓN HERO Y SERVICIOS
   ========================================================================== */
.hero-section {
    position: relative;
    color: var(--text-light);
    padding: 100px 0;
    text-align: center;
    overflow: hidden;
    z-index: 1;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('img1.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: blur(5px) brightness(0.35);
    z-index: -1;
}

.hero-content h2 {
    font-size: 2.5rem;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.hero-content p {
    max-width: 700px;
    margin: 0 auto 40px auto;
    font-size: 1.1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

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

.card-servicio {
    background-color: rgba(20, 20, 20, 0.65);
    padding: 30px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-servicio:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.card-servicio h3 {
    color: var(--gold);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.card-servicio p {
    color: #e0e0e0;
}

/* ==========================================================================
   5. ÁREAS DE PRÁCTICA
   ========================================================================== */
.practice-section {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding: 80px 20px;
    align-items: center;
}

.practice-image {
    flex: 1;
    min-width: 300px;
}

.practice-image img {
    width: 100%;
    border-radius: 20px;
    display: block;
}

.practice-text {
    flex: 1;
    min-width: 300px;
}

.practice-text h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.practice-text .subtitle {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.practice-text ul {
    list-style: none;
    margin-bottom: 30px;
}

.practice-text ul li {
    margin-bottom: 15px;
}

/* ==========================================================================
   6. CLIENTES Y ESTADÍSTICAS
   ========================================================================== */
.clients-section {
    background-color: #ffffff;
    padding: 60px 0 40px 0;
    text-align: center;
}

.section-subtitle {
    color: var(--gold);
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 40px;
    text-transform: uppercase;
}

.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    margin-bottom: 20px;
    width: 100%;
    padding: 10px 0;
}

.marquee-container::before,
.marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 120px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%);
}

.marquee-content {
    display: inline-block;
    animation: scroll 25s linear infinite;
}

.marquee-content span {
    display: inline-block;
    padding: 18px 35px;
    background-color: #1a1a1a;
    color: #ffffff;
    margin: 0 15px;
    border-radius: 4px;
    font-family: 'Times New Roman', Times, serif;
    font-weight: bold;
    font-size: 0.9rem;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.stats-section {
    background-color: var(--bg-darker);
    padding: 60px 0;
    color: var(--text-light);
}

.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background-color: transparent; 
    padding: 40px 20px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
}

.stat-card h3 {
    color: var(--gold);
    font-size: 2.8rem;
    margin-bottom: 5px;
}

.stat-card h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: #ffffff;
}

.stat-card p {
    font-size: 0.9rem;
    color: #aaaaaa;
}

/* ==========================================================================
   7. PREGUNTAS FRECUENTES (FAQ)
   ========================================================================== */
.faq-section {
    padding: 80px 20px;
    text-align: center;
}

.faq-section h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.faq-section .subtitle {
    margin-bottom: 40px;
    color: #666;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

details {
    background-color: #f9f9f9;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px 20px;
}

summary {
    font-weight: 600;
    cursor: pointer;
    outline: none;
    list-style: none;
    position: relative;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    position: absolute;
    right: 0;
    color: var(--gold);
    font-weight: bold;
    font-size: 1.2rem;
}

details[open] summary::after {
    content: '-';
}

details p {
    margin-top: 15px;
    color: #555;
}

/* ==========================================================================
   8. PIE DE PÁGINA (FOOTER MEJORADO)
   ========================================================================== */
footer {
    background-color: var(--bg-darker);
    color: var(--text-light);
    padding: 70px 0 20px 0;
    border-top: 3px solid var(--gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1.5fr; 
    gap: 50px;
    margin-bottom: 50px;
}

footer h4 {
    margin-bottom: 25px;
    font-size: 1.2rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-menu {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a, .footer-contact a {
    transition: color 0.3s ease;
}

.footer-menu a:hover, .footer-contact a:hover {
    color: var(--gold);
}

.footer-contact p {
    margin-bottom: 15px;
    font-size: 0.95rem;
    color: #cccccc;
    line-height: 1.5;
}

.mapa-container {
    margin-top: 20px;
    margin-bottom: 25px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-box {
    margin-top: 20px;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #25D366;
    color: #ffffff !important;
    padding: 12px 25px;
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: none;
}

.btn-whatsapp:hover {
    background-color: #1ebe57;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

.form-desc {
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: #cccccc;
}

.contact-form label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--gold);
}

.contact-form input {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.contact-form input:focus {
    outline: none;
    border-color: var(--gold);
}

.form-nota small {
    display: block;
    margin-top: 15px;
    color: #777777;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
    font-size: 0.85rem;
    color: #777777;
}

/* ==========================================================================
   9. BOTÓN FLOTANTE DE WHATSAPP
   ========================================================================== */
.whatsapp-flotante {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: transform 0.3s ease;
    animation: pulso-whatsapp 2s infinite;
}

.whatsapp-flotante:hover {
    transform: scale(1.1);
    color: #ffffff;
}

@keyframes pulso-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ==========================================================================
   10. MEDIA QUERIES (DISEÑO RESPONSIVO)
   ========================================================================== */
@media (max-width: 768px) {
    /* Ajustes Cabecera */
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    .logo-container {
        justify-content: center;
    }
    nav {
        margin-top: 10px;
    }

    /* Ajustes Hero y Servicios */
    .hero-section {
        padding: 60px 0;
    }
    .hero-content h2 {
        font-size: 1.8rem;
    }
    .hero-content p {
        font-size: 1rem;
    }

    /* Ajustes Áreas de Práctica */
    .practice-section {
        flex-direction: column;
        padding: 50px 20px;
        text-align: center;
    }
    .practice-text ul {
        text-align: left; /* Mantiene la legibilidad de la lista */
    }

    /* Ajustes Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    /* Ajustes Botón Flotante para que no estorbe en la pantalla del celular */
    .whatsapp-flotante {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
    .whatsapp-flotante svg {
        width: 28px;
        height: 28px;
    }
}

/* Ajustes adicionales para teléfonos muy pequeños */
@media (max-width: 480px) {
    .logo-text {
        font-size: 1.1rem;
    }
    .stat-card h3 {
        font-size: 2.2rem;
    }
    .btn {
        width: 100%; /* Botones de ancho completo en celulares pequeños */
        padding: 12px 20px;
    }
}