/* ============================================
   JUNTA DE AGUA DE RIEGO - Custom Styles
   Paleta: Azul agua + Verde naturaleza
   ============================================ */

:root {
    --primary:       #0077b6;
    --primary-dark:  #005f8e;
    --primary-light: #00b4d8;
    --accent:        #52b788;
    --accent-dark:   #2d6a4f;
    --dark:          #0d1b2a;
    --gray-800:      #1b2a3b;
    --gray-600:      #3d5a70;
    --gray-200:      #e8f4f8;
    --white:         #ffffff;
    --gradient-hero: linear-gradient(135deg, #0d1b2a 0%, #0077b6 50%, #00b4d8 100%);
    --gradient-btn:  linear-gradient(135deg, #0077b6, #00b4d8);
    --gradient-accent: linear-gradient(135deg, #52b788, #2d6a4f);
    --shadow-sm:     0 2px 8px rgba(0,119,182,0.12);
    --shadow-md:     0 8px 24px rgba(0,119,182,0.18);
    --shadow-lg:     0 20px 60px rgba(0,119,182,0.22);
    --radius:        12px;
    --radius-lg:     20px;
}

/* ── Base ──────────────────────────────────── */
* { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    color: #2c3e50;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

/* ── Navbar ────────────────────────────────── */
#mainNavbar {
    background: transparent;
    padding: 1.2rem 0;
    transition: all 0.35s ease;
}

#mainNavbar.scrolled {
    background: rgba(13, 27, 42, 0.97);
    backdrop-filter: blur(12px);
    padding: 0.6rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.brand-icon {
    width: 42px;
    height: 42px;
    background: var(--gradient-btn);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

.brand-icon-sm {
    width: 36px;
    height: 36px;
    font-size: 1rem;
}

.brand-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    line-height: 1.2;
    display: block;
}

.brand-subtitle {
    font-size: 0.6rem;
    color: var(--primary-light);
    letter-spacing: 0.8px;
    text-transform: uppercase;
    display: block;
    margin-top: 1px;
    white-space: nowrap;
}

.navbar-nav .nav-link {
    font-size: 0.88rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85) !important;
    border-radius: 8px;
    transition: all 0.25s;
    letter-spacing: 0.2px;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    background: rgba(255,255,255,0.1);
}

.btn-consulta {
    background: var(--gradient-btn);
    color: white !important;
    border: none;
    border-radius: 50px;
    padding: 0.5rem 1.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,119,182,0.4);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-consulta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,119,182,0.5);
    color: white !important;
}

/* ── Hero Section ──────────────────────────── */
.hero-section {
    min-height: 100vh;
    background:
        linear-gradient(160deg,
            rgba(4, 20, 10, 0.85) 0%,
            rgba(10, 60, 30, 0.72) 45%,
            rgba(0, 100, 80, 0.58) 100%),
        url('../images/hero-bg.jpg')
        center 60% / cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 20px;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(0,180,216,0.10) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(82,183,136,0.08) 0%, transparent 40%);
}

.hero-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.hero-particles span {
    position: absolute;
    border-radius: 50%;
    background: rgba(0,180,216,0.15);
    animation: float-particle 8s infinite ease-in-out;
}

.hero-particles span:nth-child(1)  { width:80px;  height:80px;  top:15%; left:10%; animation-delay:0s;   }
.hero-particles span:nth-child(2)  { width:120px; height:120px; top:60%; left:5%;  animation-delay:2s;   }
.hero-particles span:nth-child(3)  { width:60px;  height:60px;  top:30%; left:85%; animation-delay:1s;   }
.hero-particles span:nth-child(4)  { width:100px; height:100px; top:75%; left:80%; animation-delay:3s;   }
.hero-particles span:nth-child(5)  { width:40px;  height:40px;  top:50%; left:50%; animation-delay:1.5s; }

@keyframes float-particle {
    0%, 100% { transform: translateY(0) scale(1);   opacity: 0.5; }
    50%       { transform: translateY(-30px) scale(1.1); opacity: 0.8; }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #90e0ef;
    border-radius: 50px;
    padding: 0.4rem 1.1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 800;
    color: white;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    text-align: center;
}

.hero-title .highlight {
    background: linear-gradient(135deg, #90e0ef, #52b788);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 520px;
}

.hero-btns {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero-primary {
    background: var(--gradient-btn);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.85rem 2.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(0,119,182,0.45);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 35px rgba(0,119,182,0.55);
    color: white;
}

.btn-hero-secondary {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    color: white;
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 50px;
    padding: 0.85rem 2.2rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-hero-secondary:hover {
    background: rgba(255,255,255,0.2);
    color: white;
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    flex-wrap: wrap;
}

.hero-stat-item { text-align: left; }

.hero-stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #90e0ef;
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}

/* Feature pills */
.hero-feature-pills {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 50px;
    padding: 0.45rem 1.1rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
}

.hero-pill i {
    color: #90e0ef;
    font-size: 0.9rem;
}

/* Hero visual card */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-card-main {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 380px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-card-icon {
    width: 72px;
    height: 72px;
    background: var(--gradient-btn);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin-bottom: 1.2rem;
}

.hero-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.hero-card-text {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.7;
}

.hero-card-input-mock {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-top: 1.2rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-card-btn-mock {
    background: var(--gradient-btn);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    margin-top: 0.75rem;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.hero-floating-badge {
    position: absolute;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 0.7rem 1rem;
    font-size: 0.78rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    animation: float-badge 3s ease-in-out infinite;
}

.hero-floating-badge.b1 { top: 10%; right: -15px; animation-delay: 0s; }
.hero-floating-badge.b2 { bottom: 15%; left: -20px; animation-delay: 1.5s; }

@keyframes float-badge {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}

/* ── Section Base ──────────────────────────── */
section { scroll-margin-top: 80px; }

.section-header { margin-bottom: 3.5rem; }

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(0,119,182,0.08);
    color: var(--primary);
    border: 1px solid rgba(0,119,182,0.2);
    border-radius: 50px;
    padding: 0.35rem 1rem;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--dark);
    line-height: 1.25;
}

.section-title .text-accent {
    color: var(--primary);
}

.section-desc {
    font-size: 1rem;
    color: #5a7080;
    line-height: 1.8;
    max-width: 560px;
}

/* ── Servicios ─────────────────────────────── */
#servicios {
    background: #f8fbfe;
    padding: 6rem 0;
}

.service-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    height: 100%;
    border: 1px solid #e8f4f8;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--gradient-btn);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card:hover::before { transform: scaleX(1); }

.service-icon {
    width: 62px;
    height: 62px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
}

.service-icon.blue   { background: rgba(0,119,182,0.1);  color: var(--primary); }
.service-icon.green  { background: rgba(82,183,136,0.12); color: var(--accent-dark); }
.service-icon.teal   { background: rgba(0,180,216,0.1);  color: #0077a6; }
.service-icon.indigo { background: rgba(72,52,212,0.08); color: #4834d4; }

.service-card h5 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.6rem;
}

.service-card p {
    font-size: 0.875rem;
    color: #5a7080;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.service-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.2s;
}

.service-link:hover { gap: 0.6rem; color: var(--primary-dark); }

/* ── Nosotros ──────────────────────────────── */
#nosotros {
    padding: 6rem 0;
    background: white;
}

.about-img-wrapper {
    position: relative;
}

.about-img-main {
    width: 100%;
    border-radius: var(--radius-lg);
    object-fit: cover;
    height: 420px;
}

.about-img-placeholder {
    width: 100%;
    height: 420px;
    border-radius: var(--radius-lg);
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6rem;
    color: rgba(255,255,255,0.4);
    position: relative;
    overflow: hidden;
}

.about-img-placeholder::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 70%, rgba(82,183,136,0.3), transparent 60%);
}

.about-badge-float {
    position: absolute;
    bottom: -1.5rem;
    right: -1.5rem;
    background: white;
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    min-width: 130px;
}

.about-badge-float .number {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.about-badge-float .label {
    font-size: 0.75rem;
    color: #5a7080;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.about-feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.about-feature:hover { background: #f8fbfe; }

.about-feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(0,119,182,0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.about-feature h6 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.2rem;
}

.about-feature p {
    font-size: 0.82rem;
    color: #5a7080;
    margin: 0;
    line-height: 1.6;
}

/* ── Stats ─────────────────────────────────── */
#estadisticas {
    background: var(--gradient-hero);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

#estadisticas::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 50%, rgba(0,180,216,0.15), transparent 60%);
}

.stat-card {
    text-align: center;
    padding: 1.5rem;
    position: relative;
    z-index: 1;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    color: #90e0ef;
    margin-bottom: 1rem;
}

.stat-card .stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    color: white;
    line-height: 1;
    display: block;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    margin-top: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── CTA Consulta ──────────────────────────── */
#cta-consulta {
    padding: 6rem 0;
    background: #f8fbfe;
}

.cta-card {
    background: var(--gradient-hero);
    border-radius: 24px;
    padding: 4rem 3rem;
    position: relative;
    overflow: hidden;
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: rgba(0,180,216,0.12);
}

.cta-card::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -5%;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(82,183,136,0.1);
}

.cta-card > * { position: relative; z-index: 1; }

.cta-card h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
}

.cta-card p {
    color: rgba(255,255,255,0.75);
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.cta-input-group {
    display: flex;
    gap: 0.75rem;
    max-width: 460px;
    flex-wrap: wrap;
}

.cta-input {
    flex: 1;
    min-width: 200px;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 12px;
    padding: 0.85rem 1.2rem;
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.25s;
}

.cta-input::placeholder { color: rgba(255,255,255,0.45); }
.cta-input:focus { border-color: rgba(255,255,255,0.6); }

.btn-cta-submit {
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 12px;
    padding: 0.85rem 1.8rem;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-cta-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    color: var(--primary-dark);
}

.cta-features {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.cta-feature-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255,255,255,0.7);
    font-size: 0.82rem;
}

.cta-feature-item i { color: #90e0ef; }

/* ── Contacto ──────────────────────────────── */
#contacto {
    padding: 6rem 0;
    background: white;
}

.contact-info-card {
    background: #f8fbfe;
    border-radius: var(--radius-lg);
    padding: 2rem;
    height: 100%;
    border: 1px solid #e0eff8;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid #e8f4f8;
}

.contact-item:last-child { border-bottom: none; }

.contact-item-icon {
    width: 46px;
    height: 46px;
    background: var(--gradient-btn);
    border-radius: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-item h6 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #5a7080;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.contact-item p {
    font-size: 0.9rem;
    color: var(--dark);
    margin: 0;
    font-weight: 500;
}

.contact-form-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    border: 1px solid #e8f4f8;
    box-shadow: var(--shadow-sm);
}

.form-label-custom {
    font-size: 0.82rem;
    font-weight: 600;
    color: #3d5a70;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 0.4rem;
}

.form-control-custom {
    border: 1.5px solid #d8ecf5;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--dark);
    transition: border-color 0.25s, box-shadow 0.25s;
    background: #fafcfe;
}

.form-control-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,119,182,0.1);
    background: white;
    outline: none;
}

.btn-submit-form {
    background: var(--gradient-btn);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
}

.btn-submit-form:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

/* Alertas del formulario de contacto (inline — ya no se usan, mantenidas por compatibilidad) */
.alert-form {
    display: flex;
    align-items: center;
    padding: .9rem 1.2rem;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 500;
}
.alert-form-success {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}
.alert-form-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* Botón submit — estado disabled/loading */
.btn-submit-form:disabled {
    opacity: .75;
    cursor: not-allowed;
    transform: none !important;
}


.footer-main {
    background: #0d1b2a;
    padding: 4rem 0 2rem;
}

.footer-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
    margin-bottom: 1.2rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: 0.5rem; }

.footer-links a {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.footer-links a:hover { color: #90e0ef; }

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    font-size: 0.84rem;
    color: rgba(255,255,255,0.55);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.5;
}

.footer-contact i {
    color: var(--primary-light);
    font-size: 0.85rem;
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.footer-divider {
    border-color: rgba(255,255,255,0.08);
    margin: 2rem 0 1.5rem;
}

.social-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.07);
    border-radius: 8px;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.25s;
}

.social-icon:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* ── Consulta Page ─────────────────────────── */
.consulta-hero {
    background: var(--gradient-hero);
    padding: 8rem 0 5rem;
    position: relative;
    overflow: hidden;
}

.consulta-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 50%, rgba(0,180,216,0.15), transparent 50%);
}

.consulta-hero > .container { position: relative; z-index: 1; }

.consulta-page-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 800;
    color: white;
}

.consulta-page-desc {
    color: rgba(255,255,255,0.7);
    font-size: 1rem;
    line-height: 1.8;
}

.consulta-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 25px 70px rgba(0,119,182,0.18);
    overflow: hidden;
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

.consulta-card-header {
    background: var(--gradient-hero);
    padding: 2rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.consulta-card-header-icon {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: white;
}

.consulta-card-header h4 {
    color: white;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0;
}

.consulta-card-header p {
    color: rgba(255,255,255,0.65);
    font-size: 0.82rem;
    margin: 0;
}

.consulta-card-body {
    padding: 2.5rem;
}

.cedula-input-group {
    position: relative;
}

.cedula-input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.1rem;
    z-index: 2;
}

.cedula-input {
    border: 2px solid #d8ecf5;
    border-radius: 14px;
    padding: 1rem 1.2rem 1rem 3rem;
    font-size: 1rem;
    color: var(--dark);
    width: 100%;
    transition: all 0.25s;
    background: #fafcfe;
    letter-spacing: 2px;
    font-weight: 600;
}

.cedula-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0,119,182,0.1);
    outline: none;
    background: white;
}

.cedula-input::placeholder {
    letter-spacing: 0;
    font-weight: 400;
    color: #aabccb;
}

.btn-buscar {
    background: var(--gradient-btn);
    color: white;
    border: none;
    border-radius: 14px;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(0,119,182,0.4);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    justify-content: center;
}

.btn-buscar:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,119,182,0.5);
    color: white;
}

.consulta-info-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    background: #f8fbfe;
    border-radius: 10px;
    border: 1px solid #e0eff8;
}

.consulta-info-item i {
    color: var(--primary);
    font-size: 1rem;
    width: 18px;
    text-align: center;
}

.consulta-info-item span {
    font-size: 0.82rem;
    color: #5a7080;
    font-weight: 500;
}

/* ── Resultado / Estado de Cuenta ──────────── */
.resultado-hero {
    background: var(--gradient-hero);
    padding: 8rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.resultado-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(82,183,136,0.15), transparent 50%);
}

.resultado-hero > .container { position: relative; z-index: 1; }

.user-avatar {
    width: 64px;
    height: 64px;
    background: rgba(255,255,255,0.15);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.user-cedula-badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 0.25rem 0.75rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 0.3rem;
}

.resultado-summary-section {
    margin-top: -2.5rem;
    position: relative;
    z-index: 10;
}

.summary-card {
    background: white;
    border-radius: 20px;
    padding: 1.8rem;
    box-shadow: 0 10px 40px rgba(0,119,182,0.14);
    text-align: center;
    height: 100%;
    border: 1px solid #e8f4f8;
    transition: transform 0.25s;
}

.summary-card:hover { transform: translateY(-4px); }

.summary-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin: 0 auto 1rem;
}

.summary-card-icon.green  { background: rgba(82,183,136,0.12);  color: var(--accent-dark); }
.summary-card-icon.red    { background: rgba(231,76,60,0.1);    color: #e74c3c; }
.summary-card-icon.blue   { background: rgba(0,119,182,0.1);   color: var(--primary); }
.summary-card-icon.orange { background: rgba(243,156,18,0.1);  color: #e67e22; }

.summary-card .value {
    font-family: 'Poppins', sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.summary-card .value.green  { color: #27ae60; }
.summary-card .value.red    { color: #e74c3c; }
.summary-card .value.blue   { color: var(--primary); }
.summary-card .value.orange { color: #e67e22; }

.summary-card .label {
    font-size: 0.78rem;
    color: #5a7080;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Tabs Estado de Cuenta */
.estado-tabs {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,119,182,0.1);
    overflow: hidden;
    border: 1px solid #e8f4f8;
}

.estado-tabs .nav-tabs {
    background: #f8fbfe;
    border-bottom: 1px solid #e0eff8;
    padding: 0.75rem 1rem 0;
    gap: 0.25rem;
}

.estado-tabs .nav-tabs .nav-link {
    border: none;
    border-radius: 10px 10px 0 0;
    padding: 0.65rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #5a7080;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s;
}

.estado-tabs .nav-tabs .nav-link:hover {
    color: var(--primary);
    background: rgba(0,119,182,0.06);
}

.estado-tabs .nav-tabs .nav-link.active {
    background: white;
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.estado-tabs .tab-content {
    padding: 1.5rem;
}

/* Tabla de pagos */
.tabla-pagos {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.tabla-pagos thead th {
    background: #f8fbfe;
    color: #5a7080;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.85rem 1rem;
    border-bottom: 2px solid #e0eff8;
}

.tabla-pagos thead th:first-child { border-radius: 10px 0 0 0; }
.tabla-pagos thead th:last-child  { border-radius: 0 10px 0 0; }

.tabla-pagos tbody tr {
    transition: background 0.2s;
}

.tabla-pagos tbody tr:hover { background: #f8fbfe; }

.tabla-pagos tbody td {
    padding: 1rem;
    font-size: 0.875rem;
    color: #2c3e50;
    border-bottom: 1px solid #f0f5f8;
    vertical-align: middle;
}

.tabla-pagos tbody tr:last-child td { border-bottom: none; }

.badge-estado {
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.badge-pagado   { background: rgba(39,174,96,0.12);  color: #27ae60; }
.badge-pendiente { background: rgba(231,76,60,0.1);  color: #e74c3c; }
.badge-vencido  { background: rgba(243,156,18,0.12); color: #e67e22; }
.badge-parcial  { background: rgba(52,152,219,0.1);  color: #2980b9; }

.pago-monto {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
}

.pago-monto.pagado   { color: #27ae60; }
.pago-monto.pendiente { color: #e74c3c; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    font-size: 3.5rem;
    color: #c8dfe8;
    margin-bottom: 1rem;
}

.empty-state h5 {
    font-size: 1rem;
    color: #3d5a70;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.85rem;
    color: #5a7080;
    margin: 0;
}

/* Detalle info cliente */
.cliente-info-card {
    background: white;
    border-radius: 20px;
    padding: 1.8rem;
    box-shadow: 0 8px 30px rgba(0,119,182,0.1);
    border: 1px solid #e8f4f8;
}

.cliente-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f5f8;
    font-size: 0.875rem;
}

.cliente-info-row:last-child { border-bottom: none; }

.cliente-info-row .key {
    color: #5a7080;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cliente-info-row .key i { color: var(--primary); width: 16px; }

.cliente-info-row .val {
    color: var(--dark);
    font-weight: 600;
}

/* Back button */
.btn-back {
    background: rgba(255,255,255,0.1);
    border: 1.5px solid rgba(255,255,255,0.25);
    color: rgba(255,255,255,0.85);
    border-radius: 10px;
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.25s;
    margin-bottom: 1.5rem;
}

.btn-back:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ── Loader ────────────────────────────────── */
.btn-buscar .spinner-border {
    width: 1.1rem;
    height: 1.1rem;
    border-width: 0.15em;
}

/* ── Alert ─────────────────────────────────── */
.alert-no-encontrado {
    background: rgba(231,76,60,0.06);
    border: 1.5px solid rgba(231,76,60,0.2);
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

/* ══════════════════════════════════════════════
   AVISOS DESTACADOS — LANDING (sección #avisos)
══════════════════════════════════════════════ */
.aviso-pub-card {
    background: #fff;
    border: 1px solid #e9eef5;
    border-radius: 18px;
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}
.aviso-pub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,.1);
}
.aviso-pub-urgente {
    border-color: #fecaca;
    border-top: 3px solid #ef4444;
}

.aviso-pub-featured-ribbon {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    background: #fef3c7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-size: .85rem;
}

.aviso-pub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: 1rem;
}
.aviso-pub-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .8rem;
    border-radius: 100px;
    font-size: .73rem;
    font-weight: 700;
}
.badge-aviso-pub   { background: #eff6ff; color: #1d4ed8; }
.badge-noticia-pub { background: #f5f3ff; color: #7c3aed; }
.badge-urgente-pub { background: #fef2f2; color: #dc2626; }

.aviso-pub-date {
    font-size: .74rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: .3rem;
}
.aviso-pub-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: #1e2d3d;
    line-height: 1.4;
    margin: 0 0 .7rem;
}
.aviso-pub-excerpt {
    font-size: .85rem;
    color: #64748b;
    line-height: 1.65;
    flex: 1;
    margin: 0 0 1.1rem;
}
.aviso-pub-link {
    font-size: .83rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-top: auto;
    transition: gap .2s;
}
.aviso-pub-link:hover { gap: .5rem; }

/* ── Contact social buttons ─────────────────── */
.contact-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s;
}
.contact-social-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.alert-no-encontrado .alert-icon {
    width: 44px;
    height: 44px;
    background: rgba(231,76,60,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #e74c3c;
    flex-shrink: 0;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 991.98px) {
    .hero-section { padding-top: 5rem; }
    .hero-visual { margin-top: 3rem; }
    .hero-stats { gap: 1.5rem; }
    .hero-stat-number { font-size: 1.5rem; }
    .about-badge-float { right: 0; bottom: -1rem; }
}

@media (max-width: 767.98px) {
    .hero-btns { flex-direction: column; }
    .btn-hero-primary, .btn-hero-secondary { justify-content: center; }
    .hero-stats { flex-wrap: wrap; gap: 1.2rem; }
    .cta-card { padding: 2.5rem 1.5rem; }
    .consulta-card-body { padding: 1.5rem; }
    .estado-tabs .nav-tabs { flex-wrap: nowrap; overflow-x: auto; }
    .tabla-pagos { min-width: 600px; }
    .tabla-pagos-wrapper { overflow-x: auto; }
}

/* 
   ERROR STATE CARDS  consulta/index
    */
.error-state-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    border-width: 1.5px;
    border-style: solid;
    animation: fadeInDown 0.3s ease;
}

.error-state-card .error-state-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
    padding-top: 2px;
}

.error-state-card .error-state-body {
    flex: 1;
}

.error-state-card .error-state-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.error-state-card .error-state-msg {
    font-size: 0.86rem;
    line-height: 1.5;
}

.error-state-card .error-state-tips {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    font-size: 0.8rem;
}

.error-state-card .error-state-tips li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.3rem;
    opacity: 0.85;
}

/* Not found */
.error-not-found {
    background: rgba(231, 76, 60, 0.05);
    border-color: rgba(231, 76, 60, 0.3);
}
.error-not-found .error-state-icon { color: #e74c3c; }
.error-not-found .error-state-title { color: #c0392b; }
.error-not-found .error-state-msg { color: #555; }
.error-not-found .error-state-tips { color: #777; }
.error-not-found .error-state-tips li i { color: #e74c3c; }

/* Sin conexion */
.error-conexion {
    background: rgba(243, 156, 18, 0.06);
    border-color: rgba(243, 156, 18, 0.35);
}
.error-conexion .error-state-icon { color: #f39c12; }
.error-conexion .error-state-title { color: #d68910; }
.error-conexion .error-state-msg { color: #555; }

/* Error general */
.error-general {
    background: rgba(52, 73, 94, 0.05);
    border-color: rgba(52, 73, 94, 0.2);
}
.error-general .error-state-icon { color: #7f8c8d; }
.error-general .error-state-title { color: #2c3e50; }
.error-general .error-state-msg { color: #555; }

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}


/* 
   DETALLE DE CUOTA  fila expandible en tabla pagos
    */
.detalle-row > td {
    background: #f4f9fd;
    padding: 0 !important;
    border-top: none !important;
}

.detalle-cuota-wrapper {
    margin: 0 0.75rem 0.9rem;
    border: 1px solid #bde0f7;
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.82rem;
    box-shadow: 0 2px 8px rgba(3,105,161,0.07);
}

/* Header del detalle */
.detalle-cuota-header {
    background: linear-gradient(135deg, #0369a1 0%, #0284c7 100%);
    color: #fff;
    padding: 0.7rem 1rem;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Tabla interior */
.detalle-cuota-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.detalle-cuota-table thead tr {
    background: #f0f9ff;
}

.detalle-cuota-table th {
    color: #0369a1;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.5rem 0.9rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 2px solid #bde0f7;
    white-space: nowrap;
}

.detalle-cuota-table td {
    padding: 0.55rem 0.9rem;
    color: #374151;
    border-bottom: 1px solid #e8f4fd;
    vertical-align: middle;
}

.detalle-cuota-table tbody tr:last-child td {
    border-bottom: none;
}

.detalle-cuota-table tbody tr:hover td {
    background: #f0f9ff;
}

/* Badge de porcentaje IVA */
.detalle-iva-badge {
    display: inline-block;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 4px;
    margin-right: 3px;
    vertical-align: middle;
}

/* Footer de totales */
.detalle-cuota-footer {
    background: #f8fbfe;
    border-top: 2px solid #bde0f7;
    padding: 0.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.detalle-total-row {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
    font-size: 0.82rem;
    color: #475569;
    width: 100%;
    max-width: 320px;
}

.detalle-total-label {
    flex: 1;
    text-align: right;
    color: #64748b;
}

.detalle-total-value {
    min-width: 80px;
    text-align: right;
    font-weight: 600;
    color: #374151;
}

.detalle-total-final {
    border-top: 1px dashed #bde0f7;
    padding-top: 0.35rem;
    margin-top: 0.1rem;
    font-size: 0.9rem;
}

.detalle-total-final .detalle-total-label {
    color: #0369a1;
    font-weight: 700;
}

.detalle-total-final .detalle-total-value {
    color: #0369a1;
    font-size: 1rem;
    font-weight: 800;
}

/* Botón toggle */
.detalle-toggle {
    font-size: 0.82rem;
    transition: color 0.2s ease;
    line-height: 1;
}

.detalle-toggle:hover {
    color: #0369a1 !important;
}

