:root {
    --verde-principal: #447D32;
    --verde-oscuro: #345E27;
    --blanco: #ffffff;
    --amarillo-boton: #FFD700; /* Amarillo para el botón */
    --radio: 0.75rem;
}

body {
    background-color: var(--verde-principal);
    color: var(--blanco);
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

/* Header Adaptable */
header {
    width: min(1100px, 92%);
    margin: 20px auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    background-color: var(--blanco);
    border-radius: 1rem;
    padding: 15px 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

header img {
    width: 60px;
    border-radius: 0.5rem;
}

header h2 {
    flex: 1;
    text-align: center;
    color: var(--verde-principal);
    margin: 10px 0;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    font-weight: 800;
}

/* Títulos de Competencias con Relieve */
h3 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    border-bottom: 2px solid rgba(255,255,255,0.2);
    padding-bottom: 10px;
    margin-top: 40px;
    font-size: 1.6rem;
    color: #ffd700; 
    letter-spacing: 0.5px;
}

/* Contenedor de Texto */
.Con {
    width: min(1100px, 92%);
    margin: auto;
    padding: 5%;
    background-color: var(--verde-oscuro);
    border-radius: var(--radio);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.2);
}

.Con p {
    line-height: 1.7;
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
}

/* Manejo de imágenes internas */
.seccion-desplegable img {
    width: 100%;
    max-width: 320px;
    display: block;
    margin: 25px auto;
    border-radius: var(--radio);
    border: 3px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* El fondo con efecto */
.fondo {
    position: relative;
    width: 100%;
    padding: 20px 0;
}

.fondo::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("img/fondo.jpg");
    background-size: cover;
    background-attachment: fixed;
    opacity: 0.12;
    z-index: 0;
}

.fondo > * {
    position: relative;
    z-index: 1;
}

/* Botón Desplegable (Ver competencias) */
.btn-desplegar {
    display: block;
    margin: 30px auto;
    padding: 12px 30px;
    background-color: var(--blanco);
    color: var(--verde-principal);
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.btn-desplegar:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
}

/* Transición del desplegable */
.seccion-desplegable {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.8s cubic-bezier(0, 1, 0, 1), opacity 0.4s;
}

.seccion-desplegable.abierta {
    max-height: 9000px;
    opacity: 1;
    transition: max-height 0.8s ease-in, opacity 0.6s;
}

/* Botón Contactar - Amarillo, Chico y Centrado */
.btn-contacto {
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;    /* Se ajusta al texto */
    padding: 10px 25px;    /* Más chico */
    margin: 40px auto;     /* Centrado */
    background-color: var(--amarillo-boton) !important;
    color: var(--verde-oscuro) !important;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.btn-contacto:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Galería de fotos - Una sola fila */
.fotos {
    display: flex;           /* Cambiado de grid a flex */
    flex-direction: row;     /* Fuerza una fila */
    justify-content: center;
    gap: 15px;
    margin: 30px auto;
    padding: 20px;
    background-color: var(--blanco);
    border-radius: var(--radio);
    overflow-x: auto;        /* Permite scroll si las fotos son muy grandes */
}

.fotos img {
    flex: 1;                 /* Las fotos crecen por igual */
    min-width: 150px;        /* Evita que se aplasten demasiado */
    max-width: 300px;
    height: 180px;
    object-fit: cover;
    border-radius: 0.5rem;
    transition: transform 0.3s;
}

.fotos img:hover {
    transform: scale(1.03);
}

/* Ajustes para móviles */
@media (max-width: 600px) {
    header { padding: 15px; }
    .Con { padding: 8% 5%; }
    .btn-desplegar { width: 90%; }
    .fotos { flex-direction: column; } /* En móvil vuelven a ser columna por espacio */
}