:root {
    --primary-color: #2c3e2d; /* Verde bosque profundo */
    --secondary-color: #3d4f3e; /* Verde musgo */
    --tertiary-color: #4a5f4b; /* Verde sage */
    --text-color: #f4f7f4; /* Blanco natural */
    --accent-color: #7fb069; /* Verde natural suave */
    --earth-brown: #8b7355; /* Marrón tierra */
    --sky-blue: #a8d5ba; /* Azul cielo suave */
    --leaf-green: #6b8e5a; /* Verde hoja */
    --warm-beige: #f0ead2; /* Beige cálido */
    --font-family: 'Montserrat', sans-serif;
    --transition: all 0.3s ease;
}

/* Dark Mode Variables */
[data-theme='dark'] {
    --primary-color: #1a1a1a;
    --secondary-color: #2d2d2d;
    --tertiary-color: #3a3a3a;
    --text-color: #e0e0e0;
    --accent-color: #5a9e4a;
    --earth-brown: #6d5d45;
    --sky-blue: #6b9d82;
    --leaf-green: #4a6e3a;
    --warm-beige: #d4cdb3;
}

body {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--tertiary-color) 100%);
    color: var(--text-color);
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    line-height: 1.7;
    min-height: 100vh;
}

header {
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--tertiary-color) 100%);
    padding: 1.2rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(44, 62, 45, 0.3);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--accent-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo {
    height: 110px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    transition: var(--transition);
}

.nav-logo:hover {
    transform: scale(1.05);
}

nav h1 {
    margin: 0;
    font-size: 1.9rem;
    color: var(--accent-color);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
}


nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 1rem;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

nav ul li a:hover {
    color: var(--primary-color);
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 176, 105, 0.3);
}

.admin-link {
    background: linear-gradient(135deg, var(--earth-brown) 0%, var(--accent-color) 100%) !important;
    color: var(--text-color) !important;
    padding: 0.7rem 1.5rem !important;
    border-radius: 25px !important;
    font-weight: 600 !important;
    transition: var(--transition) !important;
    border: 2px solid transparent;
}

.admin-link:hover {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--leaf-green) 100%) !important;
    color: var(--primary-color) !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 20px rgba(127, 176, 105, 0.4) !important;
    border-color: var(--warm-beige) !important;
}

.active-page {
    background: linear-gradient(135deg, var(--accent-color), var(--leaf-green)) !important;
    color: var(--primary-color) !important;
    box-shadow: 0 4px 15px rgba(127, 176, 105, 0.3) !important;
    border: 2px solid var(--warm-beige) !important;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.3rem;
    backdrop-filter: blur(5px);
}

.dark-mode-toggle:hover {
    background: var(--accent-color);
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 4px 15px rgba(127, 176, 105, 0.4);
}

main {
    padding: 1rem 2rem 2rem;
}

section {
    padding: 5rem 2rem;
    margin: 2rem 0;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(127, 176, 105, 0.2);
    transition: var(--transition);
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(127, 176, 105, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

section:last-child {
    border-bottom: none;
}

h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 3rem;
    color: var(--accent-color);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--sky-blue));
    border-radius: 2px;
}

.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 85vh;
    text-align: center;
    background: linear-gradient(rgba(44, 62, 45, 0.7), rgba(61, 79, 62, 0.5)), url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?q=80&w=2070&auto=format&fit=crop') no-repeat center center/cover;
    position: relative;
    border-radius: 25px;
    margin: 2rem 0;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 0%, rgba(127, 176, 105, 0.1) 50%, transparent 100%);
    z-index: 1;
}

.clima-widget {
    background: linear-gradient(145deg, rgba(61, 79, 62, 0.9), rgba(74, 95, 75, 0.8));
    padding: 3rem 4rem;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 15px 35px rgba(44, 62, 45, 0.4);
    border: 2px solid rgba(127, 176, 105, 0.3);
    backdrop-filter: blur(15px);
    position: relative;
    transition: var(--transition);
}

.clima-widget::before {
    content: '🌱';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    opacity: 0.6;
}

.clima-widget:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 45px rgba(44, 62, 45, 0.5);
}

#temperatura {
    font-size: 4.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--accent-color);
    text-shadow: 0 3px 6px rgba(0,0,0,0.3);
    display: block;
}

#estado-cielo {
    font-size: 1.8rem;
    margin-top: 1rem;
    color: var(--sky-blue);
    font-weight: 500;
    text-transform: capitalize;
}

.clima-widget h2 {
    color: var(--warm-beige);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.clima-widget h2::after {
    background: linear-gradient(90deg, var(--warm-beige), var(--accent-color));
}

.environmental-indicator {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(127, 176, 105, 0.2);
    border-radius: 10px;
    border-left: 4px solid var(--accent-color);
    font-size: 0.9rem;
    color: var(--warm-beige);
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.card {
    background: linear-gradient(145deg, var(--secondary-color), var(--tertiary-color));
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(44, 62, 45, 0.3);
    transition: var(--transition);
    border: 2px solid rgba(127, 176, 105, 0.2);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--sky-blue), var(--leaf-green));
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(127, 176, 105, 0.25);
    border-color: var(--accent-color);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
    font-size: 1.5rem;
    font-weight: 600;
    position: relative;
}

.card p {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1.1rem;
}

.news-item {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--tertiary-color) 100%);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-left: 6px solid var(--accent-color);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(44, 62, 45, 0.2);
    transition: var(--transition);
    position: relative;
}

.news-item::before {
    content: '🍃';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.2rem;
    opacity: 0.6;
}

.news-item:hover {
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(127, 176, 105, 0.2);
    border-left-color: var(--sky-blue);
}

.news-item p {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.6;
}

footer {
    text-align: center;
    padding: 3rem 2rem 2rem;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    margin-top: 4rem;
    border-top: 3px solid var(--accent-color);
    position: relative;
}

footer::before {
    content: '🌍';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    padding: 0.5rem;
    border-radius: 50%;
    font-size: 1.5rem;
    border: 3px solid var(--accent-color);
}

footer p {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
    opacity: 0.9;
}

/* History Page Styles */
.history-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: linear-gradient(145deg, rgba(61, 79, 62, 0.9), rgba(74, 95, 75, 0.8));
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(44, 62, 45, 0.3);
    border: 2px solid rgba(127, 176, 105, 0.2);
}

.prose {
    line-height: 1.8;
    color: var(--text-color);
}

.prose h2 {
    color: var(--accent-color);
    font-size: 2.2rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    text-align: left;
    border-bottom: 3px solid var(--accent-color);
    padding-bottom: 0.5rem;
    position: relative;
}

.prose h2::after {
    display: none; /* Remove the centered underline for history headers */
}

.prose h2:first-of-type {
    margin-top: 0;
}

.prose h3 {
    color: var(--sky-blue);
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.prose p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    text-align: justify;
    text-indent: 2rem;
}

.prose p:first-letter {
    font-size: 3.5rem;
    font-weight: 700;
    float: left;
    line-height: 1;
    margin: 0.1rem 0.7rem 0 0;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.history-quote {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-left: 6px solid var(--accent-color);
    padding: 2rem;
    margin: 3rem 0;
    border-radius: 15px;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--sky-blue);
    text-align: center;
    box-shadow: 0 8px 25px rgba(44, 62, 45, 0.3);
    position: relative;
}

.history-quote::before {
    content: '"';
    font-size: 4rem;
    color: var(--accent-color);
    position: absolute;
    top: -10px;
    left: 20px;
    font-family: Georgia, serif;
}

.history-quote::after {
    content: '"';
    font-size: 4rem;
    color: var(--accent-color);
    position: absolute;
    bottom: -30px;
    right: 20px;
    font-family: Georgia, serif;
}

.timeline {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 80px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--accent-color), var(--sky-blue));
    border-radius: 2px;
}

.timeline li {
    margin-bottom: 1.5rem;
    padding-left: 120px;
    position: relative;
    font-size: 1.1rem;
}

.timeline li span {
    position: absolute;
    left: 0;
    top: 0;
    background: linear-gradient(135deg, var(--accent-color), var(--leaf-green));
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(127, 176, 105, 0.3);
    min-width: 60px;
    text-align: center;
}

.timeline li::before {
    content: '🌟';
    position: absolute;
    left: 70px;
    top: 5px;
    font-size: 1.2rem;
    background: var(--primary-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--accent-color);
}

/* AI Chat Styles */
.ai-chat-container {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(145deg, rgba(61, 79, 62, 0.95), rgba(74, 95, 75, 0.9));
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 15px 35px rgba(44, 62, 45, 0.3);
    border: 2px solid rgba(127, 176, 105, 0.3);
    backdrop-filter: blur(15px);
}

.ai-description {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(127, 176, 105, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(127, 176, 105, 0.2);
}

.ai-description p {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.6;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(44, 62, 45, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(127, 176, 105, 0.2);
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) rgba(255, 255, 255, 0.1);
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--leaf-green);
}

.message {
    display: flex;
    margin-bottom: 1.5rem;
    animation: slideInUp 0.3s ease-out;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--leaf-green));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 1rem;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.user-message {
    flex-direction: row-reverse;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, var(--sky-blue), var(--accent-color));
    margin-right: 0;
    margin-left: 1rem;
}

.message-content {
    background: rgba(61, 79, 62, 0.8);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    max-width: 70%;
    color: var(--text-color);
    line-height: 1.6;
    border: 1px solid rgba(127, 176, 105, 0.2);
    position: relative;
}

.ai-message .message-content {
    background: linear-gradient(145deg, rgba(74, 95, 75, 0.9), rgba(61, 79, 62, 0.8));
    border-left: 4px solid var(--accent-color);
}

.user-message .message-content {
    background: linear-gradient(145deg, rgba(168, 213, 186, 0.2), rgba(127, 176, 105, 0.15));
    border-right: 4px solid var(--sky-blue);
}

.message-content p {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.message-content li {
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.chat-input-container {
    position: relative;
}

.input-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#chatInput {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid rgba(127, 176, 105, 0.3);
    border-radius: 25px;
    background: rgba(44, 62, 45, 0.3);
    color: var(--text-color);
    font-size: 1rem;
    font-family: var(--font-family);
    outline: none;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

#chatInput::placeholder {
    color: rgba(244, 247, 244, 0.6);
}

#chatInput:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(127, 176, 105, 0.2);
    background: rgba(44, 62, 45, 0.4);
}

#sendButton {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent-color), var(--leaf-green));
    border: none;
    border-radius: 25px;
    color: var(--primary-color);
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(127, 176, 105, 0.3);
    min-width: 120px;
    justify-content: center;
}

#sendButton:hover {
    background: linear-gradient(135deg, var(--leaf-green), var(--sky-blue));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(127, 176, 105, 0.4);
}

#sendButton:active {
    transform: translateY(0);
}

#sendButton:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.send-icon {
    font-size: 1.1rem;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    color: var(--accent-color);
    font-style: italic;
    font-size: 0.9rem;
}

.typing-dots {
    display: flex;
    gap: 0.3rem;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color);
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message {
    background: linear-gradient(145deg, rgba(255, 99, 99, 0.2), rgba(255, 150, 150, 0.15)) !important;
    border-left: 4px solid #ff6b6b !important;
    color: #ffcccb;
}

/* Blog Styles */
.blog-hero {
    background: linear-gradient(135deg, var(--primary-color), var(--tertiary-color));
    padding: 4rem 2rem;
    text-align: center;
    margin-bottom: 3rem;
}

.blog-hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.blog-hero-content p {
    font-size: 1.3rem;
    color: var(--text-color);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.blog-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.blog-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    align-items: start;
}

/* Blog Sidebar */
.blog-sidebar {
    position: sticky;
    top: 120px;
}

.sidebar-widget {
    background: linear-gradient(145deg, rgba(61, 79, 62, 0.9), rgba(74, 95, 75, 0.8));
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(127, 176, 105, 0.2);
}

.sidebar-widget h3 {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 0.5rem;
}

.category-filter {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 8px;
    display: block;
    font-size: 0.9rem;
    transition: var(--transition);
}

.category-filter:hover,
.category-filter.active {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateX(5px);
}

.recent-posts .recent-post-item {
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(127, 176, 105, 0.3);
}

.recent-post-date {
    color: var(--sky-blue);
    font-size: 0.8rem;
    display: block;
    margin-bottom: 0.3rem;
}

.recent-posts a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.3;
    display: block;
    transition: var(--transition);
}

.recent-posts a:hover {
    color: var(--accent-color);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(127, 176, 105, 0.2);
    color: var(--accent-color);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    border: 1px solid rgba(127, 176, 105, 0.3);
    cursor: pointer;
    transition: var(--transition);
}

.tag:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* Blog Posts */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.blog-post {
    background: linear-gradient(145deg, rgba(61, 79, 62, 0.9), rgba(74, 95, 75, 0.8));
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(44, 62, 45, 0.3);
    border: 2px solid rgba(127, 176, 105, 0.2);
    transition: var(--transition);
    display: grid;
    grid-template-columns: 300px 1fr;
    align-items: stretch;
}

.blog-post.featured {
    grid-template-columns: 400px 1fr;
    margin-bottom: 2rem;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(127, 176, 105, 0.25);
    border-color: var(--accent-color);
}

.post-image {
    position: relative;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-post:hover .post-image img {
    transform: scale(1.05);
}

.post-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.post-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.blog-post h2,
.blog-post h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-post.featured h2 {
    font-size: 2rem;
}

.blog-post h3 {
    font-size: 1.4rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--sky-blue);
    font-size: 0.9rem;
}

.post-excerpt {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-more-btn {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
    align-self: flex-start;
}

.read-more-btn:hover {
    color: var(--leaf-green);
    transform: translateX(5px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination-btn,
.pagination-number {
    padding: 0.8rem 1.2rem;
    background: linear-gradient(145deg, rgba(61, 79, 62, 0.9), rgba(74, 95, 75, 0.8));
    border: 1px solid rgba(127, 176, 105, 0.2);
    border-radius: 10px;
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.pagination-btn:hover,
.pagination-number:hover,
.pagination-number.active {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Full Blog Post Styles */
.blog-post-full {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

.post-header {
    margin-bottom: 2rem;
}

.breadcrumb {
    color: var(--sky-blue);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.post-category-tag {
    display: inline-block;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.blog-post-full h1 {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.post-meta-full {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.meta-left {
    display: flex;
    gap: 1.5rem;
    color: var(--sky-blue);
    font-size: 0.9rem;
}

.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color);
}

.share-btn {
    padding: 0.4rem;
    background: rgba(127, 176, 105, 0.2);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.2rem;
    transition: var(--transition);
}

.share-btn:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.post-hero-image {
    margin: 2rem 0;
    border-radius: 15px;
    overflow: hidden;
}

.post-hero-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.image-caption {
    background: rgba(44, 62, 45, 0.9);
    color: var(--text-color);
    padding: 1rem;
    font-style: italic;
    text-align: center;
    font-size: 0.9rem;
}

.post-content-full {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.post-sidebar {
    position: sticky;
    top: 120px;
    height: fit-content;
}

.table-of-contents,
.related-posts {
    background: linear-gradient(145deg, rgba(61, 79, 62, 0.9), rgba(74, 95, 75, 0.8));
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(127, 176, 105, 0.2);
}

.table-of-contents h3,
.related-posts h3 {
    color: var(--accent-color);
    font-size: 1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.table-of-contents ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 0.5rem;
}

.table-of-contents a,
.related-post-item a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    transition: var(--transition);
}

.table-of-contents a:hover,
.related-post-item a:hover {
    color: var(--accent-color);
    padding-left: 0.5rem;
}

.related-post-item {
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(127, 176, 105, 0.3);
}

/* Story Content Styles */
.post-text {
    color: var(--text-color);
    line-height: 1.8;
    font-size: 1.1rem;
}

.lead-paragraph {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--accent-color);
    margin-bottom: 2rem;
    line-height: 1.6;
    padding: 1.5rem;
    background: rgba(127, 176, 105, 0.1);
    border-left: 4px solid var(--accent-color);
    border-radius: 0 10px 10px 0;
}

.post-text h2 {
    color: var(--accent-color);
    font-size: 1.8rem;
    margin: 3rem 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent-color);
}

.post-text p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.story-quote {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-left: 6px solid var(--accent-color);
    padding: 2rem;
    margin: 2.5rem 0;
    border-radius: 0 15px 15px 0;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--sky-blue);
    position: relative;
}

.story-quote::before {
    content: '"';
    font-size: 4rem;
    color: var(--accent-color);
    position: absolute;
    top: -10px;
    left: -5px;
    font-family: Georgia, serif;
}

.story-highlight {
    background: rgba(127, 176, 105, 0.1);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    border: 1px solid rgba(127, 176, 105, 0.3);
}

.story-highlight h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.story-highlight ul {
    margin: 0;
    padding-left: 1.5rem;
}

.story-highlight li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

.story-photo {
    margin: 3rem 0;
    text-align: center;
}

.story-photo img {
    width: 100%;
    max-width: 600px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(44, 62, 45, 0.3);
}

.photo-caption {
    margin-top: 1rem;
    font-style: italic;
    color: var(--sky-blue);
    font-size: 0.9rem;
}

.story-stats {
    background: linear-gradient(145deg, rgba(61, 79, 62, 0.9), rgba(74, 95, 75, 0.8));
    padding: 2rem;
    border-radius: 15px;
    margin: 3rem 0;
    border: 2px solid rgba(127, 176, 105, 0.3);
}

.story-stats h3 {
    color: var(--accent-color);
    text-align: center;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-color);
    font-size: 0.9rem;
}

.story-lesson {
    background: rgba(168, 213, 186, 0.1);
    padding: 2rem;
    border-radius: 15px;
    margin: 3rem 0;
    border: 2px solid var(--sky-blue);
}

.story-lesson h3 {
    color: var(--sky-blue);
    margin-bottom: 1.5rem;
}

.story-lesson ul {
    margin: 0;
    padding-left: 1.5rem;
}

.story-lesson li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.story-epilogue {
    background: rgba(127, 176, 105, 0.1);
    padding: 2rem;
    border-radius: 15px;
    margin: 3rem 0;
    border-left: 6px solid var(--accent-color);
}

.story-epilogue h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.post-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid rgba(127, 176, 105, 0.3);
}

.tag-label {
    color: var(--sky-blue);
    font-weight: 600;
    margin-right: 1rem;
}

.post-tags .tag {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.post-footer {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 3px solid var(--accent-color);
}

.author-bio {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    background: linear-gradient(145deg, rgba(61, 79, 62, 0.9), rgba(74, 95, 75, 0.8));
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    border: 1px solid rgba(127, 176, 105, 0.2);
}

.author-avatar {
    font-size: 3rem;
    background: var(--accent-color);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-info h4 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.author-info p {
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.nav-prev,
.nav-next {
    flex: 1;
    padding: 1.5rem;
    background: linear-gradient(145deg, rgba(61, 79, 62, 0.9), rgba(74, 95, 75, 0.8));
    border-radius: 15px;
    border: 1px solid rgba(127, 176, 105, 0.2);
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
}

.nav-prev:hover,
.nav-next:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-brand {
        gap: 0.5rem;
    }
    
    .nav-brand h1 {
        font-size: 1.5rem;
    }
    
    .nav-logo {
        height: 30px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .clima-widget {
        padding: 2rem;
        margin: 1rem;
    }
    
    #temperatura {
        font-size: 3.5rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .card {
        padding: 2rem;
    }
    
    section {
        padding: 3rem 1.5rem;
        margin: 1rem;
    }
    
    /* History Page Mobile Styles */
    .history-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .prose p {
        text-indent: 1rem;
        font-size: 1rem;
    }
    
    .prose p:first-letter {
        font-size: 2.5rem;
        margin-right: 0.4rem;
    }
    
    .prose h2 {
        font-size: 1.8rem;
    }
    
    .prose h3 {
        font-size: 1.3rem;
    }
    
    .timeline {
        padding-left: 0;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    .timeline li {
        padding-left: 60px;
    }
    
    .timeline li span {
        position: relative;
        left: -60px;
        margin-bottom: 0.5rem;
        display: inline-block;
    }
    
    .timeline li::before {
        left: 10px;
    }
    
    .history-quote {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .history-quote::before,
    .history-quote::after {
        font-size: 2.5rem;
    }
    
    /* AI Chat Mobile Styles */
    .ai-chat-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .chat-messages {
        height: 300px;
        padding: 0.5rem;
    }
    
    .message-content {
        max-width: 85%;
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
    }
    
    .message-avatar {
        width: 35px;
        height: 35px;
        font-size: 1rem;
        margin-right: 0.8rem;
    }
    
    .user-message .message-avatar {
        margin-left: 0.8rem;
    }
    
    .input-wrapper {
        flex-direction: column;
        gap: 0.8rem;
        align-items: stretch;
    }
    
    #chatInput {
        padding: 0.8rem 1.2rem;
        font-size: 0.9rem;
    }
    
    #sendButton {
        padding: 0.8rem 1.5rem;
        min-width: auto;
        width: 100%;
        justify-content: center;
    }
    
    .ai-description {
        padding: 1rem;
    }
    
    .ai-description p {
        font-size: 1rem;
    }
    
    /* Blog Mobile Styles */
    .blog-hero-content h1 {
        font-size: 2.5rem;
    }
    
    .blog-hero-content p {
        font-size: 1.1rem;
    }
    
    .blog-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .blog-sidebar {
        position: static;
        order: 2;
    }
    
    .sidebar-widget {
        padding: 1rem;
    }
    
    .blog-post {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .blog-post.featured {
        grid-template-columns: 1fr;
    }
    
    .post-image {
        height: 200px;
    }
    
    .blog-post.featured .post-image {
        height: 250px;
    }
    
    .post-content {
        padding: 1.5rem;
    }
    
    .blog-post h2,
    .blog-post.featured h2 {
        font-size: 1.5rem;
    }
    
    .blog-post h3 {
        font-size: 1.3rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
    /* Full Blog Post Mobile Styles */
    .blog-post-full {
        padding: 1rem;
    }
    
    .blog-post-full h1 {
        font-size: 2rem;
    }
    
    .post-meta-full {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .meta-left {
        flex-direction: column;
        gap: 0.5rem;
        font-size: 0.8rem;
    }
    
    .post-hero-image img {
        height: 250px;
    }
    
    .post-content-full {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .post-sidebar {
        position: static;
        order: 2;
    }
    
    .post-text {
        font-size: 1rem;
    }
    
    .lead-paragraph {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .post-text h2 {
        font-size: 1.5rem;
        margin: 2rem 0 1rem 0;
    }
    
    .story-quote {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .story-quote::before {
        font-size: 3rem;
        top: -5px;
        left: 0;
    }
    
    .story-highlight,
    .story-stats,
    .story-lesson,
    .story-epilogue {
        padding: 1.5rem;
        margin: 2rem 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .author-bio {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .author-avatar {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-prev,
    .nav-next {
        padding: 1rem;
        font-size: 0.9rem;
    }
}
/* Contact Section */
#contacto {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--tertiary-color) 100%);
    text-align: center;
    color: var(--text-color);
    padding: 4rem 2rem;
    border-radius: 20px;
    margin: 4rem 2rem;
    box-shadow: 0 10px 30px rgba(44, 62, 45, 0.3);
    border: 2px solid rgba(127, 176, 105, 0.3);
}

#contacto h2 {
    color: var(--accent-color);
    margin-bottom: 2rem;
}

.contacto-container p {
    font-size: 1.2rem;
    margin: 0.5rem 0;
    color: var(--warm-beige);
}

/* Estilos para las tarjetas de semillas */
.seed-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.seed-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.seed-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.seed-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.seed-card:hover .seed-image img {
    transform: scale(1.1);
}

.seed-info {
    padding: 1.5rem;
}

.seed-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.seed-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.seeds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .seeds-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .seed-image {
        height: 180px;
    }
}

/* Dark mode support */
body.dark-mode .seed-card {
    background: var(--card-background-dark, #2a2a2a);
}

body.dark-mode .seed-info h3 {
    color: var(--accent-color);
}

body.dark-mode .seed-info p {
    color: var(--text-secondary-dark, #b0b0b0);
}

/* Estilos para las tarjetas de historia */
.history-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.history-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.year-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: white;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.timeline-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.achievements-box {
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timeline-container {
        grid-template-columns: 1fr;
    }

    .history-card {
        padding: 1.5rem;
    }
}

/* Dark mode support */
body.dark-mode .history-card {
    background: var(--card-background-dark, #2a2a2a);
    border-left-color: var(--accent-color);
}

body.dark-mode .achievements-box {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.2), rgba(33, 150, 243, 0.2));
}
