/*
Theme Name: Developer Theme Child
Theme URI: https://jurnalurban.ro
Author: Developer
Author URI: https://jurnalurban.ro
Description: Tema child pentru Developer News Theme - pentru customizari sigure
Version: 1.0.0
Template: developer-theme
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: developer-theme-child
Tags: news, magazine, responsive, child-theme
*/

/* ==========================================================================
   FIXES AND IMPROVEMENTS - CHILD THEME
   ========================================================================== */

/* ==========================================================================
   FIX: Hero Icons - Smaller and Optional
   ========================================================================== */
.hero-main .post-meta svg,
.hero-secondary .post-meta svg {
    width: 14px;
    height: 14px;
}

.hero-main .post-meta,
.hero-secondary .post-meta {
    font-size: 0.8rem;
    gap: 12px;
}

.hero-main .post-meta .meta-item,
.hero-secondary .post-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================================================
   FIX: Footer Icons - Proper Sizing
   ========================================================================== */
.footer-contact li svg,
.footer-widget .widget-content svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px !important;
    font-size: 0.95rem;
}

.footer-contact li span {
    flex: 1;
}

/* ==========================================================================
   FIX: Sticky Sidebar - Improved Behavior
   ========================================================================== */
.content-wrapper {
    position: relative;
    align-items: flex-start;
}

.site-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.site-sidebar.is-sticky {
    z-index: 100;
}

/* Single post sidebar fix - prevent overlap */
.single-post .content-wrapper {
    overflow: visible;
}

.single-post .site-sidebar {
    flex-shrink: 0;
}

.single-post article {
    min-width: 0;
}

/* Scrollbar styling for sidebar */
.site-sidebar::-webkit-scrollbar {
    width: 4px;
}

.site-sidebar::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.site-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

/* ==========================================================================
   FIX: Hero Variants - Carousel, Featured, Fullwidth
   ========================================================================== */

/* Hero Slider/Carousel */
.hero-slider,
.hero-carousel {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    min-height: 450px;
}

.hero-slider .slider-wrapper,
.hero-carousel .slider-wrapper {
    display: flex;
    transition: transform 0.5s ease;
    height: 100%;
}

.hero-slider .slide-item,
.hero-carousel .slide-item {
    flex: 0 0 100%;
    position: relative;
    min-height: 450px;
}

.hero-slider .slide-item .post-thumbnail,
.hero-carousel .slide-item .post-thumbnail {
    position: absolute;
    inset: 0;
}

.hero-slider .slide-item .post-thumbnail img,
.hero-carousel .slide-item .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slider .slide-item .post-overlay,
.hero-carousel .slide-item .post-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 40px;
}

.hero-slider .slider-nav,
.hero-carousel .slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.hero-slider .slider-nav:hover,
.hero-carousel .slider-nav:hover {
    background: var(--primary-color);
}

.hero-slider .slider-nav.prev,
.hero-carousel .slider-nav.prev {
    left: 20px;
}

.hero-slider .slider-nav.next,
.hero-carousel .slider-nav.next {
    right: 20px;
}

.hero-slider .slider-nav svg,
.hero-carousel .slider-nav svg {
    width: 24px;
    height: 24px;
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: 2px solid #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.slider-dots .dot:hover,
.slider-dots .dot.active {
    background: #fff;
    transform: scale(1.2);
}

/* Hero Fullwidth */
.hero-fullwidth {
    position: relative;
    width: 100%;
    min-height: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: var(--spacing-xl);
}

.hero-fullwidth .post-thumbnail {
    position: absolute;
    inset: 0;
}

.hero-fullwidth .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-fullwidth .post-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px;
}

.hero-fullwidth .post-category {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    margin-bottom: 15px;
    width: fit-content;
}

.hero-fullwidth .post-title {
    font-size: 3rem;
    color: #fff;
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-fullwidth .post-title a {
    color: #fff;
}

.hero-fullwidth .post-title a:hover {
    color: var(--primary-color);
}

.hero-fullwidth .post-excerpt {
    color: rgba(255,255,255,0.85);
    font-size: 1.2rem;
    margin-bottom: 25px;
    max-width: 700px;
    line-height: 1.6;
}

.hero-fullwidth .post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

.hero-fullwidth .read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    background: var(--primary-color);
    color: #fff;
    border-radius: var(--border-radius);
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.hero-fullwidth .read-more-btn:hover {
    background: #fff;
    color: var(--primary-color);
}

/* Hero Featured (Multiple Items) */
.hero-featured {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.hero-featured .featured-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    min-height: 250px;
}

.hero-featured .featured-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 520px;
}

.hero-featured .featured-item .post-thumbnail {
    position: absolute;
    inset: 0;
}

.hero-featured .featured-item .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-featured .featured-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.hero-featured .featured-item .post-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.hero-featured .featured-item:first-child .post-overlay {
    padding: 40px;
}

.hero-featured .featured-item .post-category {
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    margin-bottom: 10px;
    width: fit-content;
}

.hero-featured .featured-item .post-title {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0;
    line-height: 1.3;
}

.hero-featured .featured-item:first-child .post-title {
    font-size: 1.8rem;
}

.hero-featured .featured-item .post-title a {
    color: #fff;
}

.hero-featured .featured-item .post-title a:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   IMPROVED: Weather Widget Styling
   ========================================================================== */
.weather-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.9);
    font-size: 0.85rem;
}

.weather-widget img {
    width: 24px;
    height: 24px;
    filter: brightness(1.2);
}

.weather-widget span {
    font-weight: 500;
}

/* ==========================================================================
   IMPROVED: Font Loading CSS Variables
   ========================================================================== */
body {
    font-family: var(--font-primary, 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif);
}

h1, h2, h3, h4, h5, h6,
.section-title,
.post-title,
.card-title,
.widget-header {
    font-family: var(--font-secondary, 'Playfair Display', Georgia, serif);
}

/* ==========================================================================
   ADDITIONAL LAYOUT VARIATIONS
   ========================================================================== */

/* Layout Style: Modern */
.layout-modern .article-card {
    border-radius: 16px;
}

.layout-modern .news-grid {
    gap: 30px;
}

.layout-modern .sidebar-widget {
    border-radius: 16px;
}

/* Layout Style: Compact */
.layout-compact .news-grid {
    gap: 12px;
}

.layout-compact .article-card .card-content {
    padding: 12px;
}

.layout-compact .article-card .card-title {
    font-size: 0.95rem;
}

/* Layout Style: Magazine */
.layout-magazine .section-header {
    background: var(--primary-color);
    padding: 12px 20px;
    border-radius: 4px;
    border-bottom: none;
}

.layout-magazine .section-title {
    color: #fff !important;
    margin-bottom: 0;
}

.layout-magazine .section-link {
    color: #fff !important;
}

/* Layout Style: Minimal */
.layout-minimal .article-card {
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.layout-minimal .sidebar-widget {
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.layout-minimal .section-header {
    border-bottom: 1px solid var(--border-color);
}

/* ==========================================================================
   RESPONSIVE FIXES
   ========================================================================== */
@media (max-width: 1200px) {
    .hero-featured {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-featured .featured-item:first-child {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 350px;
    }

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

@media (max-width: 992px) {
    .site-sidebar {
        position: static !important;
        max-height: none;
        overflow-y: visible;
    }

    .hero-featured {
        grid-template-columns: 1fr;
    }

    .hero-featured .featured-item:first-child {
        grid-column: span 1;
        min-height: 300px;
    }

    .hero-featured .featured-item {
        min-height: 200px;
    }

    .hero-fullwidth {
        min-height: 400px;
    }

    .hero-fullwidth .post-overlay {
        padding: 30px;
    }

    .hero-fullwidth .post-title {
        font-size: 2rem;
    }

    .hero-fullwidth .post-excerpt {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-slider .slide-item,
    .hero-carousel .slide-item {
        min-height: 350px;
    }

    .hero-slider .slide-item .post-overlay,
    .hero-carousel .slide-item .post-overlay {
        padding: 25px;
    }

    .hero-slider .slider-nav,
    .hero-carousel .slider-nav {
        width: 40px;
        height: 40px;
    }

    .hero-slider .slider-nav.prev,
    .hero-carousel .slider-nav.prev {
        left: 10px;
    }

    .hero-slider .slider-nav.next,
    .hero-carousel .slider-nav.next {
        right: 10px;
    }

    .hero-fullwidth {
        min-height: 350px;
    }

    .hero-fullwidth .post-title {
        font-size: 1.5rem;
    }

    .hero-fullwidth .post-excerpt {
        display: none;
    }

    .footer-contact li svg {
        width: 16px !important;
        height: 16px !important;
    }
}

/* ==========================================================================
   ANIMATION CLASSES
   ========================================================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   UTILITY IMPROVEMENTS
   ========================================================================== */

/* Better focus states for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Smooth transitions */
* {
    scroll-behavior: smooth;
}

/* Print improvements */
@media print {
    .hero-slider,
    .hero-carousel,
    .slider-nav,
    .slider-dots {
        display: none !important;
    }
}
