@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Colors - Dark Mode (Default) */
    --bg-primary: #0a0a0b;
    --bg-primary-rgb: 10, 10, 11;
    --bg-secondary: #141416;
    --bg-tertiary: #1c1c1f;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-color: #3b82f6;
    /* Premium Blue */
    --accent-hover: #2563eb;
    --accent-color-rgb: 59, 130, 246;
    --accent-glow: rgba(59, 130, 246, 0.5);
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);

    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Shorthands */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
}

.light-mode {
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: rgba(0, 0, 0, 0.05);
    --glass-bg: rgba(0, 0, 0, 0.02);
    --glass-border: rgba(0, 0, 0, 0.05);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.2rem;
    }
}

section {
    position: relative;
    overflow: hidden;
}

.section-padding {
    padding: 100px 0;
}

.bg-alt {
    background-color: var(--bg-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography Styles */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 2rem;
}

.section-title {
    margin-bottom: 4rem;
}

.section-title.centered {
    text-align: center;
}

.subtitle {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.2rem;
    font-size: 0.8rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-main);
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
    box-shadow: 0 10px 20px -5px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px -5px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: var(--glass-bg);
    border-color: var(--accent-color);
}

.full-width {
    width: 100%;
}

/* Navigation */
#navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

#navbar.scrolled {
    padding: 1rem 0;
    background: rgba(var(--bg-primary-rgb), 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo span {
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#theme-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-btn span {
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    align-items: center;
    gap: 4rem;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.hero-text h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 1rem;
}

.typing-text {
    font-size: clamp(1.2rem, 5vw, 2.5rem);
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 3rem;
}

.hero-btns {
    display: flex;
    gap: 1.5rem;
}

.hero-visual {
    position: relative;
    height: 400px;
}

.hero-visual::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--accent-color);
    filter: blur(150px);
    opacity: 0.15;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.hero-stats {
    padding: 2.5rem;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 250px;
    margin-left: auto;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 25px;
    height: 45px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--text-secondary);
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 20px);
        opacity: 0;
    }
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--accent-color);
    margin-left: 5px;
    animation: blink 0.8s infinite;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 5rem;
    align-items: center;
}

.image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 500px;
    object-fit: contain;
    background: var(--bg-tertiary);
    transition: transform 0.5s ease;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.image-wrapper:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary), transparent);
    opacity: 0.2;
}

.about-content h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.career-objective-box {
    margin-top: 2.5rem;
    padding: 2rem;
    background: var(--bg-tertiary);
    border-left: 4px solid var(--accent-color);
    border-radius: 0 12px 12px 0;
}

.career-objective-box h4 {
    margin-bottom: 1rem;
    color: var(--accent-color);
}

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

@media (max-width: 480px) {
    .skills-grid {
        grid-template-columns: 1fr;
    }
}

.skill-card {
    background: var(--bg-tertiary);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.skill-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}

.skill-icon {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.skill-card h3 {
    margin-bottom: 1.2rem;
}

.skill-card ul li {
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 1.5rem;
}

.skill-card ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

/* Projects Section */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

@media (max-width: 480px) {
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.project-card {
    background: var(--bg-tertiary);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

.project-img {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 11, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-project {
    padding: 0.8rem 1.5rem;
    background: var(--accent-color);
    color: white;
    font-weight: 600;
    border-radius: 5px;
}

.project-info {
    padding: 2rem;
}

.project-info h3 {
    margin-bottom: 1rem;
}

.project-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.project-tags span {
    font-size: 0.75rem;
    background: var(--glass-bg);
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* Experience & Services Split Layout */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: -2.35rem;
    width: 12px;
    height: 12px;
    background: var(--accent-color);
    border-radius: 50%;
    top: 6px;
    box-shadow: 0 0 10px var(--accent-color);
}

.timeline-date {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
}

.timeline-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.timeline-content .company {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.timeline-content ul {
    color: var(--text-secondary);
}

.timeline-content ul li {
    margin-bottom: 0.5rem;
}

/* Services List */
.services-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.service-item {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--bg-tertiary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.service-item:hover {
    border-color: var(--accent-color);
    background: var(--bg-primary);
}

.service-icon {
    font-size: 1.8rem;
    color: var(--accent-color);
}

.service-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.service-text p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 5rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--accent-color);
    margin-top: 0.3rem;
}

.info-item h4 {
    margin-bottom: 0.3rem;
}

.info-item p {
    color: var(--text-secondary);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 1.2rem;
}

.social-links a:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-5px);
}

#contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-main);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: var(--bg-primary);
}

/* Footer */
.footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: var(--text-secondary);
}

.back-to-top {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (max-width: 768px) {

    .reveal-left,
    .reveal-right {
        transform: translateY(20px);
    }
}

.appear {
    opacity: 1;
    transform: translate(0, 0) !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-btns {
        justify-content: center;
    }

    .hero-stats {
        margin: 3rem auto 0;
        flex-direction: row;
        flex-wrap: wrap;
        max-width: 100%;
        justify-content: center;
        gap: 1.5rem;
    }

    .about-grid,
    .contact-grid,
    .split-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

/* Page Heros (for About & Project pages) */
.page-hero {
    text-align: center;
    background: var(--bg-secondary);
}

.centered {
    text-align: center;
}

.project-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: center;
}

.project-hero-text h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin: 1rem 0;
}

.project-lead {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.project-meta {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent-color);
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.meta-value {
    font-weight: 600;
}

.project-main-img {
    border-radius: 24px;
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5);
}

/* Project Details */
.details-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 6rem;
}

.details-text h2 {
    font-size: 1.8rem;
    margin: 2.5rem 0 1rem;
}

.details-text h2:first-child {
    margin-top: 0;
}

.tech-stack {
    margin-top: 3rem;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.tag-cloud span {
    padding: 0.5rem 1.2rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
}

.feature-card {
    background: var(--bg-secondary);
    padding: 2.5rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--accent-color);
    transform: translateY(-5px);
}

.feature-card i {
    color: var(--accent-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Project Navigation */
.pnav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Custom Lists */
.custom-list li {
    margin-bottom: 1rem;
    position: relative;
    padding-left: 2rem;
}

.custom-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: 900;
}

/* Responsive fixes for new pages */
@media (max-width: 968px) {

    .project-hero-grid,
    .details-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .project-hero-text {
        text-align: center;
    }

    .project-meta {
        justify-content: center;
        gap: 2rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 999;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    [dir="rtl"] .nav-links {
        right: auto;
        left: -100%;
    }

    .nav-links.active {
        right: 0;
    }

    [dir="rtl"] .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }

    .section-padding {
        padding: 60px 0;
    }

    .hero-text h1 {
        font-size: 2.8rem;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
    }

    .hero-btns .btn {
        width: 100%;
        text-align: center;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .stat-num {
        font-size: 2rem;
    }

    /* Projects Mobile Fix */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .project-card {
        width: 100%;
        max-width: 100%;
    }

    .project-img {
        height: 200px;
    }

    .section-title,
    [dir="rtl"] .section-title:not(.centered) {
        text-align: center;
    }

    .section-title .subtitle,
    [dir="rtl"] .section-title .subtitle {
        text-align: center;
    }
}

/* Arabic Specific Font */
.rtl-font {
    font-family: 'Cairo', sans-serif !important;
}

.rtl-font h1,
.rtl-font h2,
.rtl-font h3,
.rtl-font h4 {
    font-family: 'Cairo', sans-serif !important;
}

/* RTL Adjustments */
[dir="rtl"] .hero-stats {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .career-objective-box {
    border-left: none;
    border-right: 4px solid var(--accent-color);
    border-radius: 12px 0 0 12px;
}

[dir="rtl"] .skill-card ul li {
    padding-left: 0;
    padding-right: 1.5rem;
}

[dir="rtl"] .skill-card ul li::before {
    left: auto;
    right: 0;
    content: '←';
}

[dir="rtl"] .timeline {
    padding-left: 0;
    padding-right: 2rem;
}

[dir="rtl"] .timeline::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .timeline-dot {
    left: auto;
    right: -2.35rem;
}

[dir="rtl"] .info-item,
[dir="rtl"] .service-item {
    text-align: right;
}

[dir="rtl"] .custom-list li {
    padding-left: 0;
    padding-right: 2rem;
}

[dir="rtl"] .custom-list li::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .logo span {
    display: inline-block;
}

[dir="rtl"] .about-content {
    text-align: right;
}

[dir="rtl"] .section-title:not(.centered) {
    text-align: right;
}

[dir="rtl"] .hero-text {
    text-align: right;
}

[dir="rtl"] .hero-btns {
    justify-content: flex-start;
}

@media (max-width: 1024px) {
    [dir="rtl"] .hero-btns {
        justify-content: center;
    }
}

/* Fix for mobile horizontal scroll */
body {
    width: 100%;
    position: relative;
    overflow-x: hidden;
}

@media (max-width: 480px) {
    .contact-grid {
        padding: 1rem;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-actions #lang-toggle {
        margin-right: 0.5rem !important;
        padding: 0.4rem 0.8rem !important;
    }

    [dir="rtl"] .nav-actions #lang-toggle {
        margin-right: 0 !important;
        margin-left: 0.5rem !important;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }
}

/* Ensure images don't cause overflow on small screens */
.about-image img,
.project-img img {
    max-width: 100%;
    height: auto;
}

[dir="rtl"] .nav-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .mobile-menu-btn {
    margin-right: 1rem;
    margin-left: 0;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--accent-color);
    color: white !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: var(--accent-hover);
}

[dir="rtl"] .back-to-top {
    right: auto;
    left: 30px;
}