/* --- Variables & Theme Setup --- */
:root {
    /* Core Colors - Dark Theme (Default) */
    --hue: 220;
    --sat: 25%;
    --lig: 12%;

    --body-bg: #0a0e17;
    --text-color: #e2e8f0;
    --title-color: #ffffff;
    --accent-color: #c09d5e;
    /* Gold/Bronze for luxury feel */
    --accent-glow: rgba(192, 157, 94, 0.4);

    --glass-bg: rgba(255, 255, 255, 0.03);
    /* Reduced opacity for performance */
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    --backdrop-blur: 5px;
    /* Reduced blur */

    --nav-width-collapsed: 80px;
    --nav-width-expanded: 260px;

    /* Fonts */
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Outfit', sans-serif;

    /* Spacing */
    --header-height: 3.5rem;
}

/* Light Theme Variables */
body.light-theme {
    --body-bg: #f8fafc;
    --text-color: #475569;
    --title-color: #1e293b;
    --accent-color: #b45309;
    /* Darker gold/bronze for contrast */
    --accent-glow: rgba(180, 83, 9, 0.2);

    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(0, 0, 0, 0.05);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05);
}

/* --- Global Reset & Base --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-ar);
    background-color: var(--body-bg);
    color: var(--text-color);
    transition: background-color 0.4s, color 0.4s;
    overflow-x: hidden;
    line-height: 1.6;
}

/* English Font Override */
html[lang="en"] body {
    font-family: var(--font-en);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

/* --- Background Effects --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.4;
}

.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.03;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* --- Layout Utilities --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.grid {
    display: grid;
    gap: 2rem;
}

.section {
    padding: 6rem 0 2rem;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::before {
    content: attr(data-heading);
    display: block;
    font-size: 1rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

/* --- Components --- */
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent-color), #a3834a);
    color: #fff;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--accent-glow);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s, border-color 0.3s;
}

.glass-card:hover {
    border-color: var(--accent-color);
}

/* --- Sidebar Navigation --- */
.sidebar {
    position: fixed;
    top: 0;
    height: 100vh;
    width: var(--nav-width-collapsed);
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: width 0.4s ease;
    border-inline-end: 1px solid var(--glass-border);
    overflow: hidden;
}

html[dir="rtl"] .sidebar {
    right: 0;
}

html[dir="ltr"] .sidebar {
    left: 0;
}

.sidebar:hover {
    width: var(--nav-width-expanded);
}

.nav {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem 0;
}

.lang-switcher {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.lang-button {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: 0.3s;
}

.lang-button.active-lang {
    background: var(--accent-color);
    color: #fff;
    border-color: var(--accent-color);
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--text-color);
    transition: 0.3s;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active-link {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.03);
}

.nav-icon {
    font-size: 1.5rem;
    min-width: 2rem;
    text-align: center;
}

.nav-name {
    opacity: 0;
    transition: opacity 0.3s;
    margin-inline-start: 1rem;
}

.sidebar:hover .nav-name {
    opacity: 1;
}

.theme-switcher {
    display: flex;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
}

/* --- Main Content Area --- */
.main {
    transition: margin 0.4s ease;
}

html[dir="rtl"] .main {
    margin-right: var(--nav-width-collapsed);
}

html[dir="ltr"] .main {
    margin-left: var(--nav-width-collapsed);
}

html[dir="rtl"] .sidebar:hover+.main {
    margin-right: var(--nav-width-expanded);
}

html[dir="ltr"] .sidebar:hover+.main {
    margin-left: var(--nav-width-expanded);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 0;
}

.home-container {
    text-align: center;
}

.profile-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
}

.home-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--body-bg);
    position: relative;
    z-index: 2;
}

.profile-glow {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent, var(--accent-color), transparent);
    animation: rotate 4s linear infinite;
    z-index: 1;
    filter: blur(10px);
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Company Reference Top Right */
.company-reference-top-right {
    position: absolute;
    top: 0;
    z-index: 100;
    transition: all 0.4s ease;
}

html[dir="ltr"] .company-reference-top-right {
    right: 0;
}

html[dir="rtl"] .company-reference-top-right {
    left: 0;
}

.ref-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    padding: 0.5rem;
    transition: 0.3s;
}

html[dir="rtl"] .ref-link {
    flex-direction: row-reverse;
}

.ref-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.ref-text-content {
    text-align: inherit;
}

html[dir="ltr"] .ref-text-content {
    text-align: right;
}

html[dir="rtl"] .ref-text-content {
    text-align: left;
}

.ref-tagline {
    font-size: 0.65rem;
    color: var(--accent-color);
    margin-bottom: 0.2rem;
    font-weight: 600;
    opacity: 0.9;
}

.ref-name {
    font-size: 0.85rem;
    color: var(--title-color);
    margin-bottom: 0.1rem;
    font-weight: 700;
}

.ref-desc {
    font-size: 0.7rem;
    color: var(--text-color);
    opacity: 0.8;
}

.ref-link:hover .ref-logo {
    transform: scale(1.1);
}

.home-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.home-subtitle {
    font-size: 1.25rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.home-description {
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.8;
}

/* Hero Contact Card (Glass) */
.hero-contact-card {
    display: inline-flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    margin: 1.5rem auto 3rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.hero-contact-btn {
    font-size: 1.5rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.hero-contact-btn:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.hero-btn-img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.hero-scroll-down {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.8;
    animation: bounce 2s infinite;
    cursor: pointer;
    color: var(--text-color);
    text-decoration: none;
    transition: 0.3s;
    z-index: 10;
}

.hero-scroll-down:hover {
    opacity: 1;
    color: var(--accent-color);
}

.scroll-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

/* --- About Section --- */
.about-info {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.info-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    flex: 1 1 200px;
    transition: transform 0.3s ease;
}

.info-box:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.info-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    display: block;
}

.info-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-color);
}

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

.about-stats {
    display: none;
    /* Hiding old class if it exists */
}

/* --- Licenses Grid --- */
.licenses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.license-card {
    text-align: center;
    transition: transform 0.3s, border-color 0.3s;
}

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

.license-icon-box {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background: rgba(192, 157, 94, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent-color);
    border: 1px solid rgba(192, 157, 94, 0.2);
}

.license-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--title-color);
}

.license-desc {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* --- Services --- */
.electric-hover:hover {
    box-shadow: 0 0 20px var(--accent-glow), inset 0 0 20px var(--accent-glow);
}

/* Redesigned Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.service-card {
    position: relative;
    overflow: hidden;
    padding: 3rem 2rem;
    text-align: center;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--accent-color), #fcd34d);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 5px var(--accent-glow));
}

.service-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--title-color);
}

.service-desc {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.8;
}

/* --- Expertise / Case Studies --- */
/* --- Litigation Experience --- */
.experience-wrapper {
    padding: 3rem;
}

.experience-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.exp-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.exp-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.exp-icon {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.exp-list strong {
    display: block;
    font-size: 1.1rem;
    color: var(--title-color);
    margin-bottom: 0.3rem;
}

.exp-list p {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* --- License Powers (Tabs) --- */
.powers-tabs {
    padding: 2rem;
}

.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-color);
    padding: 0.8rem 1.5rem;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 50px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    opacity: 1;
}

.tab-btn.active {
    background: var(--accent-color);
    color: #fff;
    opacity: 1;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.tab-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--accent-color);
    font-size: 1.5rem;
}

.powers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.power-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: 0.3s;
}

.power-item:hover {
    background: rgba(255, 255, 255, 0.07);
    transform: translateX(-5px);
}

.power-item i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.case-tag {
    display: inline-block;
    background: var(--accent-color);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

/* --- Contact --- */
/* --- Contact --- */
.contact-container-centered {
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 900px;
}

.contact-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2.5rem;
    transition: transform 0.3s;
}

.contact-box:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.contact-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 1rem;
    padding: 1.5rem;
}

.contact-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.input-group {
    position: relative;
    margin-bottom: 2rem;
}

.input {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    color: var(--text-color);
    outline: none;
    transition: 0.3s;
}

.input:focus {
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
}

.input-group label {
    position: absolute;
    top: 1rem;
    right: 1rem;
    /* RTL Default */
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: 0.3s;
}

html[dir="ltr"] .input-group label {
    left: 1rem;
    right: auto;
}

.input:focus~label,
.input:not(:placeholder-shown):valid~label {
    top: -0.5rem;
    font-size: 0.8rem;
    background: var(--body-bg);
    padding: 0 0.5rem;
    color: var(--accent-color);
}

/* --- Footer --- */
.footer {
    background: rgba(0, 0, 0, 0.2);
    padding: 3rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-socials {
    display: flex;
    gap: 1.5rem;
    font-size: 1.5rem;
}

.footer-socials a:hover {
    color: var(--accent-color);
}

.footer-copy {
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* --- Fixed Contact Bar --- */
#fixed-contact-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(10px);
    padding: 0.8rem 2rem;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
    z-index: 90;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.glass-content {
    display: flex;
    gap: 2rem;
    font-size: 1.5rem;
}

.contact-glass-link:hover {
    color: var(--accent-color);
    transform: scale(1.2);
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--body-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s;
}

#scales-of-justice {
    width: 100px;
    stroke: var(--accent-color);
    fill: none;
    stroke-width: 2;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
    .sidebar {
        width: 100%;
        height: auto;
        bottom: 0;
        top: auto;
        border-top: 1px solid var(--glass-border);
        border-inline-end: none;
        padding: 0.5rem;
    }

    .sidebar:hover {
        width: 100%;
    }

    .nav {
        flex-direction: row;
        padding: 0;
        align-items: center;
    }

    .nav-list {
        flex-direction: row;
        justify-content: space-around;
        width: 100%;
    }

    .nav-name,
    .lang-switcher,
    .theme-switcher {
        display: none;
    }

    .nav-link {
        padding: 0.8rem;
        font-size: 1.5rem;
    }

    html[dir="rtl"] .main,
    html[dir="ltr"] .main {
        margin: 0;
    }

    html[dir="rtl"] .sidebar:hover+.main,
    html[dir="ltr"] .sidebar:hover+.main {
        margin: 0;
    }

    .contact-container-centered {
        padding: 0 1rem;
    }

    .contact-methods-grid {
        grid-template-columns: 1fr;
    }

    .experience-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .experience-wrapper {
        padding: 1.5rem;
    }

    .powers-card {
        padding: 1.5rem;
    }

    .home-title {
        font-size: 2rem;
    }

    #fixed-contact-bar {
        display: none;
    }

    /* Hide on mobile to avoid clutter */

    .main {
        padding-bottom: 80px;
    }

    /* Space for bottom nav */
}

/* --- Fixed Contact Bar --- */
.fixed-contact-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1.5rem;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.fixed-btn {
    color: var(--text-color);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fixed-btn:hover {
    transform: translateY(-3px);
}

/* Brand Colors for Fixed Bar */
.fixed-btn.whatsapp {
    color: #25D366;
}

.fixed-btn.phone {
    color: #34b7f1;
}

/* Light blue for phone */
.fixed-btn.email {
    color: #EA4335;
}

/* Gmail red */
.fixed-btn.telegram {
    color: #0088cc;
}

@media screen and (max-width: 768px) {
    .fixed-contact-bar {
        bottom: 5rem;
        /* Above bottom nav */
        left: 1rem;
        padding: 0.8rem;
        gap: 0.8rem;
    }

    .fixed-btn {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;

    }
}

/* --- Blog Section (Integrated) --- */
.blog-section {
    padding: 6rem 0;
    position: relative;
}

.blog-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.blog-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.blog-search-box,
.blog-filter-box {
    padding: 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    backdrop-filter: blur(10px);
    font-family: inherit;
}

.blog-search-box:focus,
.blog-filter-box:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--glass-shadow);
    border-color: var(--accent-color);
}

.article-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-tag {
    background: rgba(197, 160, 89, 0.2);
    color: var(--accent-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    align-self: flex-start;
    margin-bottom: 0.8rem;
}

.article-title {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--text-color);
}

.article-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.read-more-btn {
    color: var(--accent-color);
    font-weight: bold;
    cursor: pointer;
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: 0.3s;
}

.read-more-btn:hover {
    gap: 0.8rem;
}

/* Admin Dashboard */
.admin-dashboard {
    display: none;
    background: var(--glass-bg);
    border: 1px solid var(--accent-color);
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 3rem;
    animation: slideDown 0.5s ease;
}

.admin-input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    border-radius: 8px;
}

.admin-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    position: relative;
    color: var(--text-color);
}

/* --- Fixed Contact Bar Updates --- */
.fixed-contact-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    display: flex;
    gap: 1rem;
    padding: 0.8rem 1.5rem;
    z-index: 99;
    border-radius: 50px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

.fixed-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.05);
}

.fixed-btn:hover {
    transform: scale(1.2);
    background: var(--accent-color);
    color: #fff;
}

.fixed-btn.linkedin:hover {
    background: #0077b5;
}

.fixed-btn.company:hover {
    background: #1e293b;
}

.fixed-btn-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.contact-box-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 5px var(--accent-glow));
}

/* --- Blog Reader Readability --- */
.reader-header {
    margin-bottom: 2rem;
    text-align: center;
}

.reader-title {
    font-size: 2.2rem;
    color: var(--title-color);
    margin-top: 1rem;
    line-height: 1.3;
}

.reader-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.reader-content {
    font-size: 1.15rem;
    line-height: 2;
    color: var(--text-color);
    max-width: 850px;
    margin: 0 auto;
    padding: 0 1rem;
}

.reader-content h3 {
    font-size: 1.6rem;
    margin: 2.5rem 0 1.2rem;
    color: var(--accent-color);
    border-right: 4px solid var(--accent-color);
    padding-right: 1rem;
}

.reader-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.reader-content ul {
    margin-bottom: 1.5rem;
    padding-inline-start: 2rem;
}

.reader-content li {
    margin-bottom: 0.8rem;
    position: relative;
}

.reader-content li::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    right: -1.5rem;
    font-weight: bold;
}

body.light-theme .reader-content {
    color: #0f172a;
}

body.light-theme .reader-content p {
    color: #1e293b;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .company-reference-top-right {
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        margin-bottom: 2rem;
        display: flex;
        justify-content: center;
    }

    .ref-link {
        flex-direction: column;
        text-align: center;
    }

    .ref-text-content {
        text-align: center;
    }

    .ref-logo {
        width: 60px;
        height: 60px;
    }

    .reader-title {
        font-size: 1.6rem;
    }

    .reader-content {
        font-size: 1.1rem;
        line-height: 1.9;
    }

    .reader-img {
        height: 250px;
    }
}

/* --- Partners Section --- */
.partners {
    padding: 6rem 0;
    background: var(--bg-color);
    overflow: hidden;
    position: relative;
}

.partners-header {
    text-align: center;
    margin-bottom: 4rem;
}

.partners-subtitle {
    font-size: 1.2rem;
    color: var(--accent-color);
    font-weight: 500;
    margin-top: 0.5rem;
}

.logo-carousel-container {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
    position: relative;
}

/* Gradient overlays for smooth fade */
.logo-carousel-container::before,
.logo-carousel-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}

.logo-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-color), transparent);
}

.logo-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-color), transparent);
}

.logo-track {
    display: flex;
    width: calc(250px * 18 + 3rem * 18);
    /* Adjust based on number of logos (9 * 2) */
    animation: scroll 40s linear infinite;
    gap: 3rem;
    align-items: center;
}

.logo-item {
    width: 250px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    transition: all 0.4s ease;
    cursor: pointer;
}

.logo-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(1) brightness(0.8);
    transition: all 0.4s ease;
}

.logo-item .text-logo {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.4s ease;
}

.logo-item:hover {
    background: rgba(192, 157, 94, 0.1);
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.logo-item:hover img {
    filter: grayscale(0) brightness(1);
}

.logo-item:hover .text-logo {
    color: var(--accent-color);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-250px * 9 - 3rem * 9));
    }
}

/* RTL Support for scroll */
[dir="rtl"] .logo-track {
    animation: scroll-rtl 40s linear infinite;
}

@keyframes scroll-rtl {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(250px * 9 + 3rem * 9));
    }
}

@media (max-width: 768px) {
    .logo-item {
        width: 180px;
        height: 100px;
    }

    @keyframes scroll {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-180px * 9 - 3rem * 9));
        }
    }

    @keyframes scroll-rtl {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(180px * 9 + 3rem * 9));
        }
    }
}

/* --- Back to Top --- */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-color);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    bottom: 90px;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: #d4af37;
}

/* --- FAQ Styles in Blog --- */
.faq-container {
    margin-top: 2rem;
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: 0.3s;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-color);
}

.faq-item h3 {
    color: var(--accent-color);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-item h3::before {
    content: "?";
    width: 24px;
    height: 24px;
    background: var(--accent-color);
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
}

.faq-item p {
    color: var(--text-color);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* --- Gov Badges in Licenses --- */
.gov-logos {
    display: flex;
    gap: 0.8rem;
    margin-top: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.gov-badge {
    height: 40px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    /* Make them white for dark theme */
    opacity: 0.7;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.license-card:hover .gov-badge {
    opacity: 1;
    transform: scale(1.15) translateY(-5px);
    filter: drop-shadow(0 0 8px var(--accent-color));
}

.light-theme .gov-badge {
    filter: none;
    opacity: 0.9;
}

/* --- New License Powers Tab Footer Styles --- */
.tab-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.verified-badges {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.gov-badge-fixed {
    height: 45px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: 0.3s;
}

.light-theme .gov-badge-fixed {
    filter: brightness(0);
    opacity: 0.6;
}

.directory-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: var(--accent-color);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    transition: 0.3s;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.directory-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--accent-glow);
    background: #d4ac5d;
    color: #fff;
}

.directory-btn i {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .tab-footer-actions {
        flex-direction: column;
        text-align: center;
    }

    .verified-badges {
        justify-content: center;
    }
}