:root {
    --primary: #FFB300;
    --primary-light: #FFC107;
    --primary-dark: #cc9000;
    --accent: #002B5B;
    --text: #1a1a1a;
    --text-light: #666666;
    --white: #ffffff;
    --bg: #ffffff;
    --bg-alt: #fcfcfc;
    --border: #eeeeee;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container: 1600px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background-color: var(--bg-alt);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header & Branding */
header {
    background: #fff;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: flex-start;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--border);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.vertical-sep {
    width: 2px;
    height: 40px;
    background: var(--border);
}

.brand-text h1 {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text);
    line-height: 1;
}

.brand-text p {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* Hanging Badge */
.municipality-badge {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 12px 60px;
    border-radius: 0 0 16px 16px;
    font-weight: 800;
    letter-spacing: 5px;
    font-size: 1.05rem;
    box-shadow: 0 4px 10px rgba(255, 179, 0, 0.3);
    white-space: nowrap;
    z-index: 10;
    transition: var(--transition);
    cursor: default;
}

.municipality-badge:hover {
    background: var(--primary-dark);
    box-shadow: 0 8px 25px rgba(255, 179, 0, 0.8), 0 0 15px rgba(255, 179, 0, 0.5);
    transform: translateX(-50%) translateY(4px);
}

/* Hero Section */
.hero {
    padding: 8rem 2rem 3rem;
    text-align: center;
    background: #fff;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: #333;
    line-height: 1.25;
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.highlight-promaq {
    color: #D4AF37;
    /* Adjusted to a more golden orange if needed, but keeping primary dark for now */
    color: var(--primary-dark);
    font-weight: 800;
}

.ministerio-box {
    margin-bottom: 2.5rem;
}

.highlight-ministerio {
    display: inline-block;
    background: var(--primary);
    color: #000;
    padding: 1rem 3.5rem;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 179, 0, 0.3);
    border: 2px solid var(--primary-dark);
}

.hero-subtitle {
    font-size: 1rem;
    color: #777;
    margin: 0 auto 3rem;
    max-width: 900px;
    line-height: 1.6;
}

.hero-pleitos {
    padding: 2rem 2rem 1rem 2rem;
    text-align: left;
}

.hero-pleitos .hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-pleitos .hero-subtitle {
    margin: 0 0 2rem 0;
    max-width: 100%;
    color: #666;
}

/* Search Bar */
.search-container {
    max-width: 100%;
    margin: 0;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    padding: 1rem 2rem;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.search-box:focus-within {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 8px 25px rgba(255, 179, 0, 0.15);
    transform: translateY(-2px);
}

.search-icon {
    color: var(--primary-dark);
    margin-right: 15px;
    width: 24px;
    height: 24px;
}

#equipment-search, #pleito-search {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 1.1rem;
    outline: none;
    color: var(--text);
    font-weight: 500;
}

.container {
    max-width: 100%;
    padding: 0 2rem;
    margin: 0;
}

/* Accordion Styles */
.accordion-container {
    max-width: 100%;
    margin: 0 0 4rem 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.accordion-item {
    background: #ffffff;
    border: 2px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    transition: var(--transition);
}

.accordion-item:hover {
    border-color: var(--primary-light);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.accordion-header {
    background: var(--primary);
    color: #1a1a1a;
    padding: 1.2rem 1.5rem;
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: uppercase;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.accordion-header:hover {
    background: var(--primary-light);
}

.accordion-icon {
    transition: transform 0.3s ease;
    color: #1a1a1a;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: #fbfbfb;
}

.accordion-content.active {
    max-height: 2000px; /* arbitrary large value */
    transition: max-height 0.6s ease-in;
}

.pleito-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pleito-list li {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid #eeeeee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.pleito-list li:last-child {
    border-bottom: none;
}

.pleito-num {
    font-weight: 800;
    color: var(--primary-dark);
    font-size: 1.1rem;
    min-width: 30px;
}

.pleito-text {
    font-weight: 600;
    color: #333;
    flex: 1;
    font-size: 1.05rem;
    line-height: 1.4;
}

.pleito-value {
    background: #ffeeb3;
    padding: 6px 14px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.95rem;
    color: #000;
    white-space: nowrap;
    border: 1px solid var(--primary-light);
}

/* CTA Section (Bottom Button) */
.cta-section {
    text-align: center;
    margin: 4rem 0 6rem;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    background: var(--primary);
    color: #000;
    text-decoration: none;
    padding: 1.2rem 2.5rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(255, 179, 0, 0.2);
}

.btn-cta:hover {
    background: var(--primary-dark);
    transform: scale(1.02);
}

/* Footer */
footer {
    background: #fff;
    padding: 3rem 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer p {
    color: #444;
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.footer-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.footer-logo-img {
    height: 50px;
    opacity: 0.8;
}

.footer-wa-circle {
    position: relative;
    width: 60px;
    height: 60px;
}

.wa-photo-badge {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FFD700;
    padding: 2px;
    background: #fff;
}

.wa-icon-mini {
    position: absolute;
    bottom: 0;
    right: 0;
    background: #25D366;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.wa-icon-mini svg {
    fill: #fff;
}

/* Floating Nav */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: #000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex; /* Always flex but hidden by opacity */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 179, 0, 0.3);
    border: 2px solid var(--primary-dark);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#scroll-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#scroll-to-top:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 179, 0, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        justify-content: center;
    }

    .brand-wrapper {
        flex-direction: column;
        justify-content: center;
        gap: 0.3rem;
    }

    .vertical-sep {
        display: none;
    }

    .brand-text {
        text-align: center;
    }

    .brand-text p {
        display: block;
        font-size: 0.7rem;
        margin-top: 0;
        max-width: 300px;
        line-height: 1.2;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .highlight-ministerio {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }

    .hero {
        padding: 6rem 1rem 3rem;
    }

    .municipality-badge {
        padding: 8px 15px;
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .card {
        border: 2px solid var(--primary-dark);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        margin-bottom: 2rem;
    }

    .btn-cta {
        font-size: 0.9rem;
        padding: 1rem 1.2rem;
        white-space: nowrap;
        width: 100%;
        justify-content: center;
    }

    footer {
        padding: 2rem 1rem;
    }

    footer p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
        white-space: nowrap;
    }

    .footer-logo-img {
        height: 40px;
    }

    .footer-wa-circle {
        width: 50px;
        height: 50px;
    }

    .footer-row {
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    header {
        justify-content: center;
        padding: 1rem 15px !important;
    }
}

/* Specific Mobile Overrides for Pleitos layout */
@media (max-width: 768px) {
    .container {
        padding: 0 1.2rem;
    }

    .hero-pleitos {
        text-align: center;
        padding: 2rem 1rem 1rem 1rem;
    }

    .hero-pleitos .hero-title {
        font-size: 1.8rem;
    }

    .hero-pleitos .hero-title .highlight-promaq {
        display: block;
        margin-top: 0.2rem;
        font-size: 2.2rem;
    }

    .hero-pleitos .hero-subtitle {
        font-size: 0.95rem;
    }

    .accordion-header {
        font-size: 0.95rem;
        padding: 1rem 1.2rem;
    }

    .pleito-list li {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0.2rem 1rem;
        padding: 1rem 1.2rem;
        align-items: start;
    }

    .pleito-num {
        grid-column: 1;
        grid-row: 1;
        margin-top: 2px;
    }

    .pleito-text {
        grid-column: 2;
        grid-row: 1;
        font-size: 0.95rem;
    }

    .pleito-value {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
        margin-top: 0.5rem;
        font-size: 0.85rem;
        padding: 4px 10px;
    }
}