/* CSS Variables based on visual references */
:root {
    --primary-color: #1a73e8;
    --primary-hover: #155dbb;
    --bg-color: #fcfcfc;
    --text-main: #333333;
    --text-muted: #666666;
    --footer-bg: #0b162c;
    --tag-bg: #e8f0fe;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: #111;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

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

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

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

/* UI Elements */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

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

.ui-icon, .btn-icon, .meta-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.meta-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: var(--transition);
}

.icon-btn:hover {
    background-color: #f0f0f0;
}

.tag {
    background-color: var(--tag-bg);
    color: var(--primary-color);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 2px;
    text-transform: uppercase;
    font-family: var(--font-heading);
}

.tag-text {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    font-family: var(--font-heading);
    display: block;
    margin-bottom: 8px;
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 50px 0 30px;
    font-size: 1.5rem;
    color: #222;
}

.section-title::before,
.section-title::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.section-title::before {
    margin-right: 20px;
}

.section-title::after {
    margin-left: 20px;
}

/* Header */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 40px;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    color: #000;
    letter-spacing: -0.5px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

.main-nav a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Hero Section */
.hero-section {
    position: relative;
    margin-top: 40px;
    display: flex;
    align-items: center;
}

.carousel-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none;  /* IE and Edge */
    flex: 1;
    padding-bottom: 10px;
}

.carousel-container::-webkit-scrollbar {
    display: none;
}

.hero-card {
    flex: 0 0 calc(33.333% - 14px);
    min-width: 300px;
    height: 450px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.card-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
    transition: transform 0.5s ease;
}

.hero-card:hover .card-bg {
    transform: scale(1.05);
}

.card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: var(--white);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-content h2 {
    color: var(--white);
    font-size: 1.4rem;
}

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

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
}

.separator {
    font-size: 10px;
}

.carousel-btn {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.carousel-btn:hover {
    background: var(--bg-color);
}

.carousel-btn.prev {
    left: -10px;
}

.carousel-btn.next {
    right: -10px;
}

/* Popular Section */
.popular-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.popular-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.thumb-round {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.popular-info h3 {
    font-size: 0.95rem;
    margin-top: 5px;
}

.tags-small span {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Editor's Choice */
.grid-4-cols {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.grid-card {
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    position: relative;
}

.grid-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.grid-card-body {
    padding: 15px;
}

.grid-card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.small-meta {
    color: var(--text-muted);
}

.small-meta .meta-icon {
    filter: brightness(0) opacity(0.5);
}

.dark-overlay .grid-card-img {
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    filter: brightness(0.6);
    z-index: 1;
}

.inner-body {
    position: relative;
    z-index: 2;
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
}

.text-white {
    color: var(--white) !important;
}

.dark-overlay .small-meta .meta-icon {
    filter: none;
}

/* Featured & Search */
.featured-search-wrapper {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 60px;
}

.featured-post {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.featured-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 4px;
}

.featured-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.featured-content .card-meta {
    color: var(--text-muted);
    margin-bottom: 10px;
}

.featured-content .meta-icon {
    filter: brightness(0) opacity(0.5);
}

.read-more {
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 10px;
}

.search-widget {
    background: #f4f7f9;
    padding: 30px;
    border-radius: 8px;
}

.widget-title {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.widget-title::before,
.widget-title::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dcdcdc;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-body);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Pre-Footer Welcome */
.pre-footer-welcome {
    margin: 60px auto;
}

.welcome-box {
    background-color: #eaf1fb;
    border: 1px solid #cce0ff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.welcome-box h2 {
    color: var(--footer-bg);
    margin-bottom: 15px;
}

.welcome-box p {
    font-size: 1.05rem;
    color: #444;
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg);
    color: var(--white);
    padding: 60px 0 20px;
    margin-top: 40px;
}

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

.footer-heading {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 40px;
    height: 3px;
    background: url('data:image/svg+xml;utf8,<svg width="40" height="4" viewBox="0 0 40 4" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 2 Q 5 0, 10 2 T 20 2 T 30 2 T 40 2" stroke="%231a73e8" stroke-width="2" fill="none"/></svg>') repeat-x;
}

.disclaimer-text {
    color: #a0aabf;
    font-size: 0.9rem;
    line-height: 1.8;
}

.disclaimer-text strong {
    color: var(--white);
}

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

.footer-links li {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 10px;
}

.footer-links a {
    color: #a0aabf;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #718096;
    font-size: 0.85rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 20px;
    z-index: 9999;
    transform: translateY(150%);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid var(--primary-color);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content h4 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.cookie-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.cookie-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cookie-link {
    font-size: 0.85rem;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 992px) {
    .popular-grid, .grid-4-cols {
        grid-template-columns: repeat(2, 1fr);
    }
    .featured-search-wrapper {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .hero-card {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none; /* In a real project, implement a hamburger menu */
    }
    .hero-card {
        flex: 0 0 100%;
    }
    .carousel-btn {
        display: none;
    }
}

@media (max-width: 480px) {
    .popular-grid, .grid-4-cols {
        grid-template-columns: 1fr;
    }
    .cookie-banner {
        width: calc(100% - 40px);
        right: 20px;
        left: 20px;
    }
    .search-form {
        flex-direction: column;
    }
}
/* Inner page styles */

/* ==========================================================================
   NOILE STILURI PENTRU PAGINA INTERNĂ (ARTICOL, FORME, TABELE)
   ========================================================================== */

/* --- Layout Articol --- */
.single-article {
    max-width: 1000px;
    margin: 40px auto;
}

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

.article-header .tags {
    justify-content: center;
    margin-bottom: 15px;
}

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

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-image-wrapper {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* --- Imagini Responsive --- */
.responsive-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.hero-img {
    max-height: 500px;
    object-fit: cover;
}

.article-inner-image {
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
}

.article-inner-image img {
    border-radius: 8px;
}

.article-inner-image figcaption {
    text-align: center;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 10px;
}

/* --- Layout Oglavlenie + Text --- */
.article-content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: start;
}

/* --- Oglavlenie (TOC) --- */
.toc-container {
    background-color: var(--tag-bg);
    padding: 25px;
    border-radius: 8px;
    position: sticky;
    top: 100px; /* pentru a sta sub header-ul sticky */
    border-left: 4px solid var(--primary-color);
}

.toc-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--footer-bg);
    border-bottom: 1px solid #dcdcdc;
    padding-bottom: 10px;
}

.toc-nav ol {
    list-style: decimal inside;
    padding: 0;
    margin: 0;
}

.toc-nav li {
    margin-bottom: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.toc-nav a {
    color: var(--text-main);
    transition: color 0.2s ease;
}

.toc-nav a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* --- Stiluri Text Articol (h1-h6, p, span, liste) --- */
.article-body {
    font-size: 1.05rem;
    color: #2c3e50;
}

.article-body h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--footer-bg);
    border-bottom: 2px solid var(--tag-bg);
    padding-bottom: 10px;
}

.article-body h3 {
    font-size: 1.5rem;
    margin: 35px 0 15px;
    color: #222;
}

.article-body h4 {
    font-size: 1.3rem;
    margin: 30px 0 15px;
    color: #333;
}

.article-body h5 {
    font-size: 1.15rem;
    margin: 25px 0 10px;
    color: #444;
}

.article-body h6 {
    font-size: 1.05rem;
    margin: 20px 0 10px;
    text-transform: uppercase;
    color: #555;
    letter-spacing: 0.5px;
}

.article-body p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.lead-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.highlight-span {
    background-color: #fff3cd;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    color: #856404;
}

.article-body ul,
.article-body ol {
    margin-bottom: 25px;
    padding-left: 20px;
}

.article-body ul li,
.article-body ol li {
    margin-bottom: 10px;
    line-height: 1.7;
}

.article-body ul {
    list-style-type: disc;
}

.article-body ol {
    list-style-type: decimal;
}

.article-body ul li::marker {
    color: var(--primary-color);
}

.article-body ol li::marker {
    color: var(--primary-color);
    font-weight: 700;
}

/* --- Tabel --- */
.table-responsive {
    overflow-x: auto;
    margin: 30px 0;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

.content-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    background-color: var(--white);
    text-align: left;
}

.content-table thead tr {
    background-color: var(--primary-color);
    color: var(--white);
}

.content-table th,
.content-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.content-table th {
    font-family: var(--font-heading);
    font-weight: 700;
}

.content-table tbody tr:nth-of-type(even) {
    background-color: #f8f9fa;
}

.content-table tbody tr:hover {
    background-color: var(--tag-bg);
}

/* --- Formulare (Comentarii și Contact) --- */
.section-subtitle {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--footer-bg);
}

.comments-section, .contact-section {
    margin-top: 60px;
    margin-bottom: 60px;
}

.comments-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
}

.comments-desc {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.custom-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.custom-form .form-group {
    margin-bottom: 20px;
}

.custom-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--footer-bg);
    font-size: 0.95rem;
}

.custom-form label span {
    color: #e74c3c;
}

.custom-form input,
.custom-form select,
.custom-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition);
    background-color: #fcfcfc;
}

.custom-form input:focus,
.custom-form select:focus,
.custom-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
    background-color: var(--white);
}

.custom-form button[type="submit"] {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 1.05rem;
}

/* --- Bloc Perelinkovka (Articole similare) --- */
.related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.related-grid .grid-card-img {
    height: 180px;
}

.related-grid .grid-card-body h3 a {
    color: var(--text-main);
}

.related-grid .grid-card-body h3 a:hover {
    color: var(--primary-color);
}

/* --- Secțiune Contact --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background-color: var(--footer-bg);
    border-radius: 12px;
    overflow: hidden;
}

.contact-info {
    padding: 50px;
    color: var(--white);
    background: url('data:image/svg+xml;utf8,<svg width="100%" height="100%" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="dots" x="0" y="0" width="20" height="20" patternUnits="userSpaceOnUse"><circle fill="%23ffffff" fill-opacity="0.05" cx="2" cy="2" r="2"></circle></pattern></defs><rect x="0" y="0" width="100%" height="100%" fill="url(%23dots)"></rect></svg>');
}

.contact-info h3 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.contact-info p {
    color: #a0aabf;
    margin-bottom: 30px;
}

.contact-list {
    list-style: none;
    padding: 0;
}

.contact-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.contact-icon {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.contact-form-container {
    background: var(--white);
    padding: 50px;
}

/* --- Adaptivitate pentru pagina internă --- */
@media (max-width: 992px) {
    .article-content-layout {
        grid-template-columns: 1fr;
    }
    
    .toc-container {
        position: static;
        margin-bottom: 30px;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 768px) {
    .article-title {
        font-size: 2rem;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .custom-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-info, .contact-form-container {
        padding: 30px 20px;
    }
}
