/* ==========================================================================
   BIBLIOTECA DIGITALĂ & EVENIMENTE - STILURI PRINCIPALE & RESPONSIVE
   ========================================================================== */

/* --- Reset & Variabile Globale --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary: #0f172a;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-border: #e2e8f0;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
    font-family: 'Plus Jakarta Sans', var(--font-sans);
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

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

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

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

.site-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header & Navigație --- */
.site-header {
    background-color: var(--surface);
    border-bottom: 1px solid var(--surface-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

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

.site-branding {
    display: flex;
    align-items: center;
}

.site-title-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--secondary);
}

.logo-icon {
    font-size: 1.6rem;
}

.main-navigation .nav-menu-list {
    display: flex;
    list-style: none;
    gap: 24px;
}

.nav-menu-list a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 0;
    position: relative;
}

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

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

.btn-header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f1f5f9;
    border: 1px solid var(--surface-border);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 40px;
}

.btn-header-search:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

.header-auth-zone {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-auth-trigger {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-height: 40px;
}

.btn-header-login {
    background: transparent;
    color: var(--text-main);
}
.btn-header-login:hover {
    background: #f1f5f9;
}

.btn-header-register {
    background: var(--primary);
    color: #ffffff;
}
.btn-header-register:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.user-profile-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    padding: 6px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-border);
}

.user-greeting {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-avatar-dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
}

.btn-logout {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    padding: 4px;
}
.btn-logout:hover {
    color: var(--danger);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: #f1f5f9;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--secondary);
    border-radius: 2px;
    transition: all 0.2s ease;
}

/* --- Mobile Nav Drawer (Off-Canvas) --- */
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-nav-drawer.open {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
}

.mobile-drawer-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 85%;
    max-width: 340px;
    height: 100%;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
    z-index: 2;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 24px;
    overflow-y: auto;
}

.mobile-nav-drawer.open .mobile-drawer-content {
    transform: translateX(0);
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--surface-border);
}

.btn-drawer-close {
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    color: var(--secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 30px;
}

.mobile-menu-list a {
    display: block;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: var(--radius-md);
    color: var(--secondary);
    font-size: 1rem;
    font-weight: 700;
}

.mobile-menu-list a:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.mobile-drawer-auth {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-mobile-login, .btn-mobile-register, .btn-mobile-action {
    width: 100%;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    cursor: pointer;
    border: none;
    display: block;
}

.btn-mobile-login {
    background: #f1f5f9;
    color: var(--secondary);
}

.btn-mobile-register, .btn-mobile-action {
    background: var(--primary);
    color: #ffffff;
}

.btn-mobile-logout {
    display: block;
    text-align: center;
    padding: 8px;
    color: var(--danger);
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 6px;
}

/* --- Global Search Bar Dropdown --- */
.global-search-bar {
    background: #0f172a;
    padding: 16px 0;
    border-bottom: 1px solid #1e293b;
    position: relative;
    z-index: 99;
}

.global-search-bar.hidden {
    display: none;
}

.global-search-form {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: #1e293b;
    border-radius: var(--radius-md);
    padding: 6px 12px;
    border: 1px solid #334155;
}

.search-input-wrapper .search-icon {
    color: #94a3b8;
    margin-right: 10px;
}

.search-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
}

.btn-search-submit {
    background: var(--primary);
    color: #ffffff;
    border: none;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    margin-left: 10px;
}

.btn-search-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    margin-left: 10px;
}

.live-search-preview {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--surface-border);
    max-height: 380px;
    overflow-y: auto;
    z-index: 1000;
    padding: 12px;
}

.live-search-preview.hidden {
    display: none;
}

/* --- Portal Homepage Styles --- */
.portal-hero-section {
    background: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    padding: clamp(50px, 8vw, 90px) 0 clamp(40px, 6vw, 80px);
    text-align: center;
}

.portal-hero-container {
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

.hero-title {
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, #60a5fa 0%, #c084fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: #94a3b8;
    margin-bottom: 38px;
    line-height: 1.6;
}

.portal-hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.section-portal-events {
    padding: 60px 0;
}

.section-header-flex {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-subheading {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
    margin-bottom: 4px;
}

.section-heading {
    font-size: clamp(1.5rem, 3.5vw, 1.85rem);
    font-weight: 800;
    color: var(--secondary);
}

.section-heading-sm {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-portal-library {
    padding: 40px 0 70px;
}

.portal-library-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 5vw, 50px);
    color: #ffffff;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 36px;
    align-items: center;
    box-shadow: var(--shadow-lg);
}

.library-card-title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    margin: 8px 0 16px;
}

.library-card-desc {
    color: #cbd5e1;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 24px;
}

.library-card-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.lib-feat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #e2e8f0;
}

.visual-book-stack {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.stack-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 3.5rem;
    padding: 30px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

/* --- Modul Evenimente & Catalog Evenimente --- */
.events-archive-main {
    padding: 40px 0 60px;
}

.front-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.front-cat-filter {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
}

.front-cat-filter:hover, .front-cat-filter.active {
    background: var(--secondary);
    color: #ffffff;
    border-color: var(--secondary);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.event-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.event-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0f172a;
    overflow: hidden;
}

.event-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.event-card:hover .event-card-img {
    transform: scale(1.04);
}

.event-date-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(4px);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    line-height: 1.1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.event-date-badge .day {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
}

.event-date-badge .month {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
}

.event-card-price {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 800;
}

.event-card-price.free {
    background: var(--success);
    color: #ffffff;
}

.event-card-price.paid {
    background: var(--primary);
    color: #ffffff;
}

.event-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.event-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.event-card-title {
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 8px;
}

.event-card-title a {
    color: var(--secondary);
}

.event-card-speaker {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.event-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.event-card-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.btn-event-details {
    display: block;
    text-align: center;
    background: #f8fafc;
    border: 1px solid var(--surface-border);
    color: var(--secondary);
    font-weight: 700;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    min-height: 42px;
}

.btn-event-details:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* --- Single Event Landing Page --- */
.event-landing-main {
    padding-bottom: 70px;
}

.event-hero-banner {
    background-color: #0f172a;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: clamp(40px, 6vw, 70px) 0;
    border-bottom: 1px solid #1e293b;
}

.event-hero-container {
    max-width: 960px;
}

.event-hero-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.event-cat-badge, .event-type-badge {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.event-cat-badge {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.event-type-badge {
    background: #334155;
    color: #e2e8f0;
}

.event-price-pill {
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 800;
}

.event-price-pill.free {
    background: var(--success);
    color: #ffffff;
}

.event-price-pill.paid {
    background: var(--primary);
    color: #ffffff;
}

.event-hero-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
}

.event-hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #cbd5e1;
    margin-bottom: 24px;
    line-height: 1.5;
}

.event-quick-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.info-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    padding: 8px 14px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.event-body-layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 36px;
    margin-top: 36px;
    align-items: start;
}

.event-card-section {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 4vw, 28px);
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.event-rich-description {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #334155;
}

.speaker-card {
    display: flex;
    gap: 16px;
    align-items: center;
    background: #f8fafc;
}

.speaker-avatar-circle {
    font-size: 2.2rem;
    background: #ffffff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--surface-border);
    flex-shrink: 0;
}

.speaker-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-light);
}

.speaker-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--secondary);
}

.speaker-role {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.event-agenda-box {
    background: #f8fafc;
    padding: 16px;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #334155;
}

/* Sticky Booking Card */
.booking-sticky-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: clamp(20px, 4vw, 28px);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 90px;
}

.booking-card-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--surface-border);
}

.booking-price-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.price-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-muted);
}

.price-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
}

.seats-counter-bar {
    margin-top: 8px;
    font-size: 0.85rem;
    color: #15803d;
    background: #f0fdf4;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
}

.event-booking-form .form-group {
    margin-bottom: 14px;
}

.tickets-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    background: #f8fafc;
    font-weight: 600;
    min-height: 44px;
}

.total-price-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #eff6ff;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    margin: 16px 0;
    font-weight: 700;
}

.total-price-summary strong {
    font-size: 1.3rem;
    color: var(--primary);
}

.btn-book-submit {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    min-height: 48px;
}

.btn-book-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.stripe-guarantee-note {
    font-size: 0.75rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 12px;
}

.stripe-success-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}

.stripe-success-banner .success-icon {
    font-size: 2.2rem;
}

.stripe-success-banner h3 {
    color: #15803d;
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.stripe-success-banner p {
    color: #166534;
    font-size: 0.9rem;
}

/* --- Șabloane Pagini --- */
.page-narrow-container {
    max-width: 860px;
    padding-top: 40px;
    padding-bottom: 60px;
}

.page-header-standard {
    margin-bottom: 30px;
}

.page-main-heading {
    font-size: clamp(2rem, 5vw, 2.5rem);
    font-weight: 800;
    color: var(--secondary);
    line-height: 1.2;
    margin-bottom: 10px;
}

.page-lead-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
}

.page-featured-image-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--shadow-sm);
}

.page-body-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
}

.page-body-content p {
    margin-bottom: 20px;
}

.page-body-content h2, .page-body-content h3 {
    color: var(--secondary);
    margin: 30px 0 14px;
    font-weight: 800;
}

/* --- Catalog Cărți Grid & Filtre --- */
.catalog-page-main {
    padding: 40px 0 60px;
}

.catalog-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

.catalog-page-title {
    font-size: clamp(1.8rem, 4vw, 2.25rem);
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 4px;
}

.catalog-page-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Buton mobil pentru filtre */
.btn-mobile-filters-toggle {
    display: none;
    align-items: center;
    gap: 8px;
    background: #0f172a;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    min-height: 44px;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

.catalog-sidebar .filter-card {
    background: var(--surface);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 90px;
}

.filter-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--surface-border);
}

.filter-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
}

.btn-reset-filters {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px;
}

.filter-group {
    margin-bottom: 18px;
}

.filter-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 6px;
}

.filter-input-wrap {
    position: relative;
}

.filter-input-wrap input, .filter-select, .filter-input-number {
    width: 100%;
    padding: 11px 12px;
    background: #f8fafc;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none;
    min-height: 44px;
}

.filter-input-wrap input:focus, .filter-select:focus, .filter-input-number:focus {
    border-color: var(--primary);
    background: #ffffff;
}

.filter-input-wrap .input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    opacity: 0.6;
}

.catalog-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-border);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.results-count {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.sort-select {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border);
    background: #f8fafc;
    font-weight: 600;
    outline: none;
    min-height: 38px;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 10;
    border-radius: var(--radius-lg);
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.no-books-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--surface-border);
}

.no-books-icon {
    font-size: 3rem;
    margin-bottom: 12px;
}

.catalog-pagination-wrapper {
    margin-top: 36px;
    display: flex;
    justify-content: center;
}

.pagination-ajax {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--surface-border);
    background: var(--surface);
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 40px;
    min-width: 40px;
}

.page-btn:hover {
    background: #f1f5f9;
}

.page-btn.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

.page-dots {
    color: var(--text-light);
    padding: 0 4px;
}

/* Grilă Cărți */
.books-grid {
    display: grid;
    gap: 24px;
}

.grid-4-cols {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.grid-3-cols {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.book-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.book-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.book-cover-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #e2e8f0;
    overflow: hidden;
}

.book-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.book-card:hover .book-cover-img {
    transform: scale(1.03);
}

.badge-pdf {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
}

.badge-lock {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: #fbbf24;
    padding: 6px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.book-info {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.book-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.category-pill {
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--primary-light);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
}

.book-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 6px;
}

.book-title a {
    color: var(--secondary);
}

.book-author {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.book-meta-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
}

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

.pdf-search-snippet {
    background: #fffbeb;
    border-left: 3px solid var(--accent);
    padding: 8px 10px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.8rem;
    margin: 10px 0;
}

.snippet-label {
    font-weight: 700;
    color: #b45309;
    display: block;
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.snippet-text {
    color: #78350f;
    line-height: 1.4;
}

.pdf-highlight {
    background: #fef08a;
    font-weight: 700;
    padding: 1px 3px;
    border-radius: 2px;
}

.btn-read-book {
    display: block;
    text-align: center;
    background: #f8fafc;
    border: 1px solid var(--surface-border);
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 9px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    min-height: 40px;
}

.btn-read-book:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}

/* --- Features Section --- */
.section-features {
    padding: 50px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    padding: clamp(20px, 4vw, 30px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
}

.feature-icon-wrapper {
    font-size: 2.2rem;
    margin-bottom: 14px;
}

.feature-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 8px;
}

.feature-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Single Book Details Page --- */
.single-book-main {
    padding: 30px 0 60px;
}

.book-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.bc-sep {
    color: var(--text-light);
}

.bc-current {
    color: var(--secondary);
    font-weight: 600;
}

.book-hero-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    padding: clamp(20px, 4vw, 32px);
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    margin-bottom: 36px;
    box-shadow: var(--shadow-sm);
}

.book-hero-cover {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 2 / 3;
}

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

.book-hero-details {
    display: flex;
    flex-direction: column;
}

.book-tax-pills {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.book-main-title {
    font-size: clamp(1.8rem, 4vw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--secondary);
    margin-bottom: 8px;
}

.book-author-line {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.book-author-line strong a {
    color: var(--secondary);
}

.book-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
    background: #f8fafc;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--surface-border);
    margin-bottom: 28px;
}

.meta-box-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
}

.meta-box-val {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--secondary);
}

.book-actions-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    flex-wrap: wrap;
}

.btn-action-primary, .btn-action-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    min-height: 44px;
}

.btn-action-primary {
    background: var(--primary);
    color: #ffffff;
}
.btn-action-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-action-secondary {
    background: #f1f5f9;
    color: var(--secondary);
    border: 1px solid var(--surface-border);
}
.btn-action-secondary:hover {
    background: #e2e8f0;
}

.book-synopsis-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    padding: clamp(20px, 4vw, 28px);
    margin-bottom: 36px;
}

.book-content-text {
    color: #334155;
    font-size: 1rem;
    line-height: 1.7;
}

.pdf-reader-wrapper {
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--surface-border);
    padding: clamp(16px, 3vw, 28px);
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
}

.reader-locked-gate {
    text-align: center;
    padding: clamp(30px, 6vw, 50px) 16px;
    max-width: 600px;
    margin: 0 auto;
}

.locked-icon-wrapper {
    width: 70px;
    height: 70px;
    background: #fef2f2;
    color: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.locked-title {
    font-size: clamp(1.3rem, 3.5vw, 1.6rem);
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 12px;
}

.locked-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

.locked-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-primary-large, .btn-secondary-large {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    min-height: 48px;
}

.btn-primary-large {
    background: var(--primary);
    color: #ffffff;
}
.btn-primary-large:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary-large {
    background: var(--secondary);
    color: #ffffff;
}
.btn-secondary-large:hover {
    background: #1e293b;
    color: #ffffff;
}

/* --- Auth Modal --- */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    padding: 16px;
}

.auth-modal.open {
    opacity: 1;
    visibility: visible;
}

.auth-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
}

.auth-modal-content {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: var(--radius-lg);
    padding: clamp(20px, 5vw, 32px);
    box-shadow: var(--shadow-lg);
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.25s ease;
}

.auth-modal.open .auth-modal-content {
    transform: translateY(0);
}

.auth-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: #f1f5f9;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-logo-badge {
    font-size: 2.2rem;
    margin-bottom: 6px;
}

.auth-modal-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 4px;
}

.auth-modal-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-tabs {
    display: flex;
    background: #f1f5f9;
    padding: 4px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.auth-tab-btn {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    min-height: 40px;
}

.auth-tab-btn.active {
    background: #ffffff;
    color: var(--secondary);
    box-shadow: var(--shadow-sm);
}

.auth-form-panel {
    display: none;
}

.auth-form-panel.active {
    display: block;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 6px;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    outline: none;
    background: #f8fafc;
    min-height: 44px;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    background: #ffffff;
}

.btn-auth-submit {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
    min-height: 48px;
}

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

.auth-notice-msg {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.auth-notice-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.auth-notice-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10001;
    max-width: calc(100% - 40px);
}

.toast-item {
    background: #0f172a;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: slideInToast 0.3s ease;
}

@keyframes slideInToast {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Footer */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: clamp(40px, 6vw, 60px) 0 30px;
    margin-top: 60px;
    border-top: 1px solid #1e293b;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 12px;
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
}

.footer-links a {
    color: #94a3b8;
}
.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #1e293b;
    font-size: 0.85rem;
    color: #64748b;
}

/* --- Responsivitate & Mobile Breakpoints --- */
@media (max-width: 992px) {
    .catalog-layout, .event-body-layout, .portal-library-card {
        grid-template-columns: 1fr;
    }
    .booking-sticky-card {
        position: static;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .book-hero-card {
        grid-template-columns: 1fr;
    }
    .book-hero-cover {
        max-width: 260px;
        margin: 0 auto;
    }
    .btn-mobile-filters-toggle {
        display: inline-flex;
    }
    /* Catalog Sidebar Mobile Accordion / Drawer */
    .catalog-sidebar {
        display: none;
    }
    .catalog-sidebar.mobile-open {
        display: block;
        animation: fadeIn 0.25s ease;
    }
    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
    .mobile-menu-toggle {
        display: flex;
    }
    .header-actions .btn-header-search .search-label {
        display: none;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .portal-hero-buttons .btn-primary-large, .portal-hero-buttons .btn-secondary-large {
        width: 100%;
    }
    .book-actions-bar .btn-action-primary, .book-actions-bar .btn-action-secondary {
        width: 100%;
    }
    .locked-cta-buttons .btn-primary-large, .locked-cta-buttons .btn-secondary-large {
        width: 100%;
    }
    .toast-container {
        left: 20px;
        right: 20px;
    }
}
