/* CalorHogar - Home Heating Efficiency & Safety Blog */
/* Color Palette: Night #0B1220, Ember #E0793C, Pine #2E5D4A, Cream #F5F2EA, Soft Gray #A7B0BD */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #0B1220;
    background-color: #F5F2EA;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 160ms ease;
}

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

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0B1220, #2E5D4A);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 300ms ease, visibility 300ms ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.ember-glow {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, #E0793C, #f4a460);
    animation: emberPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 30px #E0793C;
}

@keyframes emberPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 30px #E0793C; }
    50% { transform: scale(1.2); box-shadow: 0 0 50px #E0793C; }
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(11, 18, 32, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 15px 0;
    transition: all 220ms ease;
}

.header.scrolled {
    background: rgba(11, 18, 32, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

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

.logo h1 {
    color: #E0793C;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.tagline {
    color: #A7B0BD;
    font-size: 0.8rem;
    font-weight: 400;
}

/* Navigation */
.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: #F5F2EA;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 160ms ease;
    position: relative;
}

.nav-link:hover {
    color: #E0793C;
    background: rgba(224, 121, 60, 0.1);
}

.nav-link.active {
    color: #E0793C;
    background: rgba(224, 121, 60, 0.15);
}

/* Burger Menu */
.burger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.burger span {
    width: 25px;
    height: 3px;
    background: #F5F2EA;
    transition: all 160ms ease;
    border-radius: 2px;
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0B1220 0%, #2E5D4A 100%);
    overflow: hidden;
    padding-top: 80px;
}

.warm-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(224, 121, 60, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(224, 121, 60, 0.1) 0%, transparent 50%),
        linear-gradient(90deg, transparent 0%, rgba(224, 121, 60, 0.05) 50%, transparent 100%),
        linear-gradient(0deg, transparent 0%, rgba(224, 121, 60, 0.05) 50%, transparent 100%);
    background-size: 100px 100px, 150px 150px, 50px 100%, 100% 50%;
    animation: warmGridMove 20s ease-in-out infinite;
}

@keyframes warmGridMove {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(10px, 5px); }
    50% { transform: translate(5px, -10px); }
    75% { transform: translate(-5px, 5px); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.1rem;
    font-weight: 700;
    line-height: 1.2;
    color: #F5F2EA;
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

.title-line:first-child {
    color: #E0793C;
}

.hero-description {
    font-size: 1.25rem;
    color: #A7B0BD;
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image img {
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
}

/* Buttons */
.btn {
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 160ms ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #E0793C, #f4a460);
    color: #0B1220;
    box-shadow: 0 4px 12px rgba(224, 121, 60, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(224, 121, 60, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #F5F2EA;
    border: 2px solid #A7B0BD;
}

.btn-secondary:hover {
    background: #A7B0BD;
    color: #0B1220;
    transform: translateY(-2px);
}

/* Stats Section */
.stats {
    padding: 80px 0;
    background: #F5F2EA;
}

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

.stat-item {
    text-align: center;
    padding: 40px 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transition: transform 220ms ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #E0793C, #f4a460);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.stat-icon svg {
    width: 30px;
    height: 30px;
    color: #0B1220;
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 700;
    color: #2E5D4A;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 1rem;
    color: #A7B0BD;
    font-weight: 500;
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0B1220;
    margin-bottom: 16px;
}

.section-description {
    font-size: 1.2rem;
    color: #A7B0BD;
    max-width: 600px;
    margin: 0 auto;
}

/* Featured Section */
.featured {
    padding: 80px 0;
    background: white;
}

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

.article-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transition: all 220ms ease;
    border: 1px solid #f0f0f0;
}

.article-card.featured {
    grid-column: span 2;
}

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

.article-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

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

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 220ms ease;
}

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

.article-badges {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: #2E5D4A;
    color: white;
}

.badge-secondary {
    background: #E0793C;
    color: white;
}

.badge-success {
    background: #4CAF50;
    color: white;
}

.badge-warning {
    background: #FF9800;
    color: white;
}

.badge-alert {
    background: #F44336;
    color: white;
}

.article-content {
    padding: 24px;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0B1220;
    margin-bottom: 12px;
    line-height: 1.4;
}

.article-excerpt {
    color: #A7B0BD;
    margin-bottom: 16px;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #A7B0BD;
}

/* Advantages Section */
.advantages {
    padding: 80px 0;
    background: #F5F2EA;
}

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

.advantage-item {
    text-align: center;
    padding: 40px 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    transition: transform 220ms ease;
}

.advantage-item:hover {
    transform: translateY(-5px);
}

.advantage-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2E5D4A, #4a7c5a);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.advantage-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.advantage-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0B1220;
    margin-bottom: 16px;
}

.advantage-description {
    color: #A7B0BD;
    line-height: 1.6;
}

/* Popular Section */
.popular {
    padding: 80px 0;
    background: white;
}

/* Reviews Section */
.reviews {
    padding: 80px 0;
    background: #F5F2EA;
}

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

.review-card {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    text-align: center;
    transition: transform 220ms ease;
}

.review-card:hover {
    transform: translateY(-5px);
}

.review-stars {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 20px;
}

.star {
    color: #FFB400;
    font-size: 1.2rem;
}

.review-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #0B1220;
    margin-bottom: 24px;
    font-style: italic;
}

.review-author strong {
    display: block;
    color: #0B1220;
    font-weight: 600;
    margin-bottom: 4px;
}

.review-author span {
    color: #A7B0BD;
    font-size: 0.9rem;
}

/* Latest Section */
.latest {
    padding: 80px 0;
    background: white;
}

/* Categories Navigation */
.categories-nav {
    padding: 80px 0;
    background: #F5F2EA;
}

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

.category-card {
    background: white;
    padding: 30px 24px;
    border-radius: 16px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    text-align: center;
    transition: all 220ms ease;
    display: block;
}

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

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #E0793C, #f4a460);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.category-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0B1220;
    margin-bottom: 8px;
}

.category-description {
    color: #A7B0BD;
    font-size: 0.9rem;
}

/* Newsletter */
.newsletter {
    padding: 80px 0;
    background: linear-gradient(135deg, #0B1220, #2E5D4A);
}

.newsletter-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.newsletter-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #F5F2EA;
    margin-bottom: 16px;
}

.newsletter-description {
    font-size: 1.2rem;
    color: #A7B0BD;
    line-height: 1.6;
}

.newsletter-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.form-group {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.form-group input {
    flex: 1;
    padding: 14px 16px;
    border: none;
    border-radius: 8px;
    background: white;
    color: #0B1220;
    font-size: 1rem;
}

.form-group input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #E0793C;
}

.newsletter-privacy {
    font-size: 0.9rem;
    color: #A7B0BD;
}

/* Footer */
.footer {
    background: #0B1220;
    color: #F5F2EA;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h3 {
    color: #E0793C;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.footer-logo p {
    color: #A7B0BD;
    margin-bottom: 20px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: #A7B0BD;
}

.contact-item svg {
    width: 20px;
    height: 20px;
    color: #E0793C;
    flex-shrink: 0;
    margin-top: 2px;
}

.footer-title {
    color: #F5F2EA;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #A7B0BD;
    transition: color 160ms ease;
}

.footer-links a:hover {
    color: #E0793C;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 160ms ease;
}

.social-link:hover {
    background: #E0793C;
    transform: translateY(-2px);
}

.social-link svg {
    width: 20px;
    height: 20px;
    color: #F5F2EA;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

.footer-legal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #A7B0BD;
    font-size: 0.9rem;
}

.footer-legal-links {
    display: flex;
    gap: 20px;
}

.footer-legal-links a {
    transition: color 160ms ease;
}

.footer-legal-links a:hover {
    color: #E0793C;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #E0793C, #f4a460);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(224, 121, 60, 0.3);
    transition: all 220ms ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(224, 121, 60, 0.4);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .article-card.featured {
        grid-column: span 1;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(11, 18, 32, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 40px;
        transition: left 220ms ease;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .burger {
        display: flex;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
    
    .newsletter-form {
        padding: 20px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 600ms ease;
}

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

/* Link Pulse Effect */
.nav-link, .btn, .category-card, .article-card, .advantage-item, .review-card {
    position: relative;
    overflow: hidden;
}

.nav-link::before, .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 500ms ease;
}

.nav-link:hover::before, .btn:hover::before {
    left: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F5F2EA;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #E0793C, #f4a460);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #f4a460, #E0793C);
}

/* Focus States for Accessibility */
.btn:focus,
input:focus,
.nav-link:focus {
    outline: 2px solid #E0793C;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header, .footer, .back-to-top, .preloader {
        display: none;
    }
    
    .hero {
        padding-top: 0;
        min-height: auto;
    }
    
    * {
        box-shadow: none !important;
        text-shadow: none !important;
    }
}