/**
 * Estilos para el Blog Frontend - Historia Galport
 */

/* ========================================
   VARIABLES CSS
   ======================================== */
:root {
    --primary-color: #813408;
    --secondary-color: #d4af37;
    --accent-color: #6b5b47;
    --background-color: #ffffff;
    --text-color: #2c3e50;
    --text-light: #6c757d;
    --border-color: #e9ecef;
    --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* ========================================
   RESET Y BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER
   ======================================== */
.blog-header {
    background: white;
    box-shadow: var(--shadow-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo i {
    font-size: 2rem;
}

.main-nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: 8px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(139, 115, 85, 0.1);
}

.header-right {
    display: flex;
    align-items: center;
}

.search-box {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 2px solid var(--border-color);
    border-radius: 25px;
    padding: 8px 16px;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.search-input {
    border: none;
    background: none;
    outline: none;
    padding: 0 12px;
    font-size: 0.95rem;
    min-width: 200px;
}

.search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* ========================================
   MAIN CONTENT
   ======================================== */
.blog-main {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* ========================================
   HERO SECTION
   ======================================== */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 0;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.stat-item i {
    font-size: 1.5rem;
    opacity: 0.8;
}

/* ========================================
   FILTERS
   ======================================== */
.blog-filters {
    background: white;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    margin-bottom: 40px;
}

.filters-content {
    display: flex;
    gap: 20px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
}

.filter-label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.filter-select {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: var(--transition);
    background: #f8f9fa;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.clear-filters-btn {
    padding: 12px 20px;
    background: var(--text-light);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.clear-filters-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* ========================================
   POSTS GRID
   ======================================== */
.blog-posts {
    margin-bottom: 60px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.post-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-heavy);
}

/* ========================================
   POST IMAGE
   ======================================== */
.post-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-image img {
    transform: scale(1.1);
}

.post-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #cbd5e0;
    font-size: 3rem;
}

.post-meta-overlay {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.post-date,
.post-views {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.6);
    padding: 6px 12px;
    border-radius: 20px;
}

/* ========================================
   POST CONTENT
   ======================================== */
.post-content {
    padding: 25px;
}

.post-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   POST FOOTER
   ======================================== */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.post-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.category-tag {
    background: rgba(139, 115, 85, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--secondary-color);
    transform: translateX(5px);
}

/* ========================================
   ARTICLE PAGE
   ======================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.breadcrumb-item {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb-item:hover {
    color: var(--secondary-color);
}

.breadcrumb-separator {
    color: var(--text-light);
}

.breadcrumb-current {
    color: var(--text-color);
    font-weight: 600;
}

.blog-article {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    padding: 40px;
    margin-bottom: 40px;
}

.article-header {
    margin-bottom: 30px;
    text-align: center;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.meta-item i {
    color: var(--primary-color);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--text-color);
}

.article-excerpt {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    font-style: italic;
}

.article-categories {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.article-featured-image {
    margin: 30px 0;
    text-align: center;
}

.article-featured-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 40px;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--primary-color);
    margin: 30px 0 15px 0;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content ul,
.article-content ol {
    margin: 20px 0;
    padding-left: 30px;
}

.article-content li {
    margin-bottom: 10px;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-light);
    background: rgba(139, 115, 85, 0.05);
    padding: 20px;
    border-radius: 0 8px 8px 0;
}

.article-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    margin-top: 30px;
}

.article-tags,
.article-share {
    margin-bottom: 20px;
}

.article-tags h4,
.article-share h4 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.tag-link {
    display: inline-block;
    background: rgba(139, 115, 85, 0.1);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 15px;
    text-decoration: none;
    margin: 0 8px 8px 0;
    font-size: 0.9rem;
    transition: var(--transition);
}

.tag-link:hover {
    background: var(--primary-color);
    color: white;
}

.share-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.1rem;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-facebook { background: #1877f2; }
.share-twitter { background: #1da1f2; }
.share-linkedin { background: #0077b5; }
.share-email { background: var(--primary-color); }

/* ========================================
   RELATED POSTS
   ======================================== */
.related-posts {
    margin-bottom: 40px;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 25px;
    text-align: center;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.related-post-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.related-post-image {
    height: 150px;
    overflow: hidden;
    background: #f8f9fa;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #cbd5e0;
    font-size: 2rem;
}

.related-post-content {
    padding: 20px;
}

.related-post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.3;
}

.related-post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.related-post-title a:hover {
    color: var(--primary-color);
}

.related-post-excerpt {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.related-post-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ========================================
   COMMENTS SECTION
   ======================================== */
.comments-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    padding: 30px;
    margin-bottom: 40px;
}

.comments-placeholder {
    text-align: center;
    color: var(--text-light);
    font-style: italic;
}

/* ========================================
   NEWSLETTER
   ======================================== */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 50px 0;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    text-align: center;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-text h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.newsletter-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.newsletter-input {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
}

.newsletter-btn {
    padding: 15px 30px;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

/* ========================================
   FOOTER
   ======================================== */
.blog-footer {
    background: #2c3e50;
    color: white;
    padding: 50px 0 20px;
}

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

.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.9;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    opacity: 1;
}

.footer-email {
    color: var(--secondary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.footer-email:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 20px;
    text-align: center;
    opacity: 0.8;
}

/* ========================================
   ERROR PAGE
   ======================================== */
.error-section {
    text-align: center;
    padding: 80px 20px;
}

.error-icon {
    font-size: 5rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.error-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 20px;
}

.error-message {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.error-help {
    max-width: 500px;
    margin: 0 auto;
    text-align: left;
}

.error-help h3 {
    color: var(--text-color);
    margin-bottom: 15px;
}

.error-help ul {
    list-style: none;
    padding: 0;
}

.error-help li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.error-help li:last-child {
    border-bottom: none;
}

.error-help a {
    color: var(--primary-color);
    text-decoration: none;
}

.error-help a:hover {
    color: var(--secondary-color);
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

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

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
}

.empty-icon {
    font-size: 4rem;
    color: #cbd5e0;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* ========================================
   LOAD MORE
   ======================================== */
.load-more-container {
    text-align: center;
    margin-top: 40px;
}

.load-more-btn {
    padding: 15px 30px;
    font-size: 1.1rem;
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        padding: 20px 0;
    }
    
    .header-left {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .main-nav {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .search-box {
        width: 100%;
        max-width: 300px;
    }
    
    .search-input {
        min-width: auto;
        flex: 1;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .filters-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .filter-group {
        min-width: 100%;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-article {
        padding: 25px;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
        align-items: center;
    }
    
    .newsletter-input {
        min-width: 100%;
        max-width: 300px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .error-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .post-content {
        padding: 20px;
    }
    
    .post-title {
        font-size: 1.2rem;
    }
    
    .article-title {
        font-size: 1.8rem;
    }
    
    .blog-article {
        padding: 20px;
    }
    
    .share-buttons {
        justify-content: center;
    }
    
    .share-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

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

.post-card {
    animation: fadeInUp 0.6s ease-out;
}

.post-card:nth-child(1) { animation-delay: 0.1s; }
.post-card:nth-child(2) { animation-delay: 0.2s; }
.post-card:nth-child(3) { animation-delay: 0.3s; }
.post-card:nth-child(4) { animation-delay: 0.4s; }
.post-card:nth-child(5) { animation-delay: 0.5s; }
.post-card:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   UTILIDADES
   ======================================== */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}
