/* =============================================
   CIESA - estilos.css
   Paleta Figma: Verde #1FA37C | Navy #0E2F44 | Dark #111827
   ============================================= */

:root {
    --green: #1FA37C;
    --green-light: #25c495;
    --navy: #0E2F44;
    --dark: #111827;
    --dark-nav: #0E2F44;
    --gray: #4B5563;
    --gray-medium: #374151;
    --light-bg: #F5F5F5;
    --light-bg2: #E5E7EB;
    --border: #CED4DA;
    --white: #ffffff;
}

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

body {
    font-family: 'Segoe UI', sans-serif;
    color: var(--dark);
    line-height: 1.6;
}

/* ===== NAVBAR ===== */
.navbar-ciesa {
    background-color: var(--dark-nav);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.navbar-ciesa .navbar-brand img { height: 60px; }
.navbar-ciesa .navbar-brand span { color: white; font-weight: 700; font-size: 1.2rem; }
.navbar-ciesa .nav-link {
    color: #9CA3AF !important;
    font-size: 0.95rem;
    padding: 6px 14px !important;
    transition: color 0.2s;
}
.navbar-ciesa .nav-link:hover { color: #fff !important; }
.btn-whatsapp {
    background-color: #25D366;
    color: white !important;
    border-radius: 20px;
    padding: 6px 18px !important;
    font-size: 0.9rem;
    font-weight: 600;
}
.btn-whatsapp:hover { background-color: #1ebe5d; color: white !important; }

/* ===== HERO - BASE ===== */
.hero-section {
    background: linear-gradient(
        135deg,
        rgba(14,47,68,0.85),
        rgba(31,163,124,0.55)
    ),
    url('/img/hero-bg.jpg') center 40%/cover no-repeat;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 80px 20px;
}

/* Hero variantes por página — usan hero-bg.jpg hasta que pongas imagen propia */
.hero-nosotros {
    background-image: linear-gradient(135deg, rgba(14,47,68,0.85), rgba(31,163,124,0.55)),
                      url('/img/hero-nosotros.jpg');
    background-size: cover;
    background-position: center 40%;
}
.hero-servicios {
    background-image: linear-gradient(135deg, rgba(14,47,68,0.85), rgba(31,163,124,0.55)),
                      url('/img/hero-servicios.jpg');
    background-size: cover;
    background-position: center 40%;
}
.hero-proyectos {
    background-image: linear-gradient(135deg, rgba(14,47,68,0.85), rgba(31,163,124,0.55)),
                      url('/img/hero-proyectos.jpg');
    background-size: cover;
    background-position: center 40%;
}
.hero-contacto {
    background-image: linear-gradient(135deg, rgba(14,47,68,0.85), rgba(31,163,124,0.55)),
                      url('/img/hero-contacto.jpg');
    background-size: cover;
    background-position: center 40%;
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
}
.hero-section p {
    font-size: 1.15rem;
    opacity: 0.85;
    margin-bottom: 30px;
}

.btn-teal {
    background-color: var(--green);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
.btn-teal:hover { background-color: var(--green-light); color: white; }
.btn-teal-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.7);
    padding: 11px 28px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin-left: 10px;
    font-weight: 600;
    transition: all 0.2s;
}
.btn-teal-outline:hover { background: white; color: var(--dark); }

/* ===== SECCIONES ===== */
.section-title {
    text-align: center;
    margin-bottom: 10px;
    font-size: 0.82rem;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-weight: 700;
}
.section-heading {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
}
.section-sub {
    text-align: center;
    color: var(--gray);
    margin-bottom: 50px;
    font-size: 0.97rem;
}
section { padding: 80px 0; }
section.bg-light-ciesa { background-color: var(--light-bg); }
section.bg-dark-ciesa {
    background-color: var(--navy);
    color: white;
}

/* ===== CARDS DE SERVICIOS ===== */
.card-servicio {
    background: white;
    border: 1.5px solid var(--light-bg2);
    border-radius: 12px;
    padding: 28px 24px;
    height: 100%;
    transition: box-shadow 0.3s, transform 0.2s;
}
.card-servicio:hover {
    box-shadow: 0 8px 30px rgba(31,163,124,0.13);
    transform: translateY(-4px);
    border-color: var(--green);
}
.card-servicio .icon-wrap {
    width: 48px;
    height: 48px;
    background-color: rgba(31,163,124,0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}
.card-servicio .icon-wrap i { color: var(--green); font-size: 1.3rem; }
.card-servicio h5 { font-size: 1rem; font-weight: 700; margin-bottom: 10px; color: var(--dark); }
.card-servicio p { color: var(--gray); font-size: 0.9rem; line-height: 1.6; }

/* ===== GALERÍA DE PROYECTOS ===== */
.proyecto-card {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.proyecto-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s;
}
.proyecto-card:hover img { transform: scale(1.05); }
.proyecto-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(14,47,68,0.9));
    color: white;
    padding: 20px 16px 16px;
}
.proyecto-badge {
    font-size: 0.75rem;
    background-color: var(--green);
    color: white;
    padding: 2px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 4px;
    font-weight: 600;
}
.proyecto-overlay h6 { font-size: 0.95rem; font-weight: 600; margin: 0; }

/* ===== STATS ===== */
.stat-box { text-align: center; padding: 20px; }
.stat-box .stat-num {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--green);
    display: block;
}
.stat-box .stat-label { color: var(--gray); font-size: 0.9rem; }

/* ===== NOSOTROS ===== */
.principios-card {
    background: white;
    border-radius: 12px;
    padding: 35px 28px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    height: 100%;
}
.principios-card .icon-circle {
    width: 60px;
    height: 60px;
    background-color: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.principios-card .icon-circle i { color: white; font-size: 1.4rem; }
.principios-card h5 { font-weight: 700; margin-bottom: 14px; color: var(--dark); }
.principios-card p, .principios-card li { color: var(--gray); font-size: 0.92rem; }

.equipo-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.equipo-card img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 16px;
    border: 4px solid var(--light-bg);
}
.equipo-card h5 { font-weight: 700; margin-bottom: 4px; color: var(--dark); }
.equipo-card .cargo { color: var(--green); font-size: 0.9rem; margin-bottom: 14px; font-weight: 600; }

/* ===== SERVICIOS ===== */
.proceso-step { text-align: center; }
.paso-num {
    width: 50px;
    height: 50px;
    background: var(--green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 auto 14px;
}
.faq-item {
    border-bottom: 1px solid var(--light-bg2);
    padding: 20px 0;
}
.faq-item h6 { font-weight: 700; margin-bottom: 8px; color: var(--dark); }
.faq-item p { color: var(--gray); font-size: 0.92rem; margin: 0; }

/* ===== FORMULARIOS ===== */
.form-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}
.form-label { font-weight: 600; font-size: 0.9rem; color: var(--dark); margin-bottom: 4px; }
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(31,163,124,0.12);
}
.btn-submit {
    background-color: var(--navy);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    transition: background 0.2s;
}
.btn-submit:hover { background-color: var(--gray-medium); color: white; }

/* ===== CONTACTO INFO CARDS ===== */
.info-card {
    background: white;
    border: 1.5px solid var(--light-bg2);
    border-radius: 12px;
    padding: 30px 24px;
    text-align: center;
    height: 100%;
}
.info-card .icon-wrap {
    width: 54px;
    height: 54px;
    background-color: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.info-card .icon-wrap i { color: white; font-size: 1.2rem; }
.info-card h6 { font-weight: 700; margin-bottom: 6px; color: var(--dark); }
.info-card p { color: var(--gray); font-size: 0.9rem; margin: 0; }
.info-card .btn-contactar {
    margin-top: 12px;
    background-color: var(--navy);
    color: white;
    border: none;
    padding: 7px 18px;
    border-radius: 6px;
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}
.info-card .btn-contactar:hover { background-color: var(--green); }

/* ===== LOGIN ===== */
.login-card {
    max-width: 440px;
    margin: 100px auto;
    background: white;
    border-radius: 16px;
    padding: 50px 40px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
    text-align: center;
}
.login-icon {
    width: 64px;
    height: 64px;
    background-color: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.login-icon i { font-size: 1.6rem; color: var(--gray); }

/* ===== ADMIN DASHBOARD ===== */
.sidebar {
    width: 240px;
    min-height: 100vh;
    background-color: var(--dark-nav);
    position: fixed;
    left: 0; top: 0;
    padding-top: 20px;
}
.sidebar .brand {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 16px;
}
.sidebar .brand span { color: white; font-weight: 700; font-size: 1.1rem; }
.sidebar .nav-link {
    color: #9CA3AF !important;
    padding: 10px 20px;
    font-size: 0.92rem;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.sidebar .nav-link:hover, .sidebar .nav-link.active {
    color: white !important;
    border-left-color: var(--green);
    background: rgba(255,255,255,0.05);
}
.sidebar .nav-link i { margin-right: 10px; width: 18px; }
.admin-content { margin-left: 240px; padding: 30px; min-height: 100vh; background-color: var(--light-bg); }
.admin-navbar {
    background: white;
    padding: 12px 30px;
    margin-left: 240px;
    border-bottom: 1px solid var(--light-bg2);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.stat-card .num { font-size: 2rem; font-weight: 700; color: var(--green); }
.stat-card .label { color: var(--gray); font-size: 0.88rem; }
.badge-nuevo {
    background-color: var(--green);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* ===== CTA SECTION ===== */
.cta-section {
    background-color: var(--navy);
    color: white;
    padding: 70px 0;
    text-align: center;
}
.cta-section h3 { font-size: 1.8rem; font-weight: 700; margin-bottom: 16px; }

/* ===== FOOTER ===== */
footer {
    background-color: var(--dark);
    color: #9CA3AF;
    padding: 60px 0 30px;
}
footer .footer-brand { color: white; font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; }
footer .footer-info { font-size: 0.88rem; line-height: 1.9; }
footer h6 { color: white; font-weight: 700; margin-bottom: 16px; font-size: 0.95rem; }
footer a { color: #9CA3AF; text-decoration: none; font-size: 0.88rem; display: block; margin-bottom: 6px; }
footer a:hover { color: var(--green); }
footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

/* ===== SUCCESS PAGE ===== */
.success-card {
    max-width: 700px;
    margin: 80px auto;
    background: white;
    border-radius: 16px;
    padding: 60px 50px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.07);
    text-align: center;
}
.check-circle {
    width: 80px;
    height: 80px;
    background-color: rgba(31,163,124,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}
.check-circle i { font-size: 2rem; color: var(--green); }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-section h1 { font-size: 1.8rem; }
    .section-heading { font-size: 1.5rem; }
    .sidebar { display: none; }
    .admin-content, .admin-navbar { margin-left: 0; }
    .form-card { padding: 24px; }
}

.navbar-ciesa .nav-link.active {
    color: white !important;
    font-weight: 700;
    border-bottom: 2px solid var(--green);
    padding-bottom: 4px !important;
}