/* ===== RESET Y VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary: #1e4d2c;      /* Verde oscuro institucional */
    --secondary: #2e7d32;     /* Verde medio */
    --accent: #d32f2f;        /* Rojo para decretos */
    --light: #e8f5e9;         /* Verde muy claro */
    --dark: #1b5e20;          /* Verde más oscuro */
    --success: #2e7d32;       /* Verde éxito */
    --warning: #f57c00;       /* Naranja para ordenanzas */
    --text-gray: #546e7a;
}

body {
    background-color: #f1f8e9;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== NAVBAR MODERNA ===== */
.navbar {
    background-color: var(--primary);
    padding: 0.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo span {
    color: white;
    font-weight: 600;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s;
}

.nav-links a:hover {
    background: rgba(255,255,255,0.1);
    color: #a5d6a7;
}

/* Dropdown moderno */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background-color: transparent;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 5px;
    border-radius: 5px;
    transition: background 0.3s;
}

.dropbtn:hover {
    background: rgba(255,255,255,0.1);
}

.dropbtn i {
    font-size: 0.8rem;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-content form {
    margin: 0;
    padding: 0;
}

.dropdown-content input[type="submit"] {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid #eee;
}

.dropdown-content input[type="submit"]:hover {
    background-color: var(--light);
    color: var(--secondary);
    padding-left: 20px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Menú hamburguesa */
.hamburger {
    display: none;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, #1e4d2c 0%, #2e7d32 100%);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    flex: 1;
}

#bulletin-subtitle {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
}

/* ===== AUTORIDADES ===== */
.authorities {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
}

.authorities h2 {
    color: var(--dark);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

.authority-card {
    padding: 1.5rem;
    border-radius: 8px;
    transition: transform 0.3s;
}

.authority-card:hover {
    transform: translateY(-5px);
    background: var(--light);
}

.authority-card h3 {
    color: var(--secondary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.authority-card p {
    color: var(--dark);
    font-weight: 500;
    font-size: 1.2rem;
}

/* ===== PESTAÑAS ===== */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--light);
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.tab {
    padding: 12px 25px;
    background: white;
    border: none;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.02);
}

.tab i {
    font-size: 1.2rem;
}

.tab:hover {
    background: var(--light);
    color: var(--dark);
}

.tab.active {
    background: var(--secondary);
    color: white;
    box-shadow: 0 4px 10px rgba(46, 125, 50, 0.2);
}

.tab .count {
    background: rgba(255,255,255,0.2);
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-left: 5px;
}

.tab.active .count {
    background: rgba(255,255,255,0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== TARJETAS DE DOCUMENTOS ===== */
.section-title {
    font-size: 1.5rem;
    color: var(--dark);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid transparent;
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.card.decreto {
    border-left-color: var(--accent);
}

.card.ordenanza {
    border-left-color: var(--warning);
}

.card.resolucion {
    border-left-color: var(--secondary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.card-number {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dark);
}

.card-badge {
    background: var(--light);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-gray);
}

.card-date {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-tema {
    color: var(--dark);
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.card-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: #e8f5e9;
    color: var(--secondary);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===== VISOR PDF ===== */
.pdf-viewer {
    margin: 2rem 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.pdf-frame {
    width: 100%;
    height: 600px;
    border: none;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
}

.footer .gestion {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ffd700;
    margin-top: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
    }
    
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        background: var(--primary);
        padding: 1rem 0;
        gap: 0.5rem;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .dropdown {
        width: 100%;
    }
    
    .dropbtn {
        width: 100%;
        justify-content: space-between;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        background: rgba(255,255,255,0.1);
        margin-top: 0.5rem;
        max-height: none;
    }

    .dropdown-content input[type="submit"] {
        color: white;
        border-bottom-color: rgba(255,255,255,0.2);
    }

    .dropdown-content input[type="submit"]:hover {
        background: rgba(255,255,255,0.15);
        color: white;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-direction: column;
        gap: 5px;
    }

    .tab {
        width: 100%;
        justify-content: center;
    }
    
    .pdf-frame {
        height: 400px;
    }
}
