/* =============================================
   Punctul pe Transilvania - Personalizare
   Modal de preferinte + Feed personalizat
   ============================================= */

/* --- Overlay Modal --- */
#punctult-prefs-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: punctult-fadeIn 0.3s ease;
}

@keyframes punctult-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#punctult-prefs-modal {
    background: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: punctult-slideUp 0.3s ease;
}

@keyframes punctult-slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

/* --- Modal Header --- */
.punctult-modal-header {
    padding: 32px 32px 16px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.punctult-modal-logo {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.punctult-modal-header h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 8px;
    line-height: 1.3;
}

.punctult-modal-header p {
    font-size: 14px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* --- Modal Body --- */
.punctult-modal-body {
    padding: 24px 32px;
}

.punctult-section {
    margin-bottom: 24px;
}

.punctult-section:last-child {
    margin-bottom: 0;
}

.punctult-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a365d;
    margin: 0 0 4px;
}

.punctult-hint {
    font-size: 13px;
    color: #94a3b8;
    margin: 0 0 12px;
}

/* --- Chips (selectabile) --- */
.punctult-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.punctult-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 24px;
    font-size: 14px;
    color: #475569;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.punctult-chip:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.punctult-chip.selected {
    border-color: #d4a017;
    background: #fef9e7;
    color: #92400e;
    font-weight: 500;
}

.punctult-chip.selected::before {
    content: '\2713 ';
    margin-right: 4px;
    font-weight: 700;
}

/* --- Modal Footer --- */
.punctult-modal-footer {
    padding: 16px 32px 8px;
    display: flex;
    gap: 12px;
    justify-content: center;
    border-top: 1px solid #eee;
}

.punctult-btn-primary {
    background: #1a365d;
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.punctult-btn-primary:hover {
    background: #2d4a7a;
}

.punctult-btn-secondary {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
}

.punctult-btn-secondary:hover {
    background: #f1f5f9;
    color: #475569;
}

.punctult-skip-link {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    color: #94a3b8;
    font-size: 13px;
    background: none;
    border: none;
    cursor: pointer;
}

.punctult-skip-link:hover {
    color: #64748b;
}

/* --- Floating Preferences Pill Button --- */
#punctult-prefs-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99999;
    height: 44px;
    border-radius: 22px;
    background: #ffffff;
    color: #1a365d;
    border: 1.5px solid #d4a017;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(212, 160, 23, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    transition: all 0.25s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: calc(100vw - 40px);
    white-space: nowrap;
}

#punctult-prefs-toggle:hover {
    background: #fef9e7;
    border-color: #b8860b;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(212, 160, 23, 0.25);
    transform: translateY(-2px);
}

#punctult-prefs-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.punctult-toggle-icon-sliders {
    flex-shrink: 0;
    color: #d4a017;
}

.punctult-toggle-label {
    font-size: 13px;
    font-weight: 600;
    color: #1a365d;
    flex-shrink: 0;
}

.punctult-toggle-text {
    font-size: 13px;
    font-weight: 400;
    color: #4a5568;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.punctult-toggle-icon-edit {
    flex-shrink: 0;
    color: #d4a017;
    opacity: 0.7;
    transition: opacity 0.2s;
}

#punctult-prefs-toggle:hover .punctult-toggle-icon-edit {
    opacity: 1;
}

/* Bounce animation for first visit */
@keyframes punctult-bounce {
    0%, 100% { transform: translateY(0); }
    15% { transform: translateY(-8px); }
    30% { transform: translateY(0); }
    45% { transform: translateY(-5px); }
    60% { transform: translateY(0); }
    75% { transform: translateY(-2px); }
    90% { transform: translateY(0); }
}

#punctult-prefs-toggle.punctult-bounce {
    animation: punctult-bounce 1.5s ease-in-out;
}

/* Mobile responsive */
@media (max-width: 600px) {
    #punctult-prefs-toggle {
        bottom: 12px;
        left: 12px;
        height: 40px;
        padding: 0 12px;
        gap: 6px;
        max-width: calc(100vw - 24px);
    }
    .punctult-toggle-label {
        display: none;
    }
    .punctult-toggle-text {
        font-size: 12px;
        max-width: 180px;
    }
}

/* --- Personalized Feed Section --- */
#punctult-personalized-feed {
    max-width: 1170px;
    margin: 0 auto;
    padding: 20px 15px;
}

.punctult-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 3px solid #d4a017;
}

.punctult-feed-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #1a365d;
    margin: 0;
}

.punctult-feed-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.punctult-feed-tag {
    font-size: 11px;
    padding: 3px 10px;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 12px;
}

.punctult-feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 768px) {
    .punctult-feed-grid {
        grid-template-columns: 1fr;
    }
    #punctult-prefs-modal {
        max-height: 90vh;
    }
    .punctult-modal-header,
    .punctult-modal-body,
    .punctult-modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .punctult-feed-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.punctult-feed-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s;
}

.punctult-feed-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.punctult-feed-card a {
    text-decoration: none;
    color: inherit;
}

.punctult-feed-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.punctult-feed-card-body {
    padding: 16px;
}

.punctult-feed-card-cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #d4a017;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    display: inline-block;
}

.punctult-feed-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a365d;
    line-height: 1.4;
    margin: 0 0 8px;
}

.punctult-feed-card-excerpt {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 8px;
}

.punctult-feed-card-date {
    font-size: 12px;
    color: #94a3b8;
}

.punctult-feed-empty {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
    font-size: 15px;
}

.punctult-feed-loading {
    text-align: center;
    padding: 40px;
    color: #94a3b8;
}

.punctult-feed-loading::after {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e2e8f0;
    border-top-color: #1a365d;
    border-radius: 50%;
    animation: punctult-spin 0.8s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

@keyframes punctult-spin {
    to { transform: rotate(360deg); }
}

/* =============================================
   Hero Compact - Layout asemanator stiridecluj
   Stanga: slider automat | Dreapta: fix
   ============================================= */

/* Reducem inaltimea hero-ului */
.jeg_heroblock.jeg_heroblock_1.punctult-hero-compact {
    height: 450px !important;
    max-height: 450px !important;
    overflow: hidden;
}

/* Dezactivam TinySlider - facem containerul static */
.punctult-hero-compact .tns-outer,
.punctult-hero-compact .tns-inner {
    height: 450px !important;
    overflow: hidden !important;
}

.punctult-hero-compact .jeg_hero_wrapper.tns-slider {
    transform: none !important;
    transition: none !important;
    width: 100% !important;
}

/* Ascundem controlul TinySlider */
.punctult-hero-compact .tns-controls,
.punctult-hero-compact .tns-nav {
    display: none !important;
}

/* Fiecare slide wrapper - doar primul vizibil */
.punctult-hero-compact .jeg_heroblock_wrapper {
    display: none !important;
    height: 450px !important;
}

.punctult-hero-compact .jeg_heroblock_wrapper.punctult-active-slide {
    display: flex !important;
    width: 100% !important;
    position: relative !important;
}

/* Zona STANGA - slider auto (articolul mare) */
.punctult-hero-compact .punctult-hero-left {
    position: relative;
    width: 58%;
    height: 450px;
    overflow: hidden;
    flex-shrink: 0;
}

.punctult-hero-compact .punctult-hero-left article {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    transition: opacity 0.8s ease-in-out !important;
    /* opacity and z-index managed via inline styles in JS */
}

/* Zona DREAPTA - fixa (3 articole: 1 medie + 2 mici) */
.punctult-hero-compact .punctult-hero-right {
    width: 42%;
    height: 450px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-shrink: 0;
}

.punctult-hero-compact .punctult-hero-right .punctult-right-top {
    height: 55%;
    position: relative;
    overflow: hidden;
}

.punctult-hero-compact .punctult-hero-right .punctult-right-top article {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

.punctult-hero-compact .punctult-hero-right .punctult-right-bottom {
    height: 45%;
    display: flex;
    gap: 4px;
}

.punctult-hero-compact .punctult-hero-right .punctult-right-bottom article {
    width: 50%;
    height: 100%;
    position: relative !important;
    overflow: hidden;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
}

/* Ajustari tipografie pentru hero compact */
.punctult-hero-compact .jeg_hero_item_1 .jeg_post_title {
    font-size: 22px !important;
    line-height: 1.3 !important;
}

.punctult-hero-compact .jeg_hero_item_2 .jeg_post_title {
    font-size: 15px !important;
    line-height: 1.3 !important;
}

.punctult-hero-compact .jeg_hero_item_3 .jeg_post_title,
.punctult-hero-compact .jeg_hero_item_4 .jeg_post_title {
    font-size: 13px !important;
    line-height: 1.3 !important;
}

/* Sageti navigare slider stanga */
.punctult-hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.2s ease;
}

.punctult-hero-compact .punctult-hero-left:hover .punctult-hero-arrow {
    opacity: 1;
}

.punctult-hero-arrow:hover {
    background: rgba(0, 0, 0, 0.7);
}

.punctult-hero-arrow-left {
    left: 12px;
}

.punctult-hero-arrow-right {
    right: 12px;
}

/* Gap intre stanga si dreapta */
.punctult-hero-compact .punctult-hero-left {
    margin-right: 4px;
}

/* =============================================
   Logo deasupra navigare (stil stiridecluj)
   ============================================= */

/* Container logo bar - desktop */
.punctult-logo-bar {
    background: #fff;
    border-bottom: 1px solid #eee;
}

.punctult-logo-container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 15px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Logo mare pe desktop */
.punctult-logo-bar .jeg_nav_item.jeg_desktop_logo {
    display: block !important;
}

.punctult-logo-bar .jeg_logo_img {
    max-height: 120px !important;
    width: auto !important;
    height: auto !important;
}

/* Navbar fara logo - centram meniul */
.punctult-nav-no-logo .jeg_nav_row {
    justify-content: center !important;
}

/* Mobile logo - ocupa tot spatiul disponibil */
.jeg_navbar_mobile .jeg_nav_row {
    align-items: center !important;
}

.jeg_navbar_mobile .jeg_nav_col.jeg_nav_left {
    display: flex !important;
    align-items: center !important;
}

.jeg_navbar_mobile .jeg_mobile_logo {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 0 !important;
}

.jeg_navbar_mobile .jeg_mobile_logo .site-title {
    width: 100% !important;
    text-align: center !important;
}

.jeg_navbar_mobile .jeg_mobile_logo .site-title a {
    display: block !important;
}

.jeg_navbar_mobile .jeg_mobile_logo .jeg_logo_img {
    max-width: 200px !important;
    max-height: 40px !important;
    width: auto !important;
    height: auto !important;
    margin: 0 auto !important;
    display: block !important;
}

/* Responsive */
@media (max-width: 768px) {
    .punctult-hero-compact .punctult-hero-left,
    .punctult-hero-compact .punctult-hero-right {
        width: 100% !important;
    }
    .punctult-hero-compact .jeg_heroblock_wrapper.punctult-active-slide {
        flex-direction: column !important;
    }
    .punctult-hero-compact .punctult-hero-left {
        height: 250px;
        margin-right: 0;
        margin-bottom: 4px;
    }
    .punctult-hero-compact .punctult-hero-right {
        height: 200px;
    }
    .jeg_heroblock.jeg_heroblock_1.punctult-hero-compact {
        height: auto !important;
        max-height: none !important;
    }
}