/* Reset y Variables CSS */
:root {
    --primary-color: #2d5a27;
    --secondary-color: #4a7c59;
    --accent-color: #7fb069;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --background-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

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

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

/* Header y Navegación */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: 100vh;
    padding: 100px 20px 50px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 4rem;
}

.hero-content {
    padding-right: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 30px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

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

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
}

/* Introducción */
.intro {
    padding: 80px 0;
    background: var(--background-light);
}

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

.intro h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 700;
}

.intro p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

.intro-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.stat h3 {
    font-size: 3rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--text-light);
    font-weight: 500;
    margin: 0;
}

/* Categorías */
.categories {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

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

.category-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

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

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

.card-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.card-overlay i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.card-content {
    padding: 2rem;
}

.card-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.card-content > p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-topics {
    list-style: none;
    margin-bottom: 2rem;
}

.card-topics li {
    color: var(--text-light);
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 1.5rem;
}

.card-topics li:before {
    content: '•';
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.card-btn {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 12px 24px;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    width: 100%;
    text-align: center;
}

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

/* Sobre Nosotros */
.about {
    padding: 80px 0;
    background: var(--background-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 700;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1.1rem;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-hover);
}

.feature i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.feature p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 60px 0 20px;
}

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

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

.footer-section p,
.footer-section li {
    color: #bbb;
    line-height: 1.6;
}

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

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

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

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #bbb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 120px 20px 50px;
    }

    .hero-content {
        padding-right: 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

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

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .intro-stats {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-header h2,
    .intro h2,
    .about-text h2 {
        font-size: 2rem;
    }

    .card-content {
        padding: 1.5rem;
    }

    .feature {
        padding: 1.5rem;
    }
}

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

.category-card {
    animation: fadeInUp 0.6s ease forwards;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }

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



/* Estilos para páginas de categorías */
.category-hero {
    position: relative;
    height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: 70px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(45, 90, 39, 0.8), rgba(127, 176, 105, 0.6));
    z-index: 2;
}

.category-hero .hero-content {
    position: relative;
    z-index: 3;
    color: var(--white);
    width: 100%;
}

.category-hero .hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.category-hero .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.breadcrumb {
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--white);
}

.category-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.category-hero p {
    font-size: 1.3rem;
    max-width: 600px;
    line-height: 1.6;
    opacity: 0.9;
}

/* Sección de artículos */
.articles-section {
    padding: 80px 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.featured-article {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.featured-article:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

.featured-article .article-image {
    height: 300px;
    overflow: hidden;
}

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

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

.featured-article .article-content {
    padding: 2rem;
}

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

.article-meta .category {
    background: var(--accent-color);
    color: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 500;
}

.article-meta .date {
    color: var(--text-light);
}

.featured-article h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.featured-article p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.read-more:hover {
    color: var(--secondary-color);
}

.read-more::after {
    content: ' →';
    transition: var(--transition);
}

.read-more:hover::after {
    transform: translateX(5px);
}

/* Artículos secundarios */
.secondary-articles {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.article-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.article-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.article-card .card-image {
    height: 150px;
    overflow: hidden;
}

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

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

.article-card .card-content {
    padding: 1.5rem;
}

.article-card h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
}

.article-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Temas relacionados */
.related-topics {
    background: var(--background-light);
    padding: 3rem;
    border-radius: var(--border-radius);
    margin-top: 4rem;
}

.related-topics h3 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 600;
}

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

.topic-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.topic-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.topic-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.topic-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Responsive para páginas de categorías */
@media (max-width: 768px) {
    .category-hero h1 {
        font-size: 2.5rem;
    }
    
    .category-hero p {
        font-size: 1.1rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .secondary-articles {
        gap: 1.5rem;
    }
    
    .topics-grid {
        grid-template-columns: 1fr;
    }
    
    .related-topics {
        padding: 2rem;
    }
}

/* Mejoras adicionales para el diseño */
.nav-logo a {
    text-decoration: none;
    color: inherit;
}

/* Animaciones mejoradas */
@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.featured-article {
    animation: slideInFromLeft 0.8s ease forwards;
}

.secondary-articles {
    animation: slideInFromRight 0.8s ease forwards;
}

.topic-card:nth-child(1) { animation-delay: 0.1s; }
.topic-card:nth-child(2) { animation-delay: 0.2s; }
.topic-card:nth-child(3) { animation-delay: 0.3s; }

.logo-img {
    height: 100px;  /* Ajusta el tamaño */
    width: auto;   /* Mantiene la proporción */
}

.nav-logo {
    display: flex;
    align-items: center;
}

.no-line {
    text-decoration: none;
}