/* Mejoras de Responsividad para HAG Noticias */

/* Variables CSS para consistencia */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --bg-color: #f8f9fa;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset y base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Contenedores responsivos */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Header y navegación */
.navbar {
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: var(--transition);
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-radius: var(--border-radius);
        margin-top: 1rem;
        padding: 1rem;
        box-shadow: var(--box-shadow);
    }
    
    .navbar-nav .nav-link {
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        margin-bottom: 0.5rem;
    }
}

/* Hero section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hero-buttons .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    min-width: 150px;
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        padding: 2rem 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
}

/* Cards y contenido */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
}

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

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.card-text {
    color: #666;
    margin-bottom: 1rem;
}

/* Botones */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

/* Grids responsivos */
.editions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

@media (max-width: 576px) {
    .editions-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem 0;
    }
}

/* Filtros y búsqueda */
.filters-section {
    background: var(--bg-color);
    padding: 2rem 0;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.search-input {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
}

.search-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    outline: none;
}

.filter-select {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    cursor: pointer;
}

.filter-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    outline: none;
}

/* Responsive utilities */
@media (max-width: 768px) {
    .d-md-flex {
        display: block !important;
    }
    
    .justify-content-md-between {
        justify-content: center !important;
    }
    
    .text-md-start {
        text-align: center !important;
    }
    
    .text-md-end {
        text-align: center !important;
        margin-top: 1rem;
    }
}

/* Espaciado responsivo */
.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

@media (max-width: 768px) {
    .py-5 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

.mb-4 {
    margin-bottom: 1.5rem;
}

@media (max-width: 576px) {
    .mb-4 {
        margin-bottom: 1rem;
    }
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: white;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Mejoras específicas para móviles */
@media (max-width: 576px) {
    /* Texto más legible en móviles */
    body {
        font-size: 16px;
        line-height: 1.5;
    }
    
    /* Botones más grandes para touch */
    .btn {
        min-height: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    /* Espaciado mejorado */
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Cards más compactas */
    .card-body {
        padding: 1rem;
    }
    
    /* Navegación móvil mejorada */
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
}

/* Mejoras para tablets */
@media (min-width: 577px) and (max-width: 991px) {
    .editions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

/* Mejoras para pantallas grandes */
@media (min-width: 1200px) {
    .editions-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .container-fluid {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states mejorados */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Mejoras de performance */
.card-img-top,
.hero-background {
    will-change: transform;
}

/* Print styles */
@media print {
    .navbar,
    .hero-buttons,
    .btn,
    .filters-section {
        display: none !important;
    }
    
    .card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

