/* Variables de Colores Agradables (Inspiración Legal/Profesional) */
:root {
    --primary-color: #004d40; /* Verde Oscuro (Elegancia) */
    --secondary-color: #00796b; /* Verde Claro (Fresco) */
    --accent-color: #ffb300; /* Amarillo/Dorado (Acento) */
    --light-bg: #f5f5f5; /* Fondo Claro */
    --dark-text: #333;
    --light-text: #fff;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

/* Estilos Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--dark-text);
    background-color: var(--light-bg);
    line-height: 1.6;
}

section {
    padding: 80px 5%;
    min-height: 100vh;
}

h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--primary-color);
    border-bottom: 3px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 5px;
    width: 100%;
}

/* --- Header y Menú Hamburguesa --- */
header {
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px var(--shadow-color);
}

.logo {
    font-size: 1.5em;
    font-weight: bold;
}

.nav-menu a {
    color: var(--light-text);
    text-decoration: none;
    margin-left: 25px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none; /* Oculto por defecto en desktop */
    cursor: pointer;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background-color: var(--light-text);
    margin: 5px 0;
    transition: 0.4s;
}

/* Estilos del Menú Desplegable Móvil */
.mobile-menu {
    position: fixed;
    top: 60px; /* Ajustar a la altura del header */
    left: 0;
    width: 100%;
    height: 0; /* Inicialmente oculto */
    background-color: var(--secondary-color);
    overflow: hidden;
    transition: height 0.3s ease-in-out;
    z-index: 999;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.mobile-menu.active {
    height: 180px; /* Altura para mostrar los 3 enlaces */
}

.mobile-menu a {
    color: var(--light-text);
    padding: 15px 0;
    text-decoration: none;
    font-size: 1.2em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- 1. Acerca de Mí (Responsive y Flotante) --- */
.about-section {
    background-color: #fff;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.text-side {
    flex: 1;
    max-width: 60%;
}

.text-side h2 {
    text-align: left;
    border-bottom: none;
    margin-bottom: 15px;
    padding-bottom: 0;
}

.image-side {
    flex: 1;
    max-width: 40%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 20px;
    /* Sombra para el efecto flotante (derecha/abajo) */
    box-shadow: 15px 15px 30px var(--shadow-color);
    transition: transform 0.3s ease-in-out;
}

.floating-image:hover {
    transform: translateY(-5px);
}

/* --- 2. Especialidades (Grid de 3 Columnas) --- */
.specialties-section {
    background-color: var(--light-bg);
}

.specialties-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding-top: 20px;
}

.specialty-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

.specialty-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.specialty-item h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1.3em;
}

/* --- Botones de Contacto --- */
.contact-section {
    text-align: center;
    background-color: #fff;
}

.contact-buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.btn {
    text-decoration: none;
    color: var(--light-text);
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn i {
    font-size: 1.2em;
}

.btn:hover {
    transform: translateY(-2px);
}

.whatsapp-btn { background-color: #25d366; }
.whatsapp-btn:hover { background-color: #128c7e; }

.email-btn { background-color: var(--secondary-color); }
.email-btn:hover { background-color: var(--primary-color); }

.facebook-btn { background-color: #3b5998; }
.facebook-btn:hover { background-color: #2d4373; }

/* --- 4. Testimoniales (Carrusel) --- */
.testimonials-section {
    background-color: var(--light-bg);
}

.carousel-container {
    overflow: hidden;
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial-card {
    flex-shrink: 0;
    width: 100%;
    padding: 40px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow-color);
    text-align: center;
    margin: 0 10px;
}

.testimonial-card p {
    font-style: italic;
    margin: 15px 0;
    font-size: 1.1em;
}

.stars {
    color: var(--accent-color);
    font-size: 1.2em;
}

.client-name {
    display: block;
    margin-top: 10px;
    font-weight: bold;
    color: var(--primary-color);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--light-text);
    border: none;
    padding: 15px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: var(--primary-color);
}

.prev-btn { left: 0; }
.next-btn { right: 0; }


/* --- 5. Contador de Logros (Estadísticas) --- */
.stats-section {
    text-align: center;
    background-color: var(--secondary-color);
    color: var(--light-text);
    padding: 60px 5%;
}

.stats-section h2 {
    color: var(--light-text);
    border-bottom-color: var(--accent-color);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    margin: 20px;
}

.stat-item .counter {
    font-size: 3em;
    font-weight: bold;
    color: var(--accent-color);
    display: block;
    line-height: 1;
}

.stat-item p {
    font-size: 1.2em;
    margin-top: 5px;
}

/* --- 6. Cursos y Avisos --- */
.course-section {
    background-color: #fff;
    text-align: center;
}

.course-card {
    display: flex;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-color);
    text-align: left;
}

.course-image {
    width: 40%;
    height: auto;
    object-fit: cover;
    padding: 20px; /* Padding solicitado alrededor de la imagen */
    border-radius: 30px; /* Simula el padding con border-radius externo */
}

.course-details {
    width: 60%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.course-details h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.5em;
}

.course-details .description {
    text-align: justify; /* Texto justificado */
    margin-bottom: 15px;
}

.course-details p {
    margin-bottom: 8px;
}

.course-btn {
    background-color: var(--accent-color);
    color: var(--dark-text);
    align-self: flex-start;
    margin-top: 15px;
}

.course-btn:hover {
    background-color: darken(var(--accent-color), 10%);
}


/* --- Footer --- */
footer {
    background-color: var(--dark-text);
    color: #ccc;
    padding: 40px 5% 10px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding-bottom: 30px;
    border-bottom: 1px solid #444;
}

.footer-col {
    width: calc(33% - 20px);
    margin-bottom: 30px;
}

.footer-col h3 {
    color: var(--light-text);
    margin-bottom: 15px;
    font-size: 1.2em;
}

.footer-col a {
    display: block;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--accent-color);
}

.social-links a {
    display: inline-block;
    font-size: 1.5em;
    margin-right: 15px;
    color: var(--light-text);
}

.social-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 10px;
    font-size: 0.9em;
}

/* --- Responsividad (Media Queries) --- */

/* Tablet (Menos de 1024px) */
@media (max-width: 1024px) {
    /* 2. Especialidades: pasa de 3 a 2 columnas */
    .specialties-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer: Columnas un poco más anchas */
    .footer-col {
        width: calc(50% - 20px);
    }

    /* 6. Cursos: Ajuste de flexbox */
    .course-image {
        width: 35%;
    }
    .course-details {
        width: 65%;
    }
}


/* Móvil (Menos de 768px) */
@media (max-width: 768px) {
    /* Header/Menú Hamburguesa */
    .nav-menu {
        display: none; /* Oculta el menú normal */
    }
    .hamburger {
        display: block; /* Muestra el icono hamburguesa */
    }

    /* 1. Acerca de Mí: Foto arriba, Texto abajo */
    .about-content {
        flex-direction: column;
        text-align: center;
    }
    .text-side, .image-side {
        max-width: 100%;
        text-align: center;
    }
    .text-side h2 {
        text-align: center;
    }
    .floating-image {
        margin-bottom: 20px;
        /* Ajuste de sombra para centrar el efecto */
        box-shadow: 10px 10px 20px var(--shadow-color);
    }

    /* 2. Especialidades: 1 columna */
    .specialties-grid {
        grid-template-columns: 1fr;
    }

    /* Botones de Contacto: Apilados */
    .contact-buttons a {
        width: 100%;
        justify-content: center;
    }

    /* 4. Testimoniales: Ajuste de carrusel */
    .carousel-btn {
        padding: 10px;
    }

    /* 5. Contador: Apilado */
    .stats-grid {
        flex-direction: column;
    }

    /* 6. Cursos: Imagen arriba, Texto abajo */
    .course-card {
        flex-direction: column;
    }
    .course-image, .course-details {
        width: 100%;
        padding: 20px;
        text-align: justify;
    }
    .course-details {
        padding-top: 0;
    }
    .course-btn {
        align-self: center;
    }

    /* Footer: Todas las columnas apiladas */
    .footer-col {
        width: 100%;
        text-align: center;
    }
    .social-links {
        margin-top: 15px;
    }
    .footer-col a {
        display: inline-block;
        margin: 0 10px 8px 10px;
    }
}