/* ========================================= */
/* --- VARIABLES GLOBALES Y ESTILOS BASE --- */
/* ========================================= */
:root {
    /* 
      Paleta de Colores - Ajustada para Rubric #3 (Color Contrast AA)
    */
    --header-footer-bg: #4A90E2;    
    --header-footer-text: #000000;  
    
    --primary-color: #00264d;       /* Azul marino muy oscuro (Headings) */
    --secondary-color: #004080;     /* Azul oscuro (Botones/Enlaces) */
    --accent-color: #eab308;        /* Amarillo para destaques sutiles */
    
    --text-color: #1a1a1a;          
    --bg-color: #ffffff;            
    --card-bg-color: #f8fafc;       
    --border-color: #cbd5e1;
    
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-strong-color: rgba(0, 0, 0, 0.25);

    /* Tipografía */
    --heading-font: 'Poppins', sans-serif;
    --body-font: 'Roboto', sans-serif;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    margin: 0;
    padding: 0;
}

h1, h2, h3 {
    font-family: var(--heading-font);
    color: var(--primary-color);
}

main {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================= */
/* --- COMPONENTES REUTILIZABLES --- */
/* ========================================= */
.card {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px var(--shadow-color);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Mantiene contenido dentro de bordes redondeados */
}

.hero-action {
    display: inline-block;
    padding: 1rem 1.8rem;
    background-color: var(--secondary-color);
    color: #ffffff;
    text-decoration: none;
    font-size: 1.2rem;
    border-radius: 5px;
    box-shadow: 2px 2px 8px var(--shadow-strong-color);
    text-align: center;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

.hero-action:hover {
    background-color: var(--primary-color);
}

/* ========================================= */
/* --- HEADER, NAV Y FOOTER --- */
/* ========================================= */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: #dbeafe; 
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
}
.logo-container { display: flex; align-items: center; text-decoration: none; color: inherit; }
.logo-container img { margin-right: 1rem; border-radius: 50%; }
.site-name .title { font-size: 1.8rem; font-weight: 600; }
.site-name .subtitle { font-size: 1rem; }

nav ul { list-style: none; display: flex; margin: 0; padding: 0; gap: 0.5rem; }
nav a { 
    text-decoration: none; 
    color: var(--primary-color); /* Contraste AA verificado sobre #dbeafe */
    padding: 0.8rem 1.2rem; 
    font-weight: bold; 
    border-radius: 5px; 
    transition: background-color 0.3s, color 0.3s; 
}
nav a:hover, nav a.active { 
    background-color: var(--secondary-color); 
    color: #ffffff; 
}
#menu-button { 
    display: none; 
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.5rem;
}

footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: center;
    padding: 2rem 1rem;
    background-color: var(--primary-color); 
    margin-top: 2rem;
    font-size: 0.95rem;
    color: #ffffff; 
}
footer a { color: #ffffff; text-decoration: underline; }
.footer-info { display: flex; align-items: center; justify-content: center; }
.footer-info img { margin-right: 10px; border-radius: 50%; }
.footer-info div { text-align: left; }

/* ========================================= */
/* --- HOME PAGE --- */
/* ========================================= */
.hero { 
    position: relative; 
    text-align: center; 
    color: #ffffff; 
    margin-bottom: 2rem; 
}
.hero img { 
    width: 100%; 
    height: auto; 
    display: block; 
    border-radius: 8px;
    filter: brightness(0.65); /* Oscurecido para pasar contraste con texto blanco */
    aspect-ratio: 16/9;
    object-fit: cover;
}
.hero .hero-action { 
    position: absolute; 
    bottom: 20%; 
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    font-weight: bold;
    border: 1px solid white;
}

.home-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2rem; }

/* Weather Card Specifics */
.weather-content { text-align: center; }
.weather-content img { width: 50px; height: 50px; }
#current-temp { font-size: 2rem; font-weight: bold; }
#current-description { text-transform: capitalize; }

.spotlights { text-align: center; margin-top: 2rem; }
.spotlight-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }

.business-spotlight { text-align: center; transition: transform 0.2s; }
.business-spotlight:hover { transform: translateY(-5px); }
.business-spotlight img { 
    width: 100%; 
    height: 150px; 
    object-fit: contain; 
    background: white; 
    padding: 10px; 
    border-radius: 5px; 
    margin-bottom: 1rem; 
    border: 1px solid #eee; 
}
.business-spotlight h3 { margin-bottom: 0.5rem; min-height: 3rem; display: flex; align-items: center; justify-content: center; }

/* --- DISCOVER PAGE --- */
.discover-main { display: grid; gap: 1.5rem; }
.discover-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.place-card img { 
    width: 100%; 
    height: 250px; 
    object-fit: cover; 
    border-radius: 5px; 
    margin-bottom: 1rem; 
}

/* --- DIRECTORY PAGE --- */
.directory-main { text-align: center; }
.view-toggle { margin: 1rem 0; display: flex; justify-content: center; gap: 1rem; }
.view-toggle button { 
    padding: 0.8rem 1.5rem; 
    border: 2px solid var(--secondary-color); 
    background-color: var(--bg-color); 
    cursor: pointer; 
    font-size: 1rem;
    font-weight: bold;
    color: var(--secondary-color);
}
.view-toggle button.active { 
    background-color: var(--secondary-color); 
    color: #ffffff; 
}

/* Grid View (Default) */
.directory-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 1.5rem; 
}
.directory-grid .member-card { 
    text-align: center; 
    align-items: center; 
    justify-content: space-between;
}
.directory-grid .member-card img { 
    width: 150px; 
    height: auto; /* Mantiene aspecto */
    aspect-ratio: 3/2;
    object-fit: contain;
    margin-bottom: 1rem; 
}

/* List View (Toggled) */
.directory-list { 
    display: flex; 
    flex-direction: column; 
    gap: 1rem; 
}
.directory-list .member-card { 
    display: flex;
    flex-direction: column; /* Mobile first stack */
    text-align: center; 
    gap: 1rem; 
    align-items: center;
}
.directory-list .member-card img {
    width: 120px;
    height: auto;
}
/* Desktop overrides for list view are in larger.css */

/* --- JOIN PAGE & FORM --- */
.join-main { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.membership-levels { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.level-card { 
    border-top: 6px solid var(--secondary-color); 
    animation: fadeIn 0.8s ease-out; 
    position: relative;
}
/* Level Colors */
.level-card[data-level="NP"] { border-color: #888; }
.level-card[data-level="Bronze"] { border-color: #cd7f32; }
.level-card[data-level="Silver"] { border-color: #c0c0c0; }
.level-card[data-level="Gold"] { border-color: #ffd700; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.join-form-container form { display: grid; gap: 1.2rem; }
.join-form-container label { font-weight: bold; font-size: 0.95rem; color: var(--primary-color); margin-bottom: -0.8rem; }
.join-form-container input, 
.join-form-container select, 
.join-form-container textarea {
    padding: 12px;
    border: 1px solid #94a3b8; /* Alto contraste */
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
    font-size: 1rem;
    font-family: inherit;
}
.join-form-container input:focus { outline: 2px solid var(--secondary-color); border-color: transparent; }

.join-form-container button[type="submit"] {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem;
    font-size: 1.1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 1rem;
}
.join-form-container button[type="submit"]:hover { background-color: var(--primary-color); }

/* Modals */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.6); overflow: auto; }
.modal-content { background-color: #fefefe; margin: 15% auto; padding: 2rem; border: 1px solid #888; width: 85%; max-width: 500px; position: relative; border-radius: 8px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); }
.close-button { color: #555; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.close-button:hover { color: #000; }

/* Thank You Results */
.results-container {
    background: #fff;
    padding: 2rem;
    border: 1px solid var(--border-color);
    margin: 1rem 0;
    border-radius: 8px;
}
.results-container p {
    margin: 0.8rem 0;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 0.5rem;
}
.results-container strong {
    color: var(--secondary-color);
    display: inline-block;
    width: 140px;
}
