:root {
    /* Modo Claro (Día) */
    --primary-color: #e30b5c;
    --secondary-color: #ff528a;
    --text-color: #333;
    --bg-color: #fce4ec;
    --card-bg: white;
    --footer-bg: var(--primary-color);
    --nav-text-hover: #f0f0f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

body.dark-mode {
    /* Modo Oscuro (Noche) */
    --primary-color: #880e4f;
    --secondary-color: #c2185b;
    --text-color: #f8f8f8;
    --bg-color: #2b0c1e;
    --card-bg: #4a142c;
    --footer-bg: #2b0c1e;
    --nav-text-hover: #ffadcd;
    --shadow-color: rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.5s ease, color 0.5s ease;
}

/* --- Navegación --- */
.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px var(--shadow-color);
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    letter-spacing: 2px;
    transition: transform 0.3s ease-in-out;
    display: block;
}

.logo:hover {
    transform: rotate(360deg);
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    position: relative;
    padding: 5px 0;
}

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

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

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

.nav-links a.coming-soon {
    color: white;
    font-weight: normal;
    opacity: 0.7;
    cursor: not-allowed;
}

.nav-links a.coming-soon:hover {
    color: white;
    text-decoration: none;
    opacity: 1;
}

.nav-links a.coming-soon::after {
    content: none;
}

/* --- Botón de cambio de tema --- */
.theme-toggle-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 40px;
    height: 40px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.theme-toggle-button:hover {
    transform: scale(1.1);
}

.theme-toggle-button .icon {
    position: absolute;
    transition: transform 0.5s ease;
}

.light-mode-icon {
    transform: translateY(0);
}

body.dark-mode .light-mode-icon {
    transform: translateY(-100%);
}

.dark-mode-icon {
    transform: translateY(100%);
}

body.dark-mode .dark-mode-icon {
    transform: translateY(0);
}

/* --- Hero / Header --- */
.hero-section,
.page-header {
    position: relative;
    min-height: 40vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    overflow: hidden;
    padding: 40px 20px;
}

.hero-section::before,
.page-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.hero-content,
.page-header .container {
    position: relative;
    z-index: 1;
}

h1,
.page-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

p {
    font-size: 1.2rem;
}

/* --- Main / Cards --- */
.main-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 16px var(--shadow-color);
    transition: transform 0.3s ease, background-color 0.5s ease, box-shadow 0.5s ease;
    margin-bottom: 40px;
}

.card:hover {
    transform: translateY(-5px);
}

.cta-section {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.cta-card {
    flex: 1 1 300px;
    min-width: 300px;
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 16px var(--shadow-color);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease;
}

.cta-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px var(--shadow-color);
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 50px;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 15px;
}

.cta-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.coming-soon-button {
    display: inline-block;
    background: linear-gradient(90deg, #d32f2f 0%, #ff7043 100%);
    color: white;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 50px;
    text-decoration: none;
    margin-top: 15px;
    cursor: not-allowed;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.coming-soon-button:hover {
    opacity: 0.9;
}


/* Sección de Integrantes: Mejoras */
.team-grid {
  display: grid;
  /* Esta línea es la clave, ajusta el valor según tus necesidades */
  grid-template-columns: repeat(auto-fit, minmax(280px, 300px));
  
  /* Usa 'gap' para separar las tarjetas tanto horizontal como verticalmente */
  gap: 90px; /* Este valor de 40px ya es bastante generoso y debería funcionar bien */
  
  margin-top: 55px;
}

.member-card,
.member-card-front,
.member-card-back {
    background: var(--card-bg);
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 8px 16px var(--shadow-color);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 350px;
}

.member-card-container {
    perspective: 1000px;
    width: 100%;
    min-height: 350px;
    background: none;
    box-shadow: none;
    margin-bottom: 0;
}

.member-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.member-card-container:hover .member-card-inner {
    transform: rotateY(180deg);
}

.member-card-front,
.member-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.member-card-front img,
.member-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    margin-bottom: 20px;
}

.member-card-front h3,
.member-card h3 {
    margin: 0 0 5px 0;
    font-size: 1.4rem;
    color: var(--primary-color);
}

.member-card-front .role,
.member-card .role {
    font-size: 1rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.member-card-back {
    transform: rotateY(180deg);
}

.member-card-back p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
    margin: 0;
}

.member-card-back h3,
.member-card-back .role {
    display: none;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 25px;
    background-color: var(--footer-bg);
    color: white;
    margin-top: 50px;
    transition: background-color 0.5s ease;
}

/* --- Responsividad --- */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        text-align: center;
    }

    .nav-links {
        flex-direction: column;
        gap: 10px;
        margin-top: 15px;
    }

    .theme-toggle-button {
        position: absolute;
        top: 10px;
        right: 10px;
    }

    h1,
    .page-header h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    p,
    li {
        font-size: 1rem;
    }

    .main-container {
        padding: 0 10px;
    }

    .card,
    .cta-card {
        padding: 20px;
    }

    .cta-section {
        flex-direction: column;
        gap: 20px;
    }
}
/* Estilos para el contador */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    text-align: center;
}

.countdown-item {
    background: var(--card-bg-color);
    border-radius: 10px;
    padding: 1.5rem 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.countdown-item:hover {
    transform: translateY(-5px);
}

.countdown-item span {
    display: block;
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.countdown-item p {
    font-size: 1rem;
    text-transform: uppercase;
    color: var(--text-color);
    font-weight: 500;
    margin: 0;
}

/* Responsive adjustments for countdown */
@media (max-width: 768px) {
    .countdown-container {
        flex-direction: column;
        gap: 1rem;
    }
}
