 /* ==============================================
           1. VARIABILE SI SETARI GENERALE
           ============================================== */
        :root {
            --bg-color: #f0f4f8;        
            --card-bg: #ffffff;         
            --text-main: #1e293b;       
            --text-muted: #64748b;      
            --primary: #3b82f6;         
            --primary-hover: #eff6ff;   
            --accent: #f97316; 
            --border-color: #e2e8f0;    
            --radius: 16px;             
        }

        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }
        body { background-color: var(--bg-color); color: var(--text-main); line-height: 1.6; display: flex; flex-direction: column; min-height: 100vh;}
        a { text-decoration: none; color: inherit; }
        ul { list-style: none; }

        /* ==============================================
           2. HEADER & MENIU PRINCIPAL
           ============================================== */
        .header-container { position: sticky; top: 0; z-index: 1000000; background: var(--card-bg); box-shadow: 0 4px 20px rgba(0,0,0,0.03); }
        .navbar { padding: 15px 40px; display: flex; justify-content: space-between; align-items: center; background: var(--card-bg); position: relative; z-index: 101; }
        .brand { font-size: 28px; font-weight: 700; letter-spacing: -0.5px; display: flex; align-items: center; gap: 5px; }
        .brand span:nth-child(1) { color: #005bb5; } 
        .brand span:nth-child(2) { color: #e3001b; } 
        .brand span:nth-child(3) { color: #ffcc00; } 
        .brand .dot { color: #cbd5e1; font-size: 20px; }
        .brand .ro { color: var(--text-main); font-size: 24px;}
        .mobile-toggle { display: none; background: none; border: none; font-size: 26px; color: var(--text-main); cursor: pointer; padding: 5px; }

        .categories-menu { padding: 15px 40px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; background: rgba(255, 255, 255, 0.95); border-top: 1px solid var(--border-color); }
        .chip { background: var(--bg-color); border: 1px solid transparent; padding: 8px 20px; border-radius: 20px; font-size: 14px; font-weight: 500; color: var(--text-muted); transition: all 0.2s; cursor: pointer; display: inline-block; margin: 0; }
        .chip:hover, .chip.active { background: var(--primary); color: white; transform: translateY(-2px); box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2); }

        /* ==============================================
           3. DESIGN HOMEPAGE (Prima pagina rou.ro)
           ============================================== */
        .main-content {
            flex: 1;
            padding: 30px 40px 60px;
            max-width: 1600px;
            margin: 0 auto;
            width: 100%;
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 25px;
        }

        .bento-card { background: var(--card-bg); border-radius: var(--radius); padding: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); border: 1px solid #f1f5f9; transition: transform 0.3s ease, box-shadow 0.3s ease; }
        .bento-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(59, 130, 246, 0.1); }
        .card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px dashed var(--border-color); }
        .card-header i { background: var(--primary-hover); color: var(--primary); width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 18px; }
        .card-header h2, .card-header h2 a { font-size: 18px; font-weight: 600; color: var(--text-main); }
        .link-list { list-style: none; }
        .link-list li { margin-bottom: 8px; }
        .link-list a { display: flex; align-items: center; justify-content: space-between; padding: 10px 15px; border-radius: 8px; color: var(--text-muted); font-size: 14px; transition: all 0.2s; }
        .link-list a i { font-size: 12px; opacity: 0; transform: translateX(-10px); transition: all 0.2s; }
        .link-list a:hover { background: var(--primary-hover); color: var(--primary); font-weight: 500; }
        .link-list a:hover i { opacity: 1; transform: translateX(0); }

        /* ==============================================
           4. DESIGN SUBDOMENII (Ex: harta.rou.ro)
           ============================================== */
        .page-container { max-width: 1600px; margin: 0 auto; padding: 20px 40px 60px; width: 100%; flex: 1; }
        .breadcrumb { font-size: 14px; color: var(--text-muted); margin-bottom: 30px; display: flex; align-items: center; gap: 8px; }
        .breadcrumb a { color: var(--primary); font-weight: 500; }
        
        .layout-grid { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; }

        /* Sidebar Filtre */
        .sidebar-widget { margin-bottom: 35px; }
        .widget-title { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); font-weight: 700; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
        .widget-title i { color: var(--accent); font-size: 14px; }
        .widget-list { display: flex; flex-direction: column; gap: 6px; }
        .widget-list a { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; color: var(--text-main); font-weight: 500; font-size: 14px; transition: all 0.2s ease; }
        .widget-list a i { font-size: 12px; opacity: 0; transform: translateX(-10px); transition: all 0.2s ease; color: var(--primary); }
        .widget-list a:hover { background: var(--primary-hover); border-color: var(--primary); color: var(--primary); box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1); transform: translateX(4px); }
        .widget-list a:hover i { opacity: 1; transform: translateX(0); }
        
        /* Titlu Principal Pagina Interioara */
        .main-title { text-align: center; position: relative; margin-bottom: 30px; font-weight: 600; color: var(--accent); font-size: 22px; }
        .main-title::before { content: ""; position: absolute; top: 50%; left: 0; right: 0; border-top: 1px solid var(--border-color); z-index: 1; }
        .main-title span { background-color: var(--bg-color); padding: 0 20px; position: relative; z-index: 2; }

        /* Toolbar & Paginare */
        .toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; flex-wrap: wrap; gap: 20px; }
        .pagination { display: flex; gap: 8px; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; }
        .pagination li, .pagination a, .pagination span { display: flex; justify-content: center; align-items: center; min-width: 38px; height: 38px; padding: 0 10px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--text-main); transition: all 0.2s; cursor: pointer; text-decoration: none; }
        .pagination a:hover { background: #f8fafc; border-color: #cbd5e1; }
        .pagination .active a, .pagination .active span, .page-item.active { background: var(--accent); color: white; border-color: var(--accent); box-shadow: 0 4px 10px rgba(249, 115, 22, 0.2); }

        /* Meniuri de Sortare */
        .sorting-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;margin-left: auto;  }
        .sort-label { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-right: 5px; }
        .dropdown-wrapper { position: relative; display: inline-block; z-index: 10; }
        .sort-btn { display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 20px; font-size: 13px; font-weight: 600; color: var(--text-main); cursor: pointer; transition: all 0.2s; }
        .sort-btn i.fa-angle-down { color: var(--text-muted); margin-left: 4px; transition: transform 0.2s; }
        .dropdown-wrapper:hover .sort-btn { border-color: var(--primary); color: var(--primary); background: var(--primary-hover); }
        .dropdown-wrapper:hover .sort-btn i.fa-angle-down { transform: rotate(180deg); color: var(--primary); }

        .dropdown-menu { position: absolute; top: 100%; left: 0; margin-top: 10px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); padding: 8px; min-width: 180px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.3s ease; }
        .dropdown-wrapper:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
        .dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 15px; color: var(--text-main); font-size: 13px; font-weight: 500; border-radius: 8px; transition: background 0.2s; white-space: nowrap; }
        .dropdown-item i { width: 16px; text-align: center; color: var(--text-muted); }
        .dropdown-item:hover { background: var(--primary-hover); color: var(--primary); }
        .dropdown-item:hover i { color: var(--primary); }

        .letter-menu { width: 280px; padding: 15px; }
        .letter-menu-title { font-size: 12px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; margin-bottom: 10px; text-align: center; border-bottom: 1px solid var(--border-color); padding-bottom: 8px; }
        .letters-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
        .letters-grid a { display: flex; justify-content: center; align-items: center; height: 35px; background: var(--bg-color); border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--text-main); transition: all 0.2s; border: 1px solid transparent; }
        .letters-grid a:hover { background: var(--primary); color: white; transform: scale(1.1); box-shadow: 0 4px 10px rgba(59,130,246,0.3); }

        .reset-btn { display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: #fef2f2; border: 1px solid #fecaca; color: #ef4444; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
        .reset-btn:hover { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }

        /* Grila Orașe */
        .cities-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
        .city-card { background: var(--card-bg); border-radius: var(--radius); padding: 30px 20px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.02); border: 1px solid var(--border-color); transition: all 0.3s ease; }
        .city-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(249, 115, 22, 0.1); border-color: #fdba74; }
        .city-name { font-size: 24px; font-weight: 700; color: var(--accent); margin-bottom: 20px; }
        .city-actions { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; flex-wrap: wrap;}
        .btn { display: inline-block; background: #f1f5f9; color: var(--text-main); font-size: 14px; font-weight: 600; padding: 8px 20px; border-radius: 8px; transition: all 0.2s; }
        .btn:hover { background: var(--primary); color: white; box-shadow: 0 4px 10px rgba(59,130,246,0.2); }
        .city-domain { font-size: 13px; color: var(--text-muted); font-weight: 500; }
        
        .ad-card { display: flex; justify-content: center; align-items: center; } 

        /* ==============================================
           5. FOOTER
           ============================================== */
        .modern-footer { background: var(--card-bg); border-top: 1px solid var(--border-color); padding: 50px 40px 20px; margin-top: auto; }
        .footer-banner-container { max-width: 1200px; margin: 0 auto 40px; text-align: center; }
        .footer-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; margin-bottom: 40px; }
        .footer-widget h2 { font-size: 16px; font-weight: 700; color: var(--text-main); margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }
        .footer-links li { margin-bottom: 10px; }
        .footer-links a { color: var(--text-muted); font-size: 14px; font-weight: 500; transition: color 0.2s; }
        .footer-links a:hover { color: var(--primary); }
        .footer-bottom { border-top: 1px dashed var(--border-color); padding-top: 20px; display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; flex-wrap: wrap; gap: 10px; }
        .footer-copy { font-size: 13px; color: var(--text-muted); }
        .footer-dexhow { font-size: 13px; font-weight: 600; color: var(--primary); }

        /* ==============================================
           6. RESPONSIVE DESIGN (Telefoane)
           ============================================== */
        @media (max-width: 1024px) {
            .layout-grid { grid-template-columns: 1fr; gap: 30px; }
        }
        @media (max-width: 768px) {
            .navbar { padding: 15px 20px; }
            .mobile-toggle { display: block; } 
            
            .categories-menu { display: none; position: absolute; top: 100%; left: 0; width: 100%; background: var(--card-bg); padding: 0; border-top: 1px solid var(--border-color); box-shadow: 0 15px 30px rgba(0,0,0,0.15); max-height: 350px; overflow-y: auto; overflow-x: hidden; }
            .categories-menu.open { display: block; }
            .chip { display: block; width: 100%; box-sizing: border-box; background: transparent; border: none; border-bottom: 1px solid #f1f5f9; border-radius: 0; padding: 18px 20px; font-size: 16px; text-align: left; color: var(--text-main); margin: 0; transform: none !important; }
            .chip:last-child { border-bottom: none; }
            .chip:hover, .chip.active { background: var(--primary-hover); color: var(--primary); box-shadow: none; border-left: 4px solid var(--primary); }
            
            .main-content { padding: 20px; }
            .toolbar { flex-direction: column; align-items: flex-start; }
            .sorting-group { width: 100%; justify-content: flex-start; gap: 15px; }
            .dropdown-menu { left: 0; right: auto; }
            
            .modern-footer { padding: 30px 20px 20px; }
            .footer-bottom { flex-direction: column; text-align: center; }
        }

        /* ==============================================
   7. PAGINATION FIXES & ENHANCEMENTS
   ============================================== */

/* Reset the list items themselves. This removes bullets and default spacing. */
.pagination li {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Make the LI a flex container to help its child (the link) fill it */
}

/* Ensure the link/span fills the entire list item */
.pagination li a,
.pagination li span {
    width: 100%;
    flex: 1; /* This makes the link expand to fill the li */
}

/* Update the selector for the active state to target the link INSIDE the active li */
.pagination li.active a,
.pagination li.active span {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.2);
}

/* Style for disabled items like '...' or the arrow buttons */
.pagination li.disabled span {
    background: var(--bg-color);
    color: #cbd5e1; /* Lighter text color for disabled state */
    cursor: default;
}

/* Make sure the old general rule doesn't override our specific active style */
.pagination .active a:hover,
.pagination .active span:hover {
    background: var(--accent);
    border-color: var(--accent);
}