/* =====================================================
   MUNICIPALIDAD PROVINCIAL DE SANTA CRUZ
   Archivo de estilos principal - estilos.css
   ===================================================== */

/* =====================================================
   VARIABLES CSS
   ===================================================== */
:root {
    /* Colores principales */
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #0891b2;
    --secondary-dark: #0e7490;
    
    /* Colores de texto */
    --text: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    
    /* Fondos */
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --bg-section: #f3f4f6;
    
    /* Bordes y sombras */
    --border: #e5e7eb;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-md: rgba(0, 0, 0, 0.15);
    --shadow-lg: rgba(0, 0, 0, 0.2);
    
    /* Espaciados */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 1.75rem;
    --spacing-xl: 2.5rem;
    --spacing-2xl: 3rem;
    
    /* Tipografía */
    --font-base: 16px;
    --line-height: 1.6;
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* =====================================================
   RESET Y CONFIGURACIÓN BASE
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-base);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: var(--line-height);
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

/* =====================================================
   BARRA SUPERIOR
   ===================================================== */
.top-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 0.875rem 0;
    font-size: 0.9375rem;
    box-shadow: 0 2px 4px var(--shadow);
}

.top-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.schedule {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 500;
}

.schedule svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

#current-date {
    font-weight: 500;
}

/* =====================================================
   HEADER Y NAVEGACIÓN
   ===================================================== */
header {
    background: white;
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-lg);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: var(--text);
    transition: transform var(--transition-normal);
}

.logo:hover {
    transform: scale(1.02);
}

.logo-img {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6px;
    box-shadow: 0 2px 8px var(--shadow);
}

.logo-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.logo-text p {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Navegación principal */
nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
    align-items: center;
}

nav > ul > li {
    position: relative;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: color var(--transition-normal);
    position: relative;
    padding: 0.5rem 0;
    letter-spacing: 0.025em;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

nav a:hover {
    color: var(--primary);
}

nav > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-normal);
}

nav > ul > li > a:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-icon {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-normal);
    margin-left: 2px;
}

.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 240px;
    padding: 0.75rem 0;
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    z-index: 1000;
    margin-top: 0.5rem;
    border: 1px solid var(--border);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover {
    background: var(--bg-alt);
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 1.75rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.75rem;
    cursor: pointer;
    color: var(--text);
    padding: 0.5rem;
    transition: color var(--transition-normal);
}

.menu-toggle:hover {
    color: var(--primary);
}

/* =====================================================
   SECCIÓN HERO
   ===================================================== */
.hero {
    background: linear-gradient(135deg, rgba(37, 100, 235, 0.568) 0%, rgba(8, 144, 178, 0.492) 100%),
                url('../img/FondoST.jpg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: white;
    padding: 8rem var(--spacing-md);
    text-align: center;
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.375rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s backwards;
    font-weight: 400;
    line-height: 1.5;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* =====================================================
   BOTONES
   ===================================================== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), background var(--transition-normal);
    animation: fadeInUp 0.8s ease 0.4s backwards;
    border: 2px solid white;
    cursor: pointer;
    text-align: center;
    letter-spacing: 0.025em;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    background: white;
    color: var(--primary);
}

.btn:active {
    transform: translateY(-1px);
}

/* =====================================================
   ENCABEZADOS DE SECCIÓN
   ===================================================== */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    padding-top: 0;
}

.section-header span {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    display: block;
    margin-bottom: var(--spacing-xs);
}

.section-header h2 {
    font-size: 2.75rem;
    margin-top: var(--spacing-xs);
    color: var(--text);
    font-weight: 800;
    line-height: 1.2;
}

/* =====================================================
   SECCIÓN DE NOTICIAS
   ===================================================== */
.news-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-xl);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.news-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    cursor: pointer;
    border: 1px solid var(--border);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px var(--shadow-md);
}

.news-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 4rem;
    font-weight: bold;
}

.news-content {
    padding: var(--spacing-md);
}

.news-date {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.news-title {
    font-size: 1.375rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text);
    font-weight: 700;
    line-height: 1.3;
}

.news-desc {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.7;
}

.more-news {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* =====================================================
   SECCIÓN DE RESOLUCIONES
   ===================================================== */
.resolutions-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-2xl) var(--spacing-md) var(--spacing-xl);
    background: var(--bg-section);
    border-radius: 20px;
}

.resolutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.resolution-card {
    background: white;
    border-radius: 16px;
    padding: var(--spacing-lg);
    box-shadow: 0 4px 12px var(--shadow);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    border-left: 5px solid var(--primary);
    border: 1px solid var(--border);
    border-left: 5px solid var(--primary);
}

.resolution-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 24px var(--shadow-md);
}

.resolution-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    box-shadow: 0 4px 8px var(--shadow);
}

.resolution-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.resolution-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.resolution-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-xs);
}

.resolution-type {
    background: var(--primary);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.resolution-number {
    color: var(--text-light);
    font-weight: 700;
    font-size: 0.9375rem;
    letter-spacing: 0.025em;
}

.resolution-title {
    font-size: 1.25rem;
    color: var(--text);
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: var(--spacing-xs);
}

.resolution-desc {
    color: var(--text-light);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.resolution-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-md);
    border-top: 2px solid var(--border);
    margin-top: var(--spacing-sm);
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.resolution-date {
    color: var(--text-light);
    font-size: 0.875rem;
    font-weight: 600;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    transition: background var(--transition-normal), transform var(--transition-fast);
    letter-spacing: 0.025em;
}

.btn-download:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-download svg {
    width: 18px;
    height: 18px;
}

.more-resolutions {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* =====================================================
   FOOTER
   ===================================================== */
footer {
    background: var(--text);
    color: white;
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    margin-bottom: var(--spacing-md);
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.footer-section p {
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9375rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color var(--transition-normal);
    font-size: 0.9375rem;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9375rem;
}

/* =====================================================
   ANIMACIONES
   ===================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* =====================================================
   RESPONSIVE DESIGN - TABLET
   ===================================================== */
@media (max-width: 1024px) {
    :root {
        --font-base: 15px;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.25rem;
    }
    
    .section-header h2 {
        font-size: 2.25rem;
    }
    
    nav ul {
        gap: var(--spacing-md);
    }
    
    nav a {
        font-size: 0.875rem;
    }
}

/* =====================================================
   RESPONSIVE DESIGN - MÓVIL
   ===================================================== */
@media (max-width: 768px) {
    :root {
        --font-base: 14px;
        --spacing-md: 1rem;
        --spacing-lg: 1.25rem;
        --spacing-xl: 1.75rem;
        --spacing-2xl: 2rem;
    }
    
    /* Navegación móvil */
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: 0 8px 16px var(--shadow-md);
        gap: 0;
        border-top: 1px solid var(--border);
    }

    nav ul.active {
        display: flex;
    }
    
    nav ul li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }
    
    nav ul li:last-child {
        border-bottom: none;
    }
    
    nav a {
        display: block;
        padding: var(--spacing-sm);
        font-size: 1rem;
    }

    .menu-toggle {
        display: block;
    }

    /* Hero responsive */
    .hero {
        padding: 4rem var(--spacing-md);
        min-height: 400px;
        background-attachment: scroll;
    }
    
    .hero h2 {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }

    .hero p {
        font-size: 1.125rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .btn {
        padding: 0.875rem 2rem;
        font-size: 0.9375rem;
    }

    /* Secciones responsive */
    .section-header {
        padding-top: var(--spacing-lg);
        margin-bottom: var(--spacing-lg);
    }
    
    .section-header h2 {
        font-size: 1.875rem;
    }

    /* Logo responsive */
    .logo-img {
        width: 52px;
        height: 52px;
    }
    
    .logo-text h1 {
        font-size: 1.125rem;
    }

    .logo-text p {
        font-size: 0.8125rem;
    }

    /* Grids responsive */
    .news-grid,
    .resolutions-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Cards responsive */
    .news-image {
        height: 180px;
        font-size: 3rem;
    }
    
    .news-title {
        font-size: 1.25rem;
    }
    
    .resolution-title {
        font-size: 1.125rem;
    }
    
    /* Footer responsive */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Top bar responsive */
    .top-bar-content {
        font-size: 0.875rem;
        justify-content: center;
        text-align: center;
    }
    
    .schedule {
        font-size: 0.8125rem;
    }
    
    #current-date {
        font-size: 0.8125rem;
    }
}

/* =====================================================
   RESPONSIVE DESIGN - MÓVIL PEQUEÑO
   ===================================================== */
@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.75rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-header h2 {
        font-size: 1.625rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
    
    .resolution-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .btn-download {
        width: 100%;
        justify-content: center;
    }
}