:root {
    --color-text-title: #024b40;
    --color-card-bg: #e6f4ea;
    --color-btn: #00594c;
    --color-btn-hover: #007a68; 
    --color-accent-light: #e0f2e9;
    --color-text-main: #333333;
    --color-text-muted: #555555;
    --color-white: #ffffff;
    --color-error: #dc3545;
    --color-error-bg: #f8d7da;
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--color-white);
    color: var(--color-text-main);
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
}

.background-accent {
    position: absolute; top: 0; right: 0; width: 55%; height: 700px;
    background-color: var(--color-accent-light);
    border-bottom-left-radius: 40%; z-index: -1; opacity: 0.6;
}

.container { max-width: 1400px; margin: 0 auto; padding: 2rem 4rem; }

/* HERO */
.hero { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4rem; min-height: 50vh; }
.hero-content { flex: 1; padding-right: 4rem; }
.badge { font-size: 0.75rem; font-weight: 700; color: var(--color-text-title); letter-spacing: 2px; display: block; margin-bottom: 1rem; }
.hero h1 { font-size: 3.5rem; font-weight: 800; color: var(--color-text-title); line-height: 1.1; margin-bottom: 1.5rem; }
.hero p { font-size: 1.1rem; color: var(--color-text-main); margin-bottom: 2rem; }
.divider { height: 1px; width: 100%; background-color: #ddd; margin-bottom: 1rem; }
.motto { font-size: 0.95rem; font-style: italic; color: var(--color-text-muted); }

.hero-image-section { flex: 1; position: relative; }

.image-wrapper { 
    background-color: var(--color-card-bg); 
    border-radius: 20px; 
    height: 400px; 
    position: relative; 
    overflow: hidden; 
}

/* Imagen del personaje */
.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center bottom;
    z-index: 0;
}

/* CARDS */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 4rem; }
.card { background-color: var(--color-card-bg); border-radius: 12px; padding: 2.5rem 2rem; position: relative; overflow: hidden; transition: var(--transition); display: flex; flex-direction: column; border: 1px solid rgba(0, 89, 76, 0.05); }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 89, 76, 0.1); }
.card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.icon-circle { width: 50px; height: 50px; color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.card:nth-child(1) .icon-circle { background-color: #63b85d; }
.card:nth-child(2) .icon-circle { background-color: #00a859; }
.card:nth-child(3) .icon-circle { background-color: #024b40; }
.card h2 { font-size: 1.4rem; color: var(--color-text-title); line-height: 1.2; }
.card p { font-size: 0.95rem; color: var(--color-text-muted); margin-bottom: 2rem; flex-grow: 1; }
.card-footer { display: flex; justify-content: space-between; align-items: flex-end; }
.btn-ingresar { background-color: var(--color-btn); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 30px; font-weight: 600; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; transition: var(--transition); z-index: 2; }
.btn-ingresar:hover { background-color: var(--color-btn-hover); padding-right: 1.2rem; }
.arrow { background: white; color: var(--color-btn); border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; }
.bg-icon-watermark { position: absolute; bottom: -10px; right: 10px; font-size: 6rem; opacity: 0.04; z-index: 1; pointer-events: none; }

/* FOOTER */
/* Aumentado el padding y margen para darle aire a los logos grandes */
.site-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 3.5rem; padding-bottom: 1rem; border-top: 1px solid #eee; margin-top: 2rem; }
.footer-motto-container { flex: 1; }
.footer-motto-container p { color: #888; font-style: italic; font-size: 1.05rem; }
.footer-logos { display: flex; align-items: center; justify-content: flex-end; }

/* LOGOS DUPLICARON SU TAMAÑO (DE 55px A 100px) */
.footer-img-logos { 
    height: 100px; 
    width: auto; 
    object-fit: contain; 
}

/* --- MODAL LOGIN UI/UX --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    opacity: 1; transition: opacity 0.3s ease;
}
.modal-overlay.hidden { opacity: 0; pointer-events: none; }

.modal-card {
    background-color: var(--color-white);
    width: 100%; max-width: 400px;
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: translateY(0); transition: transform 0.3s ease;
}
.modal-overlay.hidden .modal-card { transform: translateY(20px); }

.modal-close {
    position: absolute; top: 1rem; right: 1.5rem;
    background: none; border: none; font-size: 2rem;
    color: #999; cursor: pointer; transition: color 0.2s;
}
.modal-close:hover { color: var(--color-text-main); }

.modal-header { text-align: center; margin-bottom: 2rem; }
.modal-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.modal-header h2 { color: var(--color-text-title); font-size: 1.5rem; margin-bottom: 0.3rem; }
.modal-header p { color: var(--color-text-muted); font-size: 0.9rem; }

.input-group { margin-bottom: 1.5rem; text-align: left; }
.input-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--color-text-main); margin-bottom: 0.5rem; }
.input-group input {
    width: 100%; padding: 0.8rem 1rem;
    border: 1px solid #ddd; border-radius: 8px;
    font-size: 1rem; font-family: var(--font-main);
    transition: all 0.2s;
}
.input-group input:focus { outline: none; border-color: var(--color-btn); box-shadow: 0 0 0 3px rgba(0, 89, 76, 0.1); }

.btn-submit {
    width: 100%; padding: 0.9rem;
    background-color: var(--color-btn); color: white;
    border: none; border-radius: 8px;
    font-size: 1rem; font-weight: 600;
    cursor: pointer; transition: var(--transition);
    display: flex; justify-content: center; align-items: center; gap: 0.5rem;
    margin-top: 1rem;
}
.btn-submit:hover { background-color: var(--color-btn-hover); }
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; }

.alert {
    padding: 0.8rem; border-radius: 8px; font-size: 0.85rem; text-align: center; margin-bottom: 1rem;
    background-color: var(--color-error-bg); color: var(--color-error); border: 1px solid #f5c6cb;
}
.alert.hidden { display: none; }

.modal-footer { text-align: center; margin-top: 1.5rem; }
.link-muted { color: var(--color-text-muted); font-size: 0.85rem; text-decoration: none; transition: color 0.2s; }
.link-muted:hover { color: var(--color-btn); text-decoration: underline; }

/* Loader CSS */
.loader {
    width: 20px; height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}
.loader.hidden { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1024px) { .cards-grid { grid-template-columns: repeat(2, 1fr); } .hero h1 { font-size: 3rem; } }
@media (max-width: 768px) {
    .container { padding: 1.5rem; } .hero { flex-direction: column; } .hero-content { padding-right: 0; margin-bottom: 3rem; }
    .cards-grid { grid-template-columns: 1fr; } 
    /* Adaptación móvil para el footer y sus logos */
    .site-footer { flex-direction: column; gap: 1.5rem; text-align: center; padding-top: 2rem; }
    .footer-img-logos { height: 75px; } 
}
