/* Global Variables */
:root {
    --primary-color: hsl(215, 66%, 24%);
    --primary-light: hsl(215, 66%, 35%);
    --secondary-color: hsl(43, 96%, 56%);
    --accent-color: hsl(172, 66%, 40%);
    --text-dark: hsl(215, 40%, 15%);
    --text-light: hsl(210, 20%, 96%);
    --background-light: hsl(0, 0%, 100%);
    --background-off-white: hsl(210, 20%, 98%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-md: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    /* Default */
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Arabic Specifics */
:lang(ar) {
    direction: rtl;
}

body:lang(ar) {
    font-family: 'Cairo', sans-serif;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.text-center {
    text-align: center;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(21, 62, 117, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 62, 117, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1010;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

@media (max-width: 991px) {
    nav {
        height: 70px;
    }
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
}

@media (max-width: 768px) {
    .logo {
        font-size: 1.2rem;
    }

    .logo img {
        height: 40px;
    }
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.nav-links a i {
    margin: 0 8px;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.nav-links a.has-dropdown:hover {
    color: var(--secondary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

:lang(ar) .nav-links a::after {
    right: 0;
    left: auto;
}

:lang(en) .nav-links a::after {
    left: 0;
    right: auto;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    transition: var(--transition);
    padding: 10px;
}

.mobile-toggle:hover {
    color: var(--secondary-color);
}

@media (max-width: 991px) {
    nav {
        justify-content: flex-start;
        gap: 15px;
    }
    
    .logo {
        margin-left: auto;
    }
    
    :lang(en) .logo, [dir="ltr"] .logo {
        margin-right: auto;
        margin-left: 0;
    }

    .mobile-toggle {
        display: flex;
        position: relative;
        z-index: 1011;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        gap: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        z-index: 1001;
        padding: 20px 0;
        overflow-y: auto;
    }

    [dir="rtl"] .nav-links {
        right: auto;
        left: -100%;
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0 !important;
    }

    [dir="rtl"] .nav-links.active {
        left: 0 !important;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        padding: 15px 25px !important;
        border-bottom: 1px solid #f5f5f5;
        width: 100%;
    }

    .nav-links a::after {
        display: none;
    }
}

.nav-links a:hover::after {
    width: 100%;
}

/* Dropdown Styles */
.nav-links li {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% - 10px);
    /* Slightly closer to the item */
    right: 0;
    min-width: 240px;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: 2000;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Filler element to prevent losing hover between li and menu */
.nav-links li::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
}

:lang(en) .dropdown-menu {
    right: auto;
    left: 0;
}

.nav-links li:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(10px);
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark) !important;
    font-size: 0.95rem;
    font-weight: 500;
}

.dropdown-menu a:hover {
    background-color: var(--background-off-white);
    color: var(--secondary-color) !important;
}

.dropdown-menu a::after {
    display: none;
}

/* Search Bar Styles */
.search-container {
    position: relative;
    max-width: 400px;
    margin-right: 20px;
}

:lang(en) .search-container {
    margin-right: 0;
    margin-left: 20px;
}

.search-container input {
    width: 100%;
    padding: 10px 40px 10px 20px;
    border-radius: 50px;
    border: 1px solid #ddd;
    font-family: inherit;
    font-size: 0.9rem;
    transition: var(--transition);
    background: white;
}

:lang(en) .search-container input {
    padding: 10px 20px 10px 40px;
}

.search-container input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.search-container i {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
}

:lang(en) .search-container i {
    right: auto;
    left: 15px;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(21, 62, 117, 0.90), rgba(21, 62, 117, 0.80)), url('assets/images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    color: white;
    padding-top: 100px;
    /* More space for header */
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    width: 100%;
}

@media (max-width: 992px) {
    .hero {
        padding-top: 120px;
        min-height: auto;
        padding-bottom: 80px;
    }

    .hero .container {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }
}

.hero-content {
    flex: 1;
    max-width: 600px;
    animation: fadeInUp 1s ease-out;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.3s backwards;
    /* Delayed fade in */
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.05rem;
    }
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Stats Section */
.stats-circulars-wrapper {
    display: flex;
    gap: 30px;
    margin-top: -80px;
    position: relative;
    z-index: 10;
}

@media (max-width: 992px) {
    .stats-circulars-wrapper {
        margin-top: 0;
        padding: 40px 0;
        flex-direction: column;
    }
}

.stats {
    flex: 2;
    background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.stats::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(21, 62, 117, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 1;
    flex: 1 1 200px;
    max-width: 280px;
}

.stat-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(21, 62, 117, 0.1);
    border-color: var(--secondary-color);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(21, 62, 117, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-bottom: 5px;
    transition: 0.3s;
}

.stat-item:hover .stat-icon {
    background: var(--secondary-color);
    color: white;
    transform: rotateY(360deg);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
    line-height: 1;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.home-circulars-card {
    flex: 1;
    background: white;
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.home-circulars-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--secondary-color);
    display: flex;
    align-items: center;
}

.home-circulars-card h3 i {
    margin-left: 15px;
    color: var(--secondary-color);
}

[dir="ltr"] .home-circulars-card h3 i {
    margin-left: 0;
    margin-right: 15px;
}

.home-circular-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.home-circular-item:last-of-type {
    border-bottom: none;
    margin-bottom: 10px;
}

.home-circular-item .date {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
    display: block;
}

.home-circular-item .title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.5;
    text-decoration: none;
    display: block;
}

.view-all-link {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--secondary-color);
    font-weight: 700;
    text-decoration: none;
    transition: 0.3s;
}

.stats-circulars-wrapper {
    display: flex;
    gap: 30px;
    margin-top: -100px;
    position: relative;
    z-index: 10;
    padding-bottom: 20px;
}

@media (max-width: 992px) {
    .stats-circulars-wrapper {
        margin-top: -30px;
        padding: 20px 0;
        flex-direction: column;
    }

    .stats {
        padding: 30px 15px;
    }
}

/* Features/Services */
.features {
    background-color: var(--background-off-white);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.section-header span {
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 10px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .section-padding {
        padding: 50px 0;
    }
}

.feature-card {
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 4px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--secondary-color);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Opportunities Section */
.opportunities {
    padding-bottom: 100px;
}

.opp-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 400px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition);
}

.opp-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.3) 100%);
    transform: skewX(-25deg);
    transition: 0.75s;
    z-index: 1;
}

.opp-card:hover::before {
    left: 125%;
}

.opp-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.opp-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.opp-card:hover img {
    transform: scale(1.1);
}

.opp-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    padding: 40px 30px 30px;
    color: white;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 2;
}

.opp-overlay h3 {
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}

.opp-overlay p {
    font-size: 0.95rem;
    opacity: 0.8;
}

.opp-card:hover .opp-overlay {
    transform: translateY(0);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 80px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: block;
}

.footer-links h4 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-right: 5px;
    /* RTL aware in logic? Handled by direction */
}

:lang(ar) .footer-links a:hover {
    padding-right: 5px;
    padding-left: 0;
}

:lang(en) .footer-links a:hover {
    padding-left: 5px;
    padding-right: 0;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero .container {
        flex-direction: column-reverse;
        /* Text on top usually, but in visual flow image might be nice. Let's do text first on mobile usually. But standard is image top: column-reverse puts text bottom. Let's use 'column' so image is SECOND, text first? No, actually standard is: Image Top (column) or Image Bottom (column-reverse). Let's stick to simple column: vertical stack. Text Top, Image Bottom. */
        flex-direction: column;
        text-align: center;
        padding-top: 40px;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-image {
        display: none;
        /* Often hero images hide on very small screens, or we show them. Let's show but smaller. */
        display: block;
        width: 80%;
        margin-top: 30px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .stats {
        margin-top: 40px;
        gap: 15px;
    }

    /* Mobile Menu Toggle */
    .mobile-menu-btn {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 21px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }

    .mobile-menu-btn span {
        width: 100%;
        height: 3px;
        background-color: var(--primary-color);
        border-radius: 10px;
        transition: var(--transition);
        transform-origin: left;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        flex-direction: column;
        padding: 100px 40px;
        gap: 20px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 1000;
        display: flex !important;
    }

    :lang(en) .nav-links {
        right: auto;
        left: -100%;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        right: 0;
    }

    :lang(en) .nav-links.active {
        left: 0;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        font-size: 1.1rem;
        display: block;
        padding: 10px 0;
        border-bottom: 1px solid #eee;
    }

    /* Overlay */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: 0.3s;
        z-index: 999;
    }

    .menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 10px 20px;
        display: none;
        border: none;
        background: #f8f9fa;
        margin-top: 5px;
        width: 100%;
        min-width: 100%;
    }

    .nav-links li.active .dropdown-menu {
        display: block;
    }

    .nav-links li i {
        float: left;
        margin-top: 5px;
        transition: transform 0.3s;
    }

    :lang(ar) .nav-links li i {
        float: left;
    }

    .nav-links li.active>a i {
        transform: rotate(180deg);
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Print Styles */
@media print {

    header,
    footer,
    .btn,
    .page-utilities,
    .lang-switch,
    .sidebar-ads-module,
    aside,
    #back-link {
        display: none !important;
    }

    main {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        background: white !important;
    }

    article,
    #license-details-container,
    #dynamic-content-area {
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }


    body {
        background: white !important;
    }

    /* Fix for detail page wrappers in print */
    #news-details-container,
    #opp-details-container,
    #license-details-container {
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        width: 100% !important;
    }
}

/* Ticker Animation */
@keyframes ticker-scroll {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* For English LTR */
:lang(en) .ticker-content-wrapper #ticker-content {
    animation-name: ticker-scroll-en;
}

@keyframes ticker-scroll-en {
    0% {
        transform: translateX(100%);
        /* Start from right (off-screen) */
    }

    100% {
        transform: translateX(-100%);
        /* Move to left */
    }
}

/* For Arabic RTL */
:lang(ar) .ticker-content-wrapper #ticker-content {
    animation-name: ticker-scroll-ar;
}

@keyframes ticker-scroll-ar {
    0% {
        transform: translateX(-100%);
        /* Start from left (off-screen) */
    }

    100% {
        transform: translateX(100%);
        /* Move to right */
    }
}


.ticker-content-wrapper:hover #ticker-content {
    animation-play-state: paused;
}

/* Ticker Search & Results */
.ticker-search input:focus {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: var(--secondary-color) !important;
}

.search-results-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    width: 350px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .search-results-dropdown {
        width: calc(100vw - 40px);
        max-width: 350px;
    }
}

[dir="rtl"] .search-results-dropdown {
    right: 0;
    left: auto;
}

[dir="ltr"] .search-results-dropdown {
    left: 0;
    right: auto;
}

@media (max-width: 991px) {
    .search-results-dropdown {
        position: fixed;
        top: 130px;
        /* Adjust based on header + ticker height */
        left: 15px;
        right: 15px;
        width: calc(100% - 30px);
        max-width: none;
        z-index: 1005;
    }
}


.search-results-dropdown.active {
    display: block;
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: var(--transition);
    display: block;
    text-decoration: none;
    text-align: inherit;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item .title {
    display: block;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.search-result-item .meta {
    font-size: 0.8rem;
    color: #888;
}

.search-result-item .type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 8px;
}

[dir="ltr"] .search-result-item .type {
    margin-left: 0;
    margin-right: 8px;
}

.type-news {
    background: #e3f2fd;
    color: #1976d2;
}

.type-opp {
    background: #fff3e0;
    color: #f57c00;
}

.type-license {
    background: #e8f5e9;
    color: #2e7d32;
}

.type-page {
    background: #f3e5f5;
    color: #7b1fa2;
}

.type-ad {
    background: #fce4ec;
    color: #c2185b;
}

.type-circular {
    background: #e0f2f1;
    color: #00796b;
}

.type-warning {
    background: #ffebee;
    color: #d32f2f;
}

.search-highlight {
    background: rgba(243, 156, 18, 0.2);
    color: var(--primary-color);
    padding: 0 2px;
    border-radius: 2px;
}

/* Mobile and Tablet Fixes */
@media (max-width: 991px) {
    .hero {
        padding-top: 100px;
    }

    .stats-circulars-wrapper {
        margin-top: 0;
        padding: 40px 15px;
    }

    #ticker-bar .container {
        flex-direction: column;
        align-items: stretch !important;
        gap: 15px;
    }

    .ticker-content-wrapper {
        height: auto !important;
        min-height: 30px;
    }

    .ticker-search {
        width: 100% !important;
        min-width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 10px;
    }

    #ticker-label {
        font-size: 0.8rem;
    }

    .main-with-sidebar {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0;
    }

    h1 {
        font-size: 2rem !important;
    }

    h2 {
        font-size: 1.75rem !important;
    }

    .container {
        padding: 0 15px;
    }

    .nav-links {
        width: 80% !important;
    }

    .hero-content h1 {
        font-size: 2rem !important;
    }

    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .opp-card-list {
        flex-direction: column;
        text-align: center !important;
    }

    footer .footer-content {
        grid-template-columns: 1fr !important;
        gap: 30px;
        text-align: center;
    }

    .footer-links ul {
        display: inline-block;
        text-align: center;
    }

    .footer-links li i {
        margin: 0 5px !important;
    }

    .stats {
        grid-template-columns: 1fr 1fr !important;
    }

    #news-details-container,
    #opp-details-container,
    #license-details-container {
        padding: 20px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 0 !important;
    }

    .hero-content {
        padding: 0 10px;
    }
}

@media (max-width: 480px) {
    .stats {
        grid-template-columns: 1fr !important;
    }

    .hero h1 {
        font-size: 1.8rem !important;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .hero-content div[style*="display: flex"] {
        flex-direction: column;
    }
}

#ticker-bar {
    top: 80px !important;
}

@media (max-width: 991px) {
    #ticker-bar {
        top: 70px !important;
    }

    #ticker-label {
        font-size: 0.75rem !important;
        margin-left: 5px !important;
    }

    .ticker-search input {
        padding: 8px 35px 8px 15px !important;
        font-size: 0.8rem !important;
    }
}

/* Pop-up Ad Styles */
.ad-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInPopup 0.3s ease-out;
}

.ad-popup-content {
    background: white;
    position: relative;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    max-width: 95%;
    max-height: 90vh;
    animation: zoomInPopup 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ad-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
    z-index: 10001;
}

.ad-popup-close:hover {
    background: #e74c3c;
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.ad-popup-body {
    width: 100%;
    height: 100%;
    overflow: auto;
}

.ad-popup-body img {
    width: 100%;
    height: auto;
    display: block;
    transition: 0.5s;
}

.ad-popup-body a:hover img {
    transform: scale(1.02);
}

@keyframes fadeInPopup {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes zoomInPopup {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Global Icon Fix for Font Awesome 6 */
.fas,
.fa-solid {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.far,
.fa-regular {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

.fab,
.fa-brands {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

i[class*="fa-"] {
    display: inline-block !important;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    line-height: 1;
}