/**
 * © 2026 GÂRNEAȚĂ DRAGOȘ MIHAI | Arhitectură Digitală | Mai 2026 | Dezvoltat special pentru FEDERAȚIA ROMÂNĂ DE BRIDGE
 */

:root {
    --primary: #E30613; /* Sports Red */
    --secondary: #010B14; /* Deep Blue/Black */
    --accent: #FFD700; /* Gold */
    --white: #FFFFFF;
    --gray-light: #F4F7F9;
    --gray-medium: #E2E8F0;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: transform 0.3s ease, color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--white);
    background-image: url('../images/pattern.webp');
    background-repeat: repeat;
    color: var(--text-main);
    line-height: 1.6;
}

h1, h2, h3, .nav-links a {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

main.container {
    background: rgba(255, 255, 255, 0.8); /* Clean Glass White */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin-top: 3rem;
    margin-bottom: 5rem;
    padding: 3rem 2rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* --- STICKY HEADER --- */
header {
    background: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--gray-medium);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
}

.logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.logo-wrap a {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.main-nav {
    display: flex;
    align-items: center;
}

.logo-frb img {
    height: 60px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
    margin-left: 0.75rem;
    line-height: 1.2;
}

.logo-text span {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: normal;
    max-width: 250px;
}

.ans-text span {
    font-size: 0.95rem;
    font-weight: 500;
    color: #475569;
    font-family: 'Inter', sans-serif;
    text-transform: none;
    letter-spacing: 0;
}

.logo-ans img {
    height: 50px;
    width: 50px; /* Force square for cropping */
    object-fit: cover;
    object-position: left;
    transition: var(--transition);
}


.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem; /* Reduced slightly for better fit */
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap; /* Prevent wrapping */
}

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

.header-right {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 1.5rem;
}

.lang-switch {
    display: flex;
    align-items: center;
    margin-left: 2rem;
}

.mobile-lang { display: none; } /* Hide mobile-specific lang toggle on desktop */

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--secondary);
    font-weight: 700;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--gray-medium);
    border-radius: 4px;
    transition: var(--transition);
}

.lang-btn:hover {
    background: var(--gray-light);
    border-color: var(--primary);
    color: var(--primary);
}

.lang-btn img {
    width: 20px;
    height: auto;
    border-radius: 2px;
}

/* --- HERO SECTION --- */
.hero {
    height: 600px;
    background: linear-gradient(rgba(1, 11, 20, 0.6), rgba(1, 11, 20, 0.6)), url('../images/hero.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
}

.hero-content h1 {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.5rem;
    font-weight: 500;
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: 4px;
    transition: var(--transition);
}

.btn:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
}

/* --- CONTENT SECTIONS --- */
.section-title {
    margin: 4rem 0 3rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.section-title h2, .section-title h1 {
    font-size: 2.5rem;
    color: var(--secondary);
    border-left: 8px solid var(--primary);
    padding-left: 1.5rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-bottom: 5rem;
}

.news-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-medium);
}

.news-card:hover {
    transform: translateY(-10px);
}

.card-img {
    height: 200px;
    background: var(--gray-medium);
    position: relative;
    background-size: cover;
    background-position: center;
}

.card-img::after {
    content: '♠♥♦♣';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    opacity: 0.2;
    z-index: 1;
}

.card-img.has-image::after {
    display: none;
}

.card-body {
    padding: 1.5rem;
}

.card-tag {
    background: var(--primary);
    color: var(--white);
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-family: 'Oswald', sans-serif;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

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

/* --- SIDEBAR / INFO BLOCKS --- */
.pulse-wrap {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.sidebar-block {
    background: var(--gray-light);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.sidebar-block h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.5rem;
}

.info-list {
    list-style: none;
}

.info-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-medium);
}

.info-list a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: var(--transition);
}

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

/* --- FOOTER --- */
footer {
    background: var(--secondary);
    color: var(--white);
    padding: 6rem 0 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-col h4 {
    color: var(--primary);
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

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

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 3rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
}

@media (max-width: 1200px) {
    .nav-links { gap: 1.5rem; }
    .nav-links a { font-size: 0.8rem; }
    .hero-content h1 { font-size: 3.5rem; }
    .hero-content p { font-size: 1.2rem; }
}

@media (max-width: 1024px) {
    .container { padding: 0 1.5rem; }
    .header-inner { flex-direction: column; gap: 1.5rem; padding: 1rem 0; }
    .logo-wrap { justify-content: center; width: 100%; }
    .hero-content h1 { font-size: 3.5rem; }
    .pulse-wrap { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2rem; }
}

@media (max-width: 768px) {
    .header-inner { flex-direction: row; justify-content: space-between; padding: 0.8rem 0; }
    .logo-wrap { gap: 0.75rem; flex: 1; }
    .logo-frb img { height: 65px; transition: 0.3s; }
    .fed-name-text { display: block; font-size: 0.75rem; line-height: 1.1; max-width: 140px; }
    .logo-ans.header-ans { display: none !important; }
    
    /* Hamburger Menu Styles */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 1001;
        padding: 5px;
    }
    .menu-toggle span {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--secondary);
        transition: 0.3s;
        border-radius: 2px;
    }
    .menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        padding: 80px 2rem 2rem;
    }
    .main-nav.active { right: 0; }

    .nav-links { 
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
        display: flex;
    }
    .nav-links a:not(.lang-btn) { 
        font-size: 1.2rem; 
        width: 100%;
        display: block;
        padding: 0.5rem 0;
        border-bottom: 1px solid var(--gray-medium);
    }
    
    .mobile-lang .lang-btn {
        justify-content: center;
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .desktop-lang { display: none; }
    .mobile-lang { display: block; width: 100%; margin-top: 1rem; }

    .hero { 
        height: auto; 
        min-height: 80vh; 
        padding: 8rem 1.5rem 4rem; 
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .hero-content {
        width: 100%;
    }
    .hero-content h1 { 
        font-size: 2.4rem; 
        line-height: 1.1;
        margin-bottom: 1rem;
        text-shadow: 0 4px 10px rgba(0,0,0,0.6);
    }
    .hero-content p {
        font-size: 1.15rem;
        margin-bottom: 2.5rem;
        text-shadow: 0 2px 5px rgba(0,0,0,0.6);
    }
    .hero-content > div {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    .hero .btn {
        padding: 1rem;
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
    }
    
    main.container { padding: 1.5rem 1rem; border-radius: 0; margin-top: 0.5rem; }
    .section-title h2, .section-title h1 { font-size: 1.6rem; }

    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    footer { padding-bottom: 6rem; }
}

/* --- ANIMATIONS & DYNAMIC REVEAL --- */
.reveal {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.05s; }
.delay-2 { transition-delay: 0.1s; }
.delay-3 { transition-delay: 0.15s; }

@media (max-width: 768px) {
    .news-card, .sidebar-block, .section-card, .section-title {
        transition: transform 0.2s ease;
    }
    
    .news-card:active, .sidebar-block:active {
        transform: scale(0.98);
    }

    /* Make mobile scroll feel more "app-like" */
    body {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
}


/* --- ACCESSIBILITY STYLES (WCAG 2.1 AA) --- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid rgba(227, 6, 19, 0.4) !important;
    outline-offset: 2px !important;
    border-radius: 2px !important;
}

/* --- EVENT META & TEXT OVERFLOW HARDENING --- */
/* [SHADOW DOCUMENTATION]
 * CE: Reguli CSS pentru prevenirea overflow-ului pe texte lungi și URL-uri.
 * UNDE: assets/css/style.css (.event-meta)
 * DE CE: Previne ruperea layout-ului și apariția scrollbar-ului orizontal pe mobile din cauza link-urilor extrem de lungi (ex. link-uri Google Forms din detaliile evenimentelor).
 */
.event-meta {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}
.event-meta p, .event-meta span, .event-meta strong {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}
}

/* --- GLOBAL SEARCH --- */
.desktop-search-wrap {
    display: flex;
    align-items: center;
}

.global-search-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--secondary);
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid var(--gray-medium);
    border-radius: 4px;
    transition: var(--transition);
}

.global-search-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.mobile-search {
    width: 100%;
    margin-top: 1rem;
}
.mobile-search .global-search-btn {
    width: 100%;
    justify-content: center;
    padding: 0.8rem;
    font-size: 1rem;
}

/* Modal Overlay */
.global-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(1, 11, 20, 0.95);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 10vh;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.global-search-modal.visible {
    opacity: 1;
}

.search-modal-content {
    width: 90%;
    max-width: 800px;
    position: relative;
}

.close-search-btn {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

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

.search-input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
}

.search-icon-large {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: var(--text-muted);
}

#global-search-input {
    width: 100%;
    padding: 20px 20px 20px 70px;
    font-size: 1.5rem;
    font-family: 'Inter', sans-serif;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    outline: none;
    transition: var(--transition);
}

#global-search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(227, 6, 19, 0.3);
}

#global-search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Results */
.global-search-results {
    background: var(--white);
    border-radius: 12px;
    max-height: 60vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.search-placeholder-text, .search-loading, .search-no-results, .search-error {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.search-result-item {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-medium);
    text-decoration: none;
    transition: background 0.2s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--gray-light);
}

.search-result-type {
    display: inline-block;
    padding: 3px 8px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--white);
    border-radius: 4px;
    margin-bottom: 0.5rem;
    align-self: flex-start;
}

.search-result-type.pagină { background: #3b82f6; }
.search-result-type.știre { background: var(--primary); }
.search-result-type.document { background: #10b981; }
.search-result-type.eveniment { background: #f59e0b; }
.search-result-type.rezultat { background: #8b5cf6; }

.search-result-content h4 {
    color: var(--secondary);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.search-result-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

@media (max-width: 768px) {
    #global-search-input {
        font-size: 1.2rem;
        padding: 15px 15px 15px 50px;
    }
    .search-icon-large {
        font-size: 1.5rem;
        left: 15px;
    }
    .close-search-btn {
        top: -40px;
        font-size: 2.5rem;
    }
}


