/* styles.css - Estilos principales de La Quisqueyana */

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #013570;
    --secondary-color: #CE1126;
    --accent-color: #F7D708;
    --text-color: #333;
    --light-gray: #f5f5f5;
    --border-color: #ddd;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fafafa;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.wrap {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
    width: 100%;
}

header .wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#logo {
    background-color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

#logo:hover {
    transform: scale(1.05);
}

#logo h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    letter-spacing: -1px;
    margin: 0;
}

/* Desktop Menu */
nav#menu ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

nav#menu ul li a {
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    display: block;
}

nav#menu ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav#menu ul li a:hover::before {
    width: 100%;
}

nav#menu ul li a.active {
    background: rgba(255,255,255,0.1);
}

nav#menu ul li a.active::before {
    width: 100%;
}

/* Mobile Menu Button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Menu toggle animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: var(--primary-color);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0,0,0,0.2);
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-header h2 {
    color: white;
    font-size: 1.2rem;
    margin: 0;
}

.mobile-menu nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu nav ul li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-menu nav ul li a {
    display: block;
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.mobile-menu nav ul li a:hover,
.mobile-menu nav ul li a:active {
    background: rgba(255,255,255,0.1);
    padding-left: 2rem;
}

.mobile-menu nav ul li a.active {
    background: rgba(255,255,255,0.2);
    border-left: 4px solid var(--accent-color);
}

/* Search Section - Separada del header */
.search-section {
    background: #f8f9fa;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    background: white;
    border-radius: 30px;
    padding: 0.5rem 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

.search-box:focus-within {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0.5rem;
    color: var(--text-color);
}

.search-box input::placeholder {
    color: #999;
}

.search-box button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.search-box button:hover {
    background: #024694;
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(1,53,112,0.3);
}

/* Search Results Info */
#searchResultsInfo {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: none;
}

#searchResultsInfo p {
    margin: 0;
    color: #666;
}

.btn-clear-search {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    margin-left: 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-clear-search:hover {
    background: #a00f1f;
    transform: translateY(-2px);
}

/* Search Highlight */
.search-highlight {
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 0 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Category Filter Active State */
.category-filter.active {
    background: var(--secondary-color) !important;
    color: white !important;
    border-color: var(--secondary-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(206,17,38,0.3);
}

/* Category Results Count */
#categoryResultsCount {
    background: #e8f4fd;
    color: var(--primary-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    display: none;
}

/* No Results Message */
.no-results-message {
    grid-column: 1 / -1;
}

/* Search Match Animation */
.search-match {
    animation: highlightMatch 0.5s ease;
}

@keyframes highlightMatch {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Section Tags */
.section-tag {
    display: inline-block;
    background: var(--secondary-color);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-tag.mundo {
    background: #28a745;
}

.section-tag.servicios {
    background: #17a2b8;
}

.section-tag.sabor {
    background: #ff6b6b;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #024694 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

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

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

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

/* Page Header - for internal pages */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #024694 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.breadcrumb a {
    color: white;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 0.7;
}

/* Main Content */
main {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    margin-top: 1rem;
}

/* Articles Section */
main section {
    flex: 1;
}

.featured-article {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-article:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.featured-article img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.featured-content {
    padding: 2rem;
}

.featured-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

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

article.article-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.article-content {
    padding: 1.5rem;
}

.article-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    line-height: 1.4;
}

.article-content p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.category-tag {
    display: inline-block;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Sidebar */
aside {
    width: 350px;
}

.sidebar-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.sidebar-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.trending-list {
    list-style: none;
}

.trending-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.3s ease;
}

.trending-list li:last-child {
    border-bottom: none;
}

.trending-list li:hover {
    background: var(--light-gray);
    margin: 0 -1.5rem;
    padding: 1rem 1.5rem;
}

.trending-list a {
    display: block;
    color: var(--text-color);
}

.trending-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-right: 1rem;
    float: left;
}

.newsletter {
    background: linear-gradient(135deg, var(--primary-color), #024694);
    color: white;
    text-align: center;
}

.newsletter input {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 5px;
    margin: 1rem 0;
    font-size: 1rem;
}

.newsletter button {
    width: 100%;
    padding: 0.75rem;
    background: var(--accent-color);
    color: var(--primary-color);
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter button:hover {
    background: #e6c707;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

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

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

.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

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

.footer-section ul li a {
    color: white;
    opacity: 0.8;
}

.footer-section ul li a:hover {
    opacity: 1;
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    opacity: 0.8;
}

/* Service Cards */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.service-card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

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

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

.btn-primary {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
    cursor: pointer;
}

.btn-primary:hover {
    background: #024694;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 1024px) {
    nav#menu ul li a {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
    
    #logo h1 {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .wrap {
        width: 100%;
        padding: 0 15px;
    }
    
    /* Hide desktop menu and show mobile menu button */
    nav#menu {
        display: none;
    }
    
    .menu-toggle {
        display: block;
    }
    
    #logo h1 {
        font-size: 1.3rem;
    }
    
    /* Search section responsive */
    .search-section {
        padding: 1rem 0;
    }
    
    .search-box {
        margin: 0 15px;
        padding: 0.4rem 1rem;
    }
    
    .search-box input {
        font-size: 0.9rem;
    }
    
    .search-box button {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    
    main {
        flex-direction: column;
    }
    
    aside {
        width: 100%;
    }
    
    .hero h2, .page-header h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-article img {
        height: 250px;
    }
    
    .featured-content {
        padding: 1.5rem;
    }
    
    .featured-content h3 {
        font-size: 1.5rem;
    }
    
    .article-meta {
        flex-wrap: wrap;
        font-size: 0.85rem;
    }
    
    .trending-number {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .service-grid {
        grid-template-columns: 1fr;
    }
    
    #searchResultsInfo {
        font-size: 0.9rem;
    }
    
    .btn-clear-search {
        display: block;
        width: 100%;
        margin: 0.5rem 0 0 0;
    }
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

.section-divider {
    height: 1px;
    background: var(--border-color);
    margin: 3rem 0;
}

/* Animation classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Botones de compartir */
.share-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-share {
    background: #1da1f2;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.btn-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.btn-share.facebook {
    background: #1877f2;
}

.btn-share.whatsapp {
    background: #25D366;
}

.btn-share.copy {
    background: #6c757d;
}

/* Lazy loading */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

img.lazy.loaded {
    opacity: 1;
}

/* Placeholder mientras carga */
img.lazy:not(.loaded) {
    background: #f0f0f0;
    min-height: 200px;
}

/* Botón scroll to top */
#scrollToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#scrollToTop:hover {
    background: #024694;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

#scrollToTop.visible {
    opacity: 1;
    visibility: visible;
}
.articles-grid[data-news-latest] {
  display: grid;
}
.articles-grid[data-news-latest] {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}
