/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #1E3A8A; /* Azul institucional */
    --secondary-color: #2E7D32; /* Verde residencial */
    --bg-color: #F4F6F9; /* Gris suave */
    --text-color: #333;
    --white: #ffffff;
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.14);
    background: rgba(255,255,255,0.92);
    color: #111827;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

textarea.form-control {
    border-radius: 14px;
    resize: vertical;
    min-height: 96px;
}

select.form-control {
    cursor: pointer;
}

.form-control:focus {
    border-color: rgba(30,58,138,0.45);
    box-shadow: 0 0 0 4px rgba(30,58,138,0.10);
    background: #fff;
}

.form-control::placeholder {
    color: rgba(17, 24, 39, 0.45);
    font-weight: 700;
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(14px);
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.06);
    outline: 1px solid rgba(255, 255, 255, 0.55);
    outline-offset: -1px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06), inset 0 1px 0 rgba(255,255,255,0.85);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s;
}

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

.btn-login {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: #152c6b;
    color: white;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: url('../images/fondo.JPG') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-actions .btn-cta.secondary {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-stats {
    margin-top: 1.4rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.hero-stat {
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.30);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
    text-align: left;
}

.hero-stat .k {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 700;
    display: flex;
    gap: 8px;
    align-items: center;
}

.hero-stat .v {
    margin-top: 6px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.hero-scroll {
    margin-top: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.20);
    border: 1px solid rgba(255, 255, 255, 0.20);
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-weight: 700;
}

.hero-scroll:hover {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .hero-stats { grid-template-columns: 1fr; }
}

.btn-cta {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s;
    border: none;
    cursor: pointer;
}

.btn-cta:hover {
    transform: scale(1.05);
}

/* Zones Section */
.zones {
    padding: 5rem 0;
    background: linear-gradient(180deg, #F4F6F9 0%, #E3F2FD 100%);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--primary-color);
    font-size: 2.5rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.zone-card {
    overflow: hidden;
}

.zone-img {
    height: 200px;
    background-color: #ddd;
    background-size: cover;
    background-position: center;
}

.zone-content {
    padding: 1.5rem;
}

.zone-content h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Gallery Section */
.gallery {
    padding: 5rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    height: 250px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item {
    border: none;
    padding: 0;
    background: transparent;
    display: block;
}

.gallery-preview[hidden] {
    display: none;
}

.gallery-preview {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: grid;
    place-items: center;
    padding: 18px;
}

.gallery-preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 15, 30, 0.62);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gallery-preview-panel {
    position: relative;
    width: min(1040px, 100%);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 28px 90px rgba(0,0,0,0.38);
    overflow: hidden;
}

.gallery-preview-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    gap: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.06), rgba(46, 125, 50, 0.06));
}

.gallery-preview-title {
    font-weight: 900;
    color: #0f2354;
    letter-spacing: -0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-preview-close {
    appearance: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-weight: 900;
    color: #0f2354;
}

.gallery-preview-body {
    position: relative;
    background: rgba(15, 23, 42, 0.04);
    display: grid;
    place-items: center;
}

.gallery-preview-img {
    width: 100%;
    height: min(70vh, 640px);
    object-fit: contain;
    display: block;
}

.gallery-preview-nav {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
    padding: 14px;
}

.gallery-preview-btn {
    pointer-events: auto;
    appearance: none;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(15, 35, 84, 0.65);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 900;
    display: grid;
    place-items: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.gallery-preview-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(0,0,0,0.22);
}

.admin-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.admin-gallery-item {
    position: relative;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    outline: 1px solid rgba(255,255,255,0.65);
    outline-offset: -1px;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    cursor: pointer;
    display: grid;
    grid-template-rows: auto 1fr;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.admin-gallery-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 46px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.9);
    border-color: rgba(30, 58, 138, 0.22);
}

.admin-gallery-check {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.admin-gallery-thumb {
    position: relative;
    height: 132px;
    overflow: hidden;
    display: block;
}

.admin-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 0.35s ease;
}

.admin-gallery-item:hover .admin-gallery-thumb img {
    transform: scale(1.08);
}

.admin-gallery-name {
    padding: 10px 12px 12px;
    color: #374151;
    font-weight: 900;
    font-size: 0.86rem;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-gallery-item.is-checked {
    border-color: rgba(46, 125, 50, 0.42);
    box-shadow: 0 16px 40px rgba(46, 125, 50, 0.14);
}

.admin-gallery-item.is-checked .admin-gallery-name {
    color: #1b5e20;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--secondary-color);
    display: inline-block;
}

/* Evolución del proyecto */
.evolution-section {
    padding: 5rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #f2f8f6 100%);
}

.evolution-head {
    max-width: 820px;
    margin: 0 auto 2rem;
    text-align: center;
}

.evolution-title {
    font-size: clamp(1.7rem, 2.8vw, 2.6rem);
    color: #0f2354;
    letter-spacing: -0.02em;
    font-weight: 800;
}

.evolution-subtitle {
    margin-top: 12px;
    color: #5b677a;
    font-size: 1.05rem;
}

.evolution-card {
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(15, 35, 84, 0.08);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(15, 35, 84, 0.12);
    overflow: hidden;
}

.evolution-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 10px;
    flex-wrap: wrap;
}

.evolution-timeline {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.06), rgba(46, 125, 50, 0.06));
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.evolution-timeline::-webkit-scrollbar {
    display: none;
}

.evolution-year {
    appearance: none;
    border: 1px solid rgba(15, 35, 84, 0.12);
    background: rgba(255, 255, 255, 0.78);
    color: #1b2a4a;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    white-space: nowrap;
    scroll-snap-align: start;
}

.evolution-year:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 35, 84, 0.14);
    border-color: rgba(30, 58, 138, 0.22);
}

.evolution-year.is-active {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.96), rgba(46, 125, 50, 0.9));
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    box-shadow: 0 14px 34px rgba(30, 58, 138, 0.22);
}

.evolution-compare-btn {
    appearance: none;
    border: 1px solid rgba(15, 35, 84, 0.12);
    background: rgba(255, 255, 255, 0.86);
    color: #0f2354;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 900;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.evolution-compare-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 35, 84, 0.14);
    background: rgba(255, 255, 255, 0.92);
}

.evolution-viewer {
    padding: 8px 18px 18px;
}

.evolution-media {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #e9eef6;
    height: clamp(240px, 44vw, 460px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.08);
    transition: transform 0.35s ease;
}

.evolution-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 1.1s ease, opacity 0.28s ease;
    opacity: 1;
}

.evolution-media:hover .evolution-image {
    transform: scale(1.06);
}

.evolution-media[data-state="switching"] .evolution-image {
    opacity: 0.18;
    transform: scale(1.04);
}

.evolution-gradient {
    position: absolute;
    inset: auto 0 0 0;
    height: 52%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 100%);
    pointer-events: none;
}

.evolution-year-badge {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 900;
    letter-spacing: 0.02em;
    color: #fff;
    background: rgba(15, 35, 84, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.evolution-info {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    align-items: center;
    padding: 18px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05), rgba(46, 125, 50, 0.05));
}

.evolution-info-label {
    font-size: 0.86rem;
    color: rgba(15, 35, 84, 0.75);
    font-weight: 800;
}

.evolution-info-year {
    margin-top: 6px;
    font-size: 1.5rem;
    color: #0f2354;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.evolution-info-desc {
    color: #24324b;
    font-size: 1.02rem;
    line-height: 1.45;
    font-weight: 600;
}

.evolution-modal[hidden] {
    display: none;
}

.evolution-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 18px;
}

.evolution-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(6, 15, 30, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.evolution-modal-panel {
    position: relative;
    width: 100%;
    max-width: 980px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
    overflow: hidden;
}

.evolution-modal-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.06), rgba(46, 125, 50, 0.06));
}

.evolution-modal-title {
    font-weight: 900;
    color: #0f2354;
    letter-spacing: -0.01em;
}

.evolution-modal-close {
    appearance: none;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-weight: 900;
    color: #0f2354;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.evolution-modal-close:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(15, 35, 84, 0.18);
}

.evolution-modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 18px;
}

.evolution-compare-card {
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
}

.evolution-compare-k {
    padding: 12px 14px;
    font-weight: 900;
    color: #0f2354;
    background: rgba(15, 35, 84, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.evolution-compare-img {
    width: 100%;
    height: clamp(200px, 28vw, 340px);
    object-fit: cover;
    display: block;
}

.evolution-compare-y {
    padding: 12px 14px 14px;
    font-weight: 900;
    color: rgba(15, 35, 84, 0.9);
}

.evolution-modal-hint {
    padding: 0 18px 18px;
    color: #5b677a;
    font-weight: 700;
}

/* Utilities */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mt-2 { margin-top: 2rem; }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .nav-links { display: none; } /* Mobile menu implementation needed */

    .evolution-top {
        padding: 14px 14px 8px;
    }
    .evolution-viewer {
        padding: 8px 14px 14px;
    }
    .evolution-info {
        grid-template-columns: 1fr;
    }
    .evolution-modal-grid {
        grid-template-columns: 1fr;
    }
}
