/* 
* Fitness Blog - Main Stylesheet
*/

:root {
    --primary-color: #7c4dff;
    --primary-hover: #6a3ff5;
    --secondary-color: #ff4081;
    --secondary-hover: #f50057;
    --text-color: #333;
    --light-text: #fff;
    --dark-bg: #121212;
    --light-bg: #f9f9f9;
    --gray-color: #6c757d;
    --border-color: #e9ecef;
    
    /* Category Colors */
    --antrenament-color: #ff5722;
    --nutritie-color: #4caf50;
    --lifestyle-color: #2196f3;
}

/* Global Styles */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.section-title {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.adsense-container {
    display: block;
    width: 100%;
    margin: 1rem 0;
    text-align: center;
    min-height: 100px; /* Ensures space is visible even when ad hasn't loaded */
    background-color: #f8f9fa; /* Light background to make the container visible */
    padding: 1rem;
    border-radius: 4px;
}

/* Add this for debugging purposes */
.adsense-container:empty {
    border: 1px dashed #dee2e6;
}

/* Header */
.header {
    background-color: var(--dark-bg);
}

.navbar-dark {
    padding: 1rem 0;
}

.navbar-logo {
    height: 100px;
    width: auto;
}

@media (max-width: 991px) {
    .navbar-logo {
        height: 80px;
    }
    
    .navbar-brand.mx-auto {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1030;
    }
    
    .navbar > .container {
        position: relative;
    }
    
    /* Center calculator elements on mobile */
    .calculator-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    
    .calculator-btn {
        width: 100%;
        max-width: 300px;
        margin: 0.5rem auto;
    }

    .navbar-toggler {
        border: none;
        padding-right: 0;
        width: 40px;
        height: 40px;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }

    .navbar-toggler-icon {
        width: 24px;
        height: 24px;
    }

    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--dark-bg);
        padding: 1rem;
        z-index: 1020;
    }

    .navbar-nav {
        text-align: right;
    }

    .navbar-nav .nav-link {
        padding-right: 0;
    }

    /* Align dropdown items to the right as well */
    .navbar-nav .dropdown-menu {
        text-align: right;
        background-color: transparent;
        border: none;
        padding: 0;
    }

    .navbar-nav .dropdown-item {
        color: rgba(255, 255, 255, 0.85);
        text-align: right;
        padding-right: 1rem;
    }

    .navbar-nav .dropdown-item:hover {
        background-color: transparent;
        color: #fff;
    }
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

/* Navbar Brand */
.navbar-brand {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.navbar-brand:hover {
    color: var(--light-text) !important;
}

/* Hero Section */
.hero-section {
    height: 600px;
    background-image: url('/static/images/hero-bg.webp');
    background-size: cover;
    background-position: center;
    position: relative;
    color: var(--light-text);
    background-color: rgba(0, 0, 0, 0.4);
    background-blend-mode: darken;
    /* Add opacity to transition for fade-in effect */
    transition: background-image 0.5s ease-in-out, opacity 0.5s ease-in-out;
    will-change: background-image, opacity;
}

/* .hero-section.hero-hidden rule removed as it's no longer used by JS */

.hero-section.hero-loading {
    background-color: #f0f0f0; /* Optional: keep grey background during load */
    background-image: none;
    opacity: 0; /* Start transparent */
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    transition: opacity 0.3s ease;
    opacity: 1;
}

.hero-btn {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    color: white;
}

.hero-indicators {
    position: absolute;
    bottom: 2rem;
    left: 0;
    right: 0;
    text-align: center;
}

.hero-indicators span {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
}

.hero-indicators span.active {
    background-color: white;
    transform: scale(1.2);
}

/* Hero Logo */
/* 
.hero-logo {
    max-width: 200px;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 767px) {
    .hero-logo {
        max-width: 150px;
    }
}
*/

/* Articles Section */
.articles-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 3rem 0;
}

.articles-section .section-title {
    color: white;
}

.articles-section .view-all {
    color: white;
    opacity: 0.9;
}

.articles-section .view-all:hover {
    opacity: 1;
}

/* Update article cards to stand out against the gradient background */
.articles-section .article-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.articles-section .article-title a {
    color: var(--text-color);
}

.articles-section .article-excerpt {
    color: var(--gray-color);
}

.articles-section .read-more {
    color: var(--primary-color);
}

/* Article Cards */
.article-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: white;
}

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

.article-img {
    position: relative;
    height: 200px;
}

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

.article-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.article-category.antrenament {
    background-color: var(--antrenament-color);
}

.article-category.nutritie {
    background-color: var(--nutritie-color);
}

.article-category.lifestyle {
    background-color: var(--lifestyle-color);
}

.article-time {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
}

.article-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.article-title a {
    color: var(--text-color);
}

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

.article-excerpt {
    color: var(--gray-color);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.read-more {
    font-weight: 600;
    color: var(--primary-color);
    margin-top: auto;
}

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

.view-all {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Category Sections */
.category-section {
    background-color: var(--light-bg);
}

.category-section.antrenamente-section .section-icon,
.category-section.antrenamente-section .section-title {
    color: var(--antrenament-color);
}

.category-section.nutritie-section .section-icon,
.category-section.nutritie-section .section-title {
    color: var(--nutritie-color);
}

.category-section.lifestyle-section .section-icon,
.category-section.lifestyle-section .section-title {
    color: var(--lifestyle-color);
}

.section-icon {
    font-size: 1.8rem;
    margin-right: 1rem;
}

.category-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.category-card:hover .category-img::before {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.9));
}

.category-img {
    position: relative;
    height: 200px;
}

.category-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.85));
    border-radius: 10px;
    overflow: hidden;
}

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

.category-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    color: white;
}

.category-content .category-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    -webkit-text-fill-color: white;
    margin: 0 0 0.5rem 0;
}

.category-content .category-title a {
    color: white;
    text-decoration: none;
}

.category-time {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 576px) {
    .category-title {
        font-size: 1.2rem;
    }
    
    .category-content {
        padding: 1rem;
    }
    
    .category-img::before {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.9));
    }
}

/* Newsletter Section */
.newsletter-section {
    padding: 2rem 0;
}

.newsletter-container {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    color: white;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.subscribe-btn {
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.subscribe-btn:hover {
    background-color: var(--light-bg);
    color: var(--primary-hover);
}

/* Footer */
.footer {
    background-color: var(--dark-bg);
    color: white;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.footer a:hover {
    color: white;
    text-decoration: none;
}

.footer .social-icons a {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Article Detail Page */
.article-header {
    height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
    color: white;
    display: flex;
    align-items: center;
}

.article-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

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

.article-header .article-category {
    position: relative;
    top: auto;
    left: auto;
    display: inline-block;
    margin-bottom: 1rem;
}

.article-header .article-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.9rem;
}

.article-content-section {
    background-color: white;
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-share {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

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

.btn-twitter {
    background-color: #1da1f2;
    color: white;
}

.btn-whatsapp {
    background-color: #25d366;
    color: white;
}

.share-buttons .btn:hover {
    opacity: 0.9;
    color: white;
}

.related-articles-section {
    background-color: var(--light-bg);
}

/* Category and All Articles Pages */
.category-header, .page-header {
    background-color: var(--light-bg);
    padding: 3rem 0;
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.category-title, .page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.category-description, .page-description {
    color: var(--gray-color);
    font-size: 1.1rem;
}

.pagination-container {
    margin-top: 3rem;
}

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

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Logo Section */
.logo-section {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    padding: 3rem 0;
}

.main-logo {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 767px) {
    .main-logo {
        max-width: 150px;
    }
}

/* Responsive Styles */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .article-header .article-title {
        font-size: 2rem;
    }
}

@media (max-width: 767px) {
    .hero-section {
        height: 450px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .article-header {
        height: 350px;
    }
    
    .article-header .article-title {
        font-size: 1.75rem;
    }
    
    .share-buttons {
        flex-direction: column;
    }
    
    .category-title {
        font-size: 1.3rem;
    }
    
    .category-content {
        padding: 1.25rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .category-title {
        font-size: 1.2rem;
    }
    
    .category-content {
        padding: 1rem;
    }
    
    .category-img::before {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.9));
    }
}

/* Category Header Styles */
.category-header {
    padding: 4rem 0;
    background-color: var(--light-bg);
    text-align: center;
}

.category-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--nutritie-color);
    text-align: center;
}

.category-icon i {
    display: inline-block;
}

.category-title {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 3rem;
    letter-spacing: -0.5px;
    margin: 0 auto 1rem auto;  /* Changed margin to center */
    background: linear-gradient(45deg, var(--nutritie-color), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    text-align: center;
    display: table;  /* Changed to table */
    padding: 0 15px;
}

.category-description {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    text-align: center;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .category-title {
        font-size: 2rem;
        padding: 0 15px;
    }
    
    .category-icon {
        font-size: 2.5rem;
    }
}

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

/* No Articles Section */
.no-articles-section {
    background-color: var(--light-bg);
}

.no-articles-section .fa-newspaper {
    color: var(--gray-color);
}

.no-articles-section .section-title {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.no-articles-section .text-muted {
    font-size: 1rem;
}

/* Cookie Consent Styles */
.cookie-consent-modal .modal-content {
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.cookie-consent-modal .modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 15px 15px 0 0;
}

.cookie-consent-modal .modal-body {
    padding: 1.5rem;
}

.cookie-options {
    margin-top: 1rem;
}

.cookie-options .form-check {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1050;
    padding: 10px 15px;
    border-radius: 30px;
    background-color: #343a40;
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.cookie-settings-btn:hover {
    background-color: #23272b;
    transform: translateY(-2px);
}

.cookie-settings-btn i {
    font-size: 16px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .cookie-consent-modal .modal-dialog {
        margin: 0.5rem;
    }
    
    .cookie-settings-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Override newsletter error message color */
#newsletter-message.text-danger {
    color: white !important; /* Use !important to ensure override */
}

/* Responsive Media in Article Content */
.article-content img,
.article-content video { /* Also apply to video tags if used */
    max-width: 100%;
    height: auto;
    display: block; /* Prevents extra space below images */
    margin: 1em 0; /* Add some vertical spacing */
}

/* Responsive Video Embeds (e.g., YouTube iframe) */
/* Wrap the iframe in a div with this class in CKEditor source: <div class="video-responsive">...iframe...</div> */
.video-responsive {
    overflow: hidden;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio (divide 9 by 16 = 0.5625) */
    position: relative;
    height: 0;
    margin: 1em 0; /* Add some vertical spacing */
}

.video-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
    border: 0; /* Remove default iframe border */
}

/* Article Content Styling */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h2, 
.article-content h3, 
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.article-content ul, 
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin-left: 0;
    margin-right: 0;
    font-style: italic;
    color: var(--gray-color);
}

.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
}

.article-content a:hover {
    color: var(--primary-hover);
}

/* Comments Section Styling */
.comments-section {
    border-top: 1px solid #e9ecef;
    padding-top: 2rem;
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.comment-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--primary-color);
}

.comment-author h5 {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-content {
    margin-top: 0.75rem;
}

.comment-content p {
    margin-bottom: 0;
}

.comment-form-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.comment-form label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.no-comments {
    font-style: italic;
    color: #6c757d;
}
