/* ESTILOS COMUNA DE VILLA ANA 
   Diseño: Profesional & Moderno (Regla 60-30-10)
   Enero 2026
*/

/* --- VARIABLES --- */
:root {
    /* Identidad Principal */
    --brand-green: #00904a;       /* Verde Institucional */
    --brand-red: #e43b35;         /* Rojo Institucional (Solo Acentos) */
    
    /* Neutros Corporativos */
    --dark-slate: #2c3e50;        /* Gris azulado oscuro */
    --text-body: #4a5568;         /* Gris medio para lectura */
    --bg-light: #f7fafc;          /* Fondo muy sutil */
    --bg-white: #ffffff;
    
    /* Sombras Suaves */
    --shadow-card: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* --- BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Inter', sans-serif; 
    color: var(--text-body); 
    background-color: var(--bg-light); 
    line-height: 1.7; 
}
h1, h2, h3, h4, h5 { 
    font-family: 'Montserrat', sans-serif; 
    color: var(--dark-slate); 
    font-weight: 700; 
}
a { text-decoration: none; transition: all 0.3s ease; }
img { max-width: 100%; height: auto; display: block; }

/* --- HEADER & NAV --- */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    position: fixed; top: 0; width: 100%; z-index: 1000;
    padding: 0.8rem 5%;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { height: 55px; width: auto; }
.brand-text { line-height: 1.1; }
.brand-text h1 { font-size: 1.25rem; text-transform: uppercase; letter-spacing: -0.5px; color: var(--dark-slate); }
.brand-text span { font-size: 0.75rem; color: var(--brand-green); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { 
    font-size: 0.9rem; font-weight: 600; color: var(--dark-slate); position: relative; 
}
.nav-links a::after {
    content: ''; display: block; width: 0; height: 2px; background: var(--brand-green);
    transition: width 0.3s; margin-top: 2px;
}
.nav-links a:hover::after { width: 100%; }

/* Botón CTA Rojo */
.btn-nav-cta {
    background-color: var(--brand-red);
    color: white !important;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(228, 59, 53, 0.25);
}
.btn-nav-cta:hover { background-color: #c5302a; transform: translateY(-1px); }
.btn-nav-cta::after { display: none; }

/* Menú Móvil Botón */
.menu-btn { font-size: 1.5rem; color: var(--dark-slate); cursor: pointer; display: none; }

/* --- HERO SECTION --- */
.hero {
    height: 95vh;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: white;
    background: linear-gradient(rgba(30, 41, 59, 0.6), rgba(30, 41, 59, 0.4)), url('villa-ana-ruinas-la-forestal_dji_0656_mthjpg.webp');
    background-size: cover; background-position: center; background-attachment: fixed;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 50% 100%, 0 90%);
    margin-bottom: 4rem;
}

.hero-content { max-width: 900px; padding: 20px; z-index: 2; }
.hero-tagline { 
    color: #a7f3d0; 
    font-weight: 600; text-transform: uppercase; letter-spacing: 3px; font-size: 0.9rem; margin-bottom: 1rem; display: block;
}
.hero h2 { 
    font-size: 4rem; line-height: 1.1; margin-bottom: 1.5rem; color: white; text-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.hero p { font-size: 1.25rem; margin-bottom: 2.5rem; color: rgba(255,255,255,0.9); font-weight: 300; }

.hero-btn {
    background: white; color: var(--brand-green); padding: 16px 40px; font-weight: 700; border-radius: 50px;
    transition: all 0.3s; display: inline-flex; align-items: center; gap: 10px;
}
.hero-btn:hover { background: var(--brand-green); color: white; }

/* --- SECCIONES COMUNES --- */
.container { max-width: 1100px; margin: 0 auto; padding: 4rem 2rem; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-header h3 { font-size: 2.2rem; margin-bottom: 1rem; position: relative; display: inline-block; }
.section-header h3::after {
    content: ''; display: block; width: 50px; height: 4px; background: var(--brand-green);
    margin: 10px auto 0; border-radius: 2px;
}
.section-header p { color: var(--text-body); max-width: 600px; margin: 0 auto; }

/* --- FEATURE SPLIT (Identidad) --- */
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.split-content h3 { font-size: 2rem; margin-bottom: 1.5rem; color: var(--dark-slate); }
.split-content p { margin-bottom: 1.5rem; font-size: 1.05rem; }
.split-image { position: relative; }
.split-image img { border-radius: 12px; box-shadow: var(--shadow-card); }
.split-image::before {
    content: ''; position: absolute; top: -15px; left: -15px; width: 100%; height: 100%;
    border: 2px solid var(--brand-green); border-radius: 12px; z-index: -1; opacity: 0.3;
}

/* --- CARDS AUTORIDADES --- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.profile-card {
    background: var(--bg-white); border-radius: 12px; overflow: hidden;
    box-shadow: var(--shadow-card); transition: transform 0.3s;
    text-align: center; padding: 2.5rem 1.5rem; border-top: 4px solid transparent;
}
.profile-card:hover { transform: translateY(-5px); border-top-color: var(--brand-green); box-shadow: var(--shadow-hover); }

.profile-img { 
    width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: 0 auto 1.5rem;
    border: 3px solid var(--bg-light); box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.profile-card h4 { font-size: 1.2rem; margin-bottom: 0.2rem; }
.profile-card .role { color: var(--brand-red); font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1rem; display: block; }
.profile-card p { font-size: 0.9rem; color: #718096; }

/* --- TRAMITES --- */
.service-card {
    background: white; padding: 2rem; border-radius: 8px; border: 1px solid #e2e8f0;
    transition: 0.3s; display: flex; flex-direction: column; align-items: flex-start;
}
.service-card:hover { border-color: var(--brand-green); box-shadow: var(--shadow-hover); }
.icon-box {
    width: 50px; height: 50px; background: rgba(0, 144, 74, 0.1); color: var(--brand-green);
    display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 1.5rem; margin-bottom: 1.5rem;
}
.service-card h4 { margin-bottom: 0.5rem; }
.link-arrow { margin-top: auto; color: var(--brand-red); font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 5px; }
.link-arrow:hover { gap: 10px; }

/* --- GALERIA GRID --- */
.gallery-wrap { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.gallery-pic { 
    height: 250px; border-radius: 8px; overflow: hidden; cursor: pointer; position: relative;
}
.gallery-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-pic:hover img { transform: scale(1.05); }

/* --- FOOTER --- */
footer { background: var(--dark-slate); color: #cbd5e0; padding: 4rem 2rem 2rem; margin-top: 4rem; }
.footer-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; }
.footer-col h5 { color: white; font-size: 1.1rem; margin-bottom: 1.5rem; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a:hover { color: white; padding-left: 5px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 3rem; padding-top: 2rem; text-align: center; font-size: 0.85rem; }

/* --- LIGHTBOX --- */
.lightbox { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(15, 23, 42, 0.95); }
.lightbox-content { margin: auto; display: block; max-width: 90%; max-height: 90vh; border: none; box-shadow: 0 0 50px rgba(0,0,0,0.5); position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.close-lb { position: absolute; top: 20px; right: 30px; color: white; font-size: 40px; cursor: pointer; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .navbar { padding: 1rem; }
    .menu-btn { display: block; }
    .nav-links { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: white; flex-direction: column; padding: 2rem; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    .nav-links.active { display: flex; }
    .hero h2 { font-size: 2.5rem; }
    .hero { clip-path: none; margin-bottom: 0; }
    .split-section { grid-template-columns: 1fr; }
}


/* --- SECCIÓN NORMATIVA (ACORDEONES) --- */
.normativa-wrap { max-width: 800px; margin: 0 auto; }

/* Estilo del Contenedor Desplegable (Native HTML <details>) */
.doc-accordion {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.doc-accordion:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--brand-green);
}

/* Cabecera del Acordeón (Summary) */
.doc-accordion summary {
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--dark-slate);
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none; /* Oculta el triangulo por defecto */
    transition: background 0.2s;
}

/* Icono de flecha custom */
.doc-accordion summary::after {
    content: '\f078'; /* FontAwesome chevron-down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    transition: transform 0.3s;
    color: var(--brand-green);
}

/* Estado Abierto */
.doc-accordion[open] summary {
    background-color: #f0fdf4; /* Verde muy muy suave */
    color: var(--brand-green);
    border-bottom: 1px solid #e2e8f0;
}

.doc-accordion[open] summary::after {
    transform: rotate(180deg);
}

/* Lista de Archivos */
.doc-list {
    padding: 0;
    margin: 0;
    list-style: none;
    background: white;
}

.doc-list li {
    border-bottom: 1px solid #f1f5f9;
}
.doc-list li:last-child { border-bottom: none; }

.doc-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-body);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.doc-link:hover {
    background-color: #fafafa;
    color: var(--brand-green);
    padding-left: 1.8rem; /* Pequeño desplazamiento a la derecha */
}

.doc-link i {
    color: var(--brand-red); /* Icono PDF en rojo */
    font-size: 1.2rem;
    margin-right: 15px;
}

.doc-meta {
    margin-left: auto;
    font-size: 0.8rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
}