/* === VARIABLES === */
@font-face {
    font-family: 'MiSansArabic';
    src: url('../webfonts/MiSansArabic-Normal.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --color-primary: #AB3428;
    --color-primary-hover: #ab3428e0;
    --color-secondary: #64748b;
    --color-accent: #AB3428;
    --color-background: #ffffff;
    --color-text: #334155;
    --color-text-light: #64748b;
    --color-heading: #1e293b;
    --color-border: #e2e8f0;
    --color-card: #ffffff;
    --color-card-hover: #f8fafc;
    --color-overlay: rgba(15, 23, 42, 0.8);
    --color-success: #10b981;
    --color-error: #ef4444;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --red-500: #AB3428; 
    --red-600: #892a21;
}

/* === GENERAL STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'MiSansArabic', sans-serif;
    color: var(--color-text);
    line-height: 1.6;
    background-color: var(--color-background);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-heading);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--color-primary);
    transition: var(--transition);
}

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

ul, ol {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.btn {
    display: inline-block;
    padding: 1rem 1.4em;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
    border: none;
    font-size: 15px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    font-family: 'MiSansArabic', sans-serif;
}

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

.btn-outline {
    background-color: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-outline:hover {
    background-color: var(--color-card-hover);
}

.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    background-color: rgb(240 240 240);
    color: var(--color-primary);
    padding: 0.25rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title {
    font-size: 2rem;
    color: var(--color-heading);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--color-primary);
}

section {
    padding: 3rem 0;
    position: relative;
}

/* === HEADER === */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: background-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                backdrop-filter 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                left 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                right 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.5rem 0;
    border-radius: 0;
    border: 1px solid transparent;
}

.header.scrolled {
    background-color: rgb(255 255 255 / 87%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 0.875rem 0;
    top: 1rem;
    width: 95%;
    max-width: 1400px;
    border-radius: 16px;
    margin: 0 auto;
    left: 2.5%;
    right: 2.5%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

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

.progress-bar-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: rgba(171, 52, 40, 0.08);
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.header.scrolled .progress-bar-container {
    opacity: 1;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
    width: 0%;
    box-shadow: 0 0 10px rgba(171, 52, 40, 0.3);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: font-size 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header.scrolled .logo {
    font-size: 1.35rem;
}

.nav-menu {
    display: flex;
}

.nav-menu ul {
    display: flex;
    gap: 2.5rem;
    transition: gap 0.3s ease;
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 999;
    transition: left 0.4s ease;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6rem 2rem 2rem;
    gap: 2rem;
}

.mobile-menu a {
    color: var(--color-heading);
    font-weight: 500;
    font-size: 1.25rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.mobile-menu a:hover {
    color: var(--color-primary);
}

.header.scrolled .nav-menu ul {
    gap: 1.75rem;
}

.nav-menu a {
    color: var(--color-heading);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    font-size: 1rem;
    transition: font-size 0.3s ease, color 0.3s ease;
}

.header.scrolled .nav-menu a {
    font-size: 0.95rem;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

/* === HAMBURGER MENU === */
.hamburger {
    display: none;
    cursor: pointer;
    z-index: 1001;
    position: relative;
    width: 30px;
    height: 24px;
    padding: 0;
}

.hamburger .bar {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-heading);
    position: absolute;
    left: 0;
    transition: all 0.3s ease-in-out;
    border-radius: 3px;
}

.hamburger .bar:nth-child(1) {
    top: 0;
}

.hamburger .bar:nth-child(2) {
    top: 10.5px;
}

.hamburger .bar:nth-child(3) {
    top: 21px;
}

.hamburger.active .bar:nth-child(1) {
    top: 10.5px;
    transform: rotate(45deg);
    background-color: var(--color-primary);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    top: 10.5px;
    transform: rotate(-45deg);
    background-color: var(--color-primary);
}

/* === MOBILE MENU === */
.mobile-menu {
    display: none;
    position: fixed;
    top: -100%;
    left: 0;
    right: 0;
    width: 92%;
    margin: 0 auto;
    max-height: 50vh;
    background: rgba(255, 255, 255, 0.98);
    z-index: 997;
    transition: top 0.3s ease, opacity 0.25s ease;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow-y: auto;
    opacity: 0;
    will-change: top, opacity;
    transform: translateZ(0);
}

.mobile-menu.active {
    opacity: 1;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem;
    gap: 0.75rem;
    margin: 0;
}

.mobile-menu li {
    width: 100%;
}

.mobile-menu a {
    color: var(--color-heading);
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    width: 100%;
    border: 1px solid rgba(171, 52, 40, 0.1);
    will-change: transform;
    transform: translateZ(0);
}

.mobile-menu a:hover,
.mobile-menu a:active {
    color: white;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    transform: translateX(-3px) translateZ(0);
    box-shadow: 0 4px 15px rgba(171, 52, 40, 0.3);
    border-color: var(--color-primary);
}

.mobile-menu a i {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.mobile-menu a:hover i,
.mobile-menu a:active i {
    transform: scale(1.15);
}

@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
    }
    
    .header,
    .mobile-menu,
    .hamburger {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        -webkit-perspective: 1000;
        perspective: 1000;
    }
    
    .mobile-menu {
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    }
    
    .mobile-menu a {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }
}

/* Scrollbar */
.mobile-menu::-webkit-scrollbar {
    width: 6px;
}

.mobile-menu::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

.mobile-menu::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 10px;
}

.mobile-menu::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-hover);
}

/* === HERO SECTION === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 5rem;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: linear-gradient(to top, var(--color-background), transparent);
    z-index: 1;
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    position: relative;
    z-index: 2;
}

.hero-image {
    flex: 1;
    max-width: 400px;
}

.hero-image img {
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 5px solid white;
}

.hero-text {
    flex: 1;
}

.hero-text .subtitle {
    display: block;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.hero-text .title {
    font-size: 35px;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text .description {
    font-size: 16px;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    direction: rtl;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

/* === PROJECTS SECTION === */
.projects {
    background-color: #f8fafc;
}

.project-categories {
    display: flex;
    justify-content: center;
    /* gap: 1rem; */
    gap: 0.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    direction: rtl;
    padding: 0 1rem;
    position: relative;
}

.category-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--color-border);
    border-radius: 2rem;
    background-color: white;
    color: var(--color-text);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'MiSansArabic', sans-serif;
    direction: rtl;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.category-btn i {
    font-size: 1rem;
    margin-left: 0.5rem;
}

.category-btn:hover {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-btn.active {
    background-color: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--color-card);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.project-image img {
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-icon {
    color: white;
    font-size: 2rem;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.project-card:hover .view-icon {
    transform: scale(1);
}

.project-content {
    padding: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 160px;
}

.project-title {
    font-size: 15px;
    margin-bottom: 0.75rem;
    color: var(--color-heading);
    transition: var(--transition);
    white-space: normal; 
    overflow: visible;
    text-overflow: clip;
    text-align: right;
    direction: rtl;
}

.project-card:hover .project-title {
    color: var(--color-primary);
}

.project-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: absolute;
    bottom: 1.5rem;
    left: 25px;
    right: 25px;
    margin-top: 1rem;
}


@media screen and (max-width: 768px) {
    .project-content {
        min-height: 180px;
    }
    
    .project-meta {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        margin-top: 1.5rem;
    }
}

.project-type {
    font-size: 0.875rem;
    color: var(--color-primary);
    background-color: rgb(240 240 240);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
}

.project-date {
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.project-view-btn {
    font-size: 0.875rem;
    color: var(--color-accent);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.project-view-btn:hover {
    color: var(--color-primary);
}

.projects-loading,
.projects-error,
.project-loading,
.project-error {
    text-align: center;
    padding: 4rem 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.projects-loading i,
.projects-error i,
.project-loading i,
.project-error i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.projects-loading p,
.projects-error p,
.project-loading p,
.project-error p {
    color: var(--color-text);
    font-size: 1rem;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top: 4px solid var(--color-primary);
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* === PROJECT MODAL === */
.modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.9);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 4rem auto;
    max-width: 1400px;
    width: 90%;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--color-heading);
    direction: rtl;
}

.modal-close {
    font-size: 1.75rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--color-error);
}

.modal-body {
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

.modal-main-image {
    position: relative;
    width: 100%;
    max-height: 500px;
    overflow: hidden;
}

.modal-main-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

/* Make thumbnails container scrollable but neat */
.modal-thumbnails {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) #f1f5f9;
    max-width: 100%;
    flex-wrap: nowrap;
}

/* Style the scrollbar for webkit browsers */
.modal-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.modal-thumbnails::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.modal-thumbnails::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 3px;
}

/* Ensure thumbnails are consistent size */
.thumb {
    min-width: 70px;
    max-width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 7px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

/* Fix for mobile views */
@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
    
    .modal-main-image img {
        max-height: 300px;
    }
    
    .modal-content {
        margin: 1rem auto;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Add overflow control to entire modal for very large content */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

.thumb.active {
    border-color: var(--color-primary);
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
}

.meta-label {
    font-size: 0.75rem;
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
}

.meta-value {
    font-weight: 500;
    color: var(--color-heading);
}

.modal-description h3,
.modal-technologies h3 {
    font-size: 1.125rem;
    direction: rtl;
}

.modal-description {
    margin-bottom: 1.5rem;
}

.modal-technologies {
    margin-bottom: 1.5rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    direction: ltr;
}

.tech-tag {
    background-color: #f1f5f9;
    color: var(--color-text);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.875rem;
}

.modal-links {
    display: flex;
    gap: 1rem;
}

/* === PROJECT DETAIL PAGE === */
.project-detail {
    padding-top: 8rem;
    padding-bottom: 6rem;
}

.back-link {
    margin-bottom: 2rem;
}

.back-link a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text);
}

.back-link a:hover {
    color: var(--color-primary);
}

.project-detail-header {
    margin-bottom: 3rem;
    text-align: center;
}

.project-detail-header .project-title {
    font-size: 2.5rem;
    margin-bottom: 5rem;
}

.project-detail-header .project-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.project-detail-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
}

.project-gallery {
    position: relative;
}

.project-gallery .main-image {
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.project-gallery .thumbnails {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.project-info h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

/* .project-info h2::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--color-primary);
} */

.project-description {
    margin-bottom: 2rem;
    direction: rtl;
}

.project-technologies {
    margin-bottom: 2.5rem;
    direction: rtl;
}

.project-actions {
    display: flex;
    gap: 1rem;
}

/* === SKILLS SECTION === */
.skills-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.skills-category {
    background-color: var(--color-card);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.skills-category:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--color-heading);
    position: relative;
    padding-bottom: 0.75rem;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: var(--color-primary);
}

.skills-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
}

.skill-item {
    text-align: center;
}

.skill-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background-color: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--color-primary);
    transition: var(--transition);
}

.skill-item:hover .skill-icon {
    transform: scale(1.1);
}

.skill-icon.php { color: #777BB4; }
.skill-icon.python { color: #3776AB; }
.skill-icon.mysql { color: #4479A1; }
.skill-icon.api { color: #FF6C37; }
.skill-icon.html { color: #E34F26; }
.skill-icon.css { color: #1572B6; }
.skill-icon.js { color: #F7DF1E; background-color: #333; }
.skill-icon.bootstrap { color: #7952B3; }
.skill-icon.github { color: #181717; }

.skill-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.skill-name {
    font-size: 0.875rem;
    color: var(--color-text);
    margin-bottom: 0;
}

/* === CONTACT SECTION === */
.contact {
    background-color: #f8fafc;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    direction: rtl;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--color-card);
    border-radius: 0.5rem;
    transition: var(--transition);
}

.contact-link:hover {
    background-color: var(--color-primary);
    color: white;
}

.contact-link i {
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.contact-form-container h3 {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background-color: white;
    transition: var(--transition);
    font-family: 'MiSansArabic', sans-serif;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    outline: none;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* === FOOTER === */
.footer {
    background-color: #1e293b;
    color: #cbd5e1;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #cbd5e1;
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: white;
}

/* === BACK TO TOP === */
.back-to-top {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    background-color: var(--color-primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--color-primary-hover);
    color: white;
}

/* === MEDIA QUERIES === */
@media (max-width: 992px) {
    .hero-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-text .title {
        font-size: 30px;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .project-detail-content {
        grid-template-columns: 1fr;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.75rem;
    }
    
    .header.scrolled {
        width: 92%;
        top: 0.75rem;
        left: 4%;
        right: 4%;
        border-radius: 14px;
        z-index: 1000;
    }
    
    .hamburger {
        display: block;
        z-index: 1001;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu {
        display: block;
        z-index: 997;
    }
    
    .header.scrolled ~ .mobile-menu.active {
        top: 80px;
    }
    
    .header .progress-bar-container {
        z-index: 1;
        position: absolute;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 2rem auto;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
    
    .modal-main-image img {
        max-height: 300px;
    }
    
    .skills-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .project-categories {
        gap: 0.5rem;
        padding: 0 0.5rem;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        padding-bottom: 1.5rem;
        margin-bottom: 2rem;
    }

    .project-categories::-webkit-scrollbar {
        display: none;
    }

    .category-btn {
        padding: 0.4rem 0.8rem;
        min-width: 40%;
        max-width: 40%;
        font-size: 0.8rem;
        flex-shrink: 0;
        height: 32px;
    }

    .category-btn i {
        font-size: 0.8rem;
        margin-left: 0.25rem;
    }

    @keyframes swipeIndicator {
        0% {
            transform: translateX(-50%) scaleX(1);
            opacity: 0.5;
        }
        50% {
            transform: translateX(-50%) scaleX(0.8);
            opacity: 0.3;
        }
        100% {
            transform: translateX(-50%) scaleX(1);
            opacity: 0.5;
        }
    }

    .projects-loading,
    .projects-error,
    .project-loading,
    .project-error {
        padding: 2rem 0;
    }

    .projects-loading i,
    .projects-error i,
    .project-loading i,
    .project-error i {
        font-size: 1.75rem;
    }

    .projects-loading p,
    .projects-error p,
    .project-loading p,
    .project-error p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .hero-text .title {
        font-size: 20px;
    }
    
    .project-title {
        font-size: 1.125rem;
    }
    
    .project-detail-header .project-title {
        font-size: 1.75rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .category-btn {
        min-width: 55%;
        max-width: 55%;
    }
}

@media (max-width: 576px) {
    .hero-text .title {
        font-size: 20px;
    }
    
    .project-title {
        font-size: 1.125rem;
    }
    
    .project-detail-header .project-title {
        font-size: 1.75rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
}

/* === UTILITIES === */
.mt-4 {
    margin-top: 1rem;
}

.container #logo {
    font-size: 20px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red-500), var(--red-600));
    padding: 8px;
    border-radius: 10px;
}

.image-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1200;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.image-lightbox.active {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    animation: zoomIn 0.3s ease-in-out;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 36px;
    color: #fff;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-nav {
    position: absolute;
    font-size: 30px;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
    border: 3px solid #fff;
}

.lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
    left: -60px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
}

@media screen and (max-width: 768px) {
    .lightbox-content {
        align-items: flex-start;
    }

    .lightbox-image {
        max-height: 70vh;
    }

    .lightbox-nav {
        position: static;
        transform: none;
        margin: 10px 10px 0;
    }

    .lightbox-prev,
    .lightbox-next {
        display: inline-flex;
    }

    .lightbox-nav-container {
        display: flex;
        justify-content: center;
        gap: 150px;
        margin-top: 10px;
        margin-left: auto;
        margin-right: auto;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-description,
.modal-technologies {
  text-align: right;
}

.highlight {
  position: relative;
  display: inline-block;
}

.highlight::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -8px;
  width: 100%;
  height: 4px;
  background: var(--color-primary);
  border-radius: 4px;
}

.swal2-container {
    z-index: 1200 !important;
}

/* === SERVICES SECTION === */
.services {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--color-card-hover) 0%, rgba(255,255,255,0.02) 100%);
    text-align: right;
    position: relative;
    overflow: hidden;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(59,130,246,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.7;
    pointer-events: none;
}

.services .container {
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.section-title {
    font-size: 2.5rem;
    color: var(--color-heading);
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-light);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--color-card);
    border-radius: 1rem;
    padding: 2rem 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 320px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border-color: var(--color-primary);
}

.service-icon {
    font-size: 3rem;
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
}

.service-card:hover .service-icon {
    color: var(--color-primary-hover);
    transform: scale(1.1);
}

.service-title {
    font-size: 20px;
    color: var(--color-heading);
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.service-brief {
    font-size: 1rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    flex-grow: 1;
    line-height: 1.6;
}

.service-details-btn {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: white;
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    border: none;
    font-family: 'MiSansArabic', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px #ab342836;
}

.service-details-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.service-details-btn:hover::before {
    left: 100%;
}

.service-details-btn:hover {
    background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 25px #ab342869;
}

.service-details-btn i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.service-details-btn:hover i {
    transform: translateX(-3px);
}

/* === SERVICE MODAL === */
.service-modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    animation: modalBackdropFadeIn 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.service-modal .modal-content {
    background: var(--color-card);
    margin: 2rem auto;
    max-width: 800px;
    width: 100%;
    border-radius: 1rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    animation: modalSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 2;
    overflow: hidden;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    direction: rtl;
}

.service-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--color-border);
    background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary));
    color: white;
    flex-shrink: 0;
}

.service-modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: white;
    font-weight: 700;
}

.service-modal .modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-modal .modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.service-modal .modal-body {
    padding: 0;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.modal-body-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 0;
    min-height: 100%;
}

.modal-description-section {
    padding: 2rem;
    background: var(--color-card);
}

.modal-benefits-section {
    padding: 2rem;
    background: var(--color-card-hover);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
}

.service-modal .modal-description {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.service-modal .modal-description p {
    margin-bottom: 1.5rem;
}

.service-modal .modal-description strong {
    color: var(--color-primary);
    font-weight: 600;
}

.modal-benefits {
    margin-bottom: 2rem;
}

.modal-benefits h4 {
    color: var(--color-heading);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.modal-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-benefits li {
    padding: 3px;
    color: var(--color-text);
    position: relative;
    padding-right: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 0.95rem;
}

.modal-benefits li:last-child {
    border-bottom: none;
}

.modal-benefits li::before {
    content: '✓';
    position: absolute;
    right: 0;
    top: 0.75rem;
    color: var(--color-primary);
    font-weight: bold;
    font-size: 1.1rem;
}

.service-modal .modal-contact {
    background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary));
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    color: white;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.service-modal .modal-contact h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: #ffff;
}

.service-modal .modal-contact p {
    margin-bottom: 1rem;
    opacity: 0.9;
    font-size: 0.9rem;
}

.service-modal .modal-contact .btn {
    background: white;
    color: var(--color-primary);
    padding: 0.875rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.service-modal .modal-contact .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
    background: rgba(255,255,255,0.95);
}

/* === ANIMATIONS === */
@keyframes modalSlideIn {
    0% {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalBackdropFadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .modal-body-content {
        grid-template-columns: 1fr 320px;
    }
}

@media (max-width: 768px) {
    .services {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        min-height: 280px;
        padding: 1.5rem;
    }

    .service-modal {
        padding: 10px;
    }

    .service-modal .modal-content {
        margin: 1rem auto;
        width: 100%;
        max-height: calc(100vh - 20px);
    }
    
    .service-modal .modal-header {
        padding: 1rem 1.5rem;
    }

    .service-modal .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-body-content {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .modal-description-section {
        padding: 1.5rem;
        order: 1;
    }

    .modal-benefits-section {
        padding: 1.5rem;
        border-right: none;
        border-top: 1px solid var(--color-border);
        order: 2;
    }

    .service-modal .modal-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .modal-benefits h4 {
        font-size: 1.1rem;
    }

    .modal-benefits li {
        font-size: 0.9rem;
        padding: 0.6rem 0;
    }

    .service-modal .modal-contact {
        margin-top: 1rem;
        padding: 1.25rem;
    }

    .service-modal .modal-contact h3 {
        font-size: 1.1rem;
    }

    .service-modal .modal-contact p {
        font-size: 0.85rem;
    }

    .service-modal .modal-contact .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 1.75rem;
    }
    
    .service-title {
        font-size: 1.25rem;
    }

    .service-icon {
        font-size: 2.5rem;
    }

    .service-details-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .service-modal .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .service-modal .modal-contact h3 {
        font-size: 1rem;
    }

    .modal-description-section,
    .modal-benefits-section {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .services {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    .service-card {
        min-height: 260px;
        padding: 1.25rem;
    }
    
    .service-brief {
        font-size: 0.95rem;
    }

    .service-modal {
        padding: 5px;
    }

    .service-modal .modal-content {
        margin: 0.5rem auto;
        border-radius: 0.5rem;
    }

    .modal-description-section,
    .modal-benefits-section {
        padding: 1rem;
    }

    .service-modal .modal-contact {
        padding: 1rem;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(59,130,246,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.7;
    pointer-events: none;
}


/* Sections Widget */
.sections-widget {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    font-family: 'MiSansArabic', Arial, sans-serif;
}

.main-sections-btn {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--red-500), var(--red-600));
    color: white;
    box-shadow: var(--shadow-md);
    border: none;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    left: 35px;
}

.main-sections-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-xl);
}

.main-sections-btn:active {
    transform: scale(0.95);
}

.main-sections-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), transparent);
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.main-sections-btn:hover::before {
    opacity: 1;
}

.sections-text {
    position: absolute;
    left: 80px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    animation: slideInLeft 0.3s ease-out;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sections-text:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.05);
}

.sections-buttons {
    position: absolute;
    bottom: 80px;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sections-buttons.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sections-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 160px;
    height: 45px;
    border-radius: var(--radius-full);
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--red-500), var(--red-600));
    border-radius: 10px;
}

.sections-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.sections-btn:hover::before {
    left: 100%;
}

.sections-btn:hover {
    color: #fff; 
}

.sections-btn:hover {
    transform: translateX(10px) scale(1.05);
    box-shadow: var(--shadow-xl);
}

.sections-btn:active {
    transform: translateX(5px) scale(0.98);
}

.sections-btn .icon {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.sections-btn:hover .icon {
    transform: scale(1.2) rotate(10deg);
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px) translateY(-50%);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(-50%);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.3);
    }
    50% {
        opacity: 1;
        transform: translateY(-10px) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .sections-widget {
        display: none;
    }
}
.sections-buttons.show .sections-btn {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.about {
    padding: 100px 0;
    background: #f9fafb;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
    direction: rtl;
}

.about-image img {
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    max-width: 350px;
    width: 100%;
    height: auto;
}

.about-text {
    flex: 1;
}

.about-text .section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--red-600);
}

.about-description {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 15px;
}

.about-description.highlight {
    background: #fff;
    padding: 15px 20px;
    border-left: 4px solid var(--red-600);
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    font-weight: 500;
}

/* Google reCAPTCHA */
.form-submit-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.g-recaptcha {
    transform: scale(0.95);
    transform-origin: left center;
    order: 2;
}

.form-submit-area .btn {
    flex-shrink: 0;
    min-width: 150px;
    order: 1;
}

@media (max-width: 768px) {
    .form-submit-area {
        flex-direction: column;
        align-items: stretch;
    }
    
    .g-recaptcha {
        transform: scale(0.85);
        transform-origin: center center;
        align-self: center;
    }
    
    .form-submit-area .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .g-recaptcha {
        transform: scale(0.75);
    }
}

/* Loading Spinner for Thumbnails */
.thumb {
    position: relative;
    overflow: hidden;
}

.thumb-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #AB3428;
    border-radius: 7px;
    z-index: 2;
}

.thumb-loading i {
    font-size: 1.5rem;
    color: #AB3428;
    animation: spinThumbLoader 1s linear infinite;
}

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

.thumb img {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.thumb img.loaded {
    opacity: 1;
}

.thumb-loading.fade-out {
    animation: fadeOutThumbSpinner 0.3s ease-out forwards;
}

@keyframes fadeOutThumbSpinner {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* === HERO MOBILE ENHANCEMENTS === */
.hero-mobile-badge,
.hero-mobile-title {
    display: none;
}

@media (max-width: 768px) {
    .hero-image {
        position: relative;
        border-radius: 1.5rem;
        overflow: hidden;
    }
    
    .hero-mobile-badge {
        display: flex;
        align-items: center;
        gap: 8px;
        position: absolute;
        top: 20px;
        left: 20px;
        background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
        color: white;
        padding: 10px 18px;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(171, 52, 40, 0.4);
        font-weight: 600;
        font-size: 13px;
        z-index: 2;
        animation: slideInFromTop 0.6s ease-out;
    }
    
    .hero-mobile-badge i {
        font-size: 16px;
        animation: checkPulse 2s ease-in-out infinite;
    }
    
    .hero-mobile-title {
        display: block;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.6), transparent);
        color: white;
        padding: 40px 20px 20px;
        z-index: 2;
        animation: slideInFromBottom 0.6s ease-out;
    }
    
    .hero-mobile-title h2 {
        font-size: 16px;
        font-weight: 600;
        margin: 0;
        line-height: 1.4;
        color: white;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .hero-text .subtitle,
    .hero-text .title {
        display: none;
    }
    
    /* Animations */
    @keyframes slideInFromTop {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    @keyframes slideInFromBottom {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    @keyframes checkPulse {
        0%, 100% {
            transform: scale(1);
        }
        50% {
            transform: scale(1.1);
        }
    }
}

@media (max-width: 576px) {
    .hero-mobile-badge {
        top: 15px;
        left: 15px;
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .hero-mobile-badge i {
        font-size: 14px;
    }
    
    .hero-mobile-title {
        padding: 35px 15px 15px;
    }
    
    .hero-mobile-title h2 {
        font-size: 14px;
    }
}