@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@200;300;400;500;600;700;800;900;1000&display=swap');

:root {
    --brand-primary: #ef8518;
    --brand-secondary: #e22521;
    --brand-dark: #0f0f0f;
    --brand-darker: #050505;
    --brand-text-muted: #a0a0a0;
}

html, body {
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: auto; /* Use auto because JS handles smooth scrolling */
}

@media (min-width: 992px) {
    html, body {
        scroll-snap-type: y mandatory;
        scroll-padding-top: 0px; /* Navbar height */
    }
}

/* Fix modal scrolling with snap-scroll */
html.modal-open,
body.modal-open {
    overflow: hidden !important;
}

@media (min-width: 992px) {
    html.modal-open,
    body.modal-open {
        scroll-snap-type: none !important;
    }
}

/* Premium Page Loader */
#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 5, 5, 0.85);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: transform 0.8s cubic-bezier(0.86, 0, 0.07, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

#page-loader.loader-hidden {
    transform: translateY(-100%);
}

.loader-content {
    text-align: center;
    width: 100%;
    max-width: 300px;
}

.loader-logo-container {
    margin-bottom: 40px;
    animation: loader-pulse 2s ease-in-out infinite;
}

.loader-logo {
    height: 80px;
    filter: drop-shadow(0 0 15px rgba(239, 133, 24, 0.3));
}

.loader-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
    box-shadow: 0 0 10px var(--brand-primary);
    animation: loader-progress 2.5s cubic-bezier(0.1, 0, 0.1, 1) infinite;
}

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

@keyframes loader-progress {
    0% { width: 0%; left: 0; }
    50% { width: 100%; left: 0; }
    100% { width: 0%; left: 100%; }
}

body.loading {
    overflow: hidden !important;
}

@media (min-width: 992px) {
    body.loading {
        scroll-snap-type: none !important;
    }
}

body {
    font-family: 'Raleway', sans-serif;
    color: white;
}

/* Force Cairo font for Arabic with high specificity */
[lang="ar"], 
[lang="ar"] body,
[lang="ar"] .hero-title,
[lang="ar"] .display-1,
[lang="ar"] .display-2,
[lang="ar"] .display-3,
[lang="ar"] .display-4,
[lang="ar"] .display-5,
[lang="ar"] h1, 
[lang="ar"] h2, 
[lang="ar"] h3, 
[lang="ar"] h4, 
[lang="ar"] h5, 
[lang="ar"] h6,
[lang="ar"] .nav-link,
[lang="ar"] .btn,
[lang="ar"] .footer-link,
[lang="ar"] .ios-item-title,
[lang="ar"] .ios-item-subtitle,
[lang="ar"] .ios-list-header {
    font-family: 'Cairo', sans-serif !important;
}

a {
    text-decoration: none !important;
}

.gov-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.015);
}

.gov-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--brand-primary-50);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.gov-logo-box {
    background: white;
    padding: 10px;
    border-radius: 0.75rem;
    width: 100%;
    height: 120px;
    aspect-ratio: 3/2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gov-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.4s ease;
}

.gov-card:hover .gov-logo-box {
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(239, 133, 24, 0.2);
}

.gov-card:hover .gov-logo {
    transform: scale(1.05);
}

.gov-card span {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    line-height: 1.4;
    color: #e0e0e0;
}

section {
    position: relative;
    padding: 100px 0; /* Standard section padding for mobile */
}

@media (min-width: 992px) {
    section {
        padding: 0;
        min-height: 100vh;
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
    
    footer {
        min-height: 100vh;
        scroll-snap-align: end;
    }
}

.gradient-bg {
    background: linear-gradient(
        180deg,
        var(--brand-darker) 0%,
        var(--brand-dark) 100%
    );
}

.hero-gradient {
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    width: 100%;
    display: flex;
    align-items: center;
}

@media (min-width: 992px) {
    .hero-gradient {
        height: 100vh;
        scroll-snap-align: start;
    }
}

.it-carousel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

@media (min-width: 992px) {
    .it-carousel-bg {
        height: 100vh;
    }
}

/* iOS Style List */
.ios-list {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.ios-item {
    display: flex;
    align-items: center;
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.05);
    color: #e0e0e0;
}

.ios-item:last-child {
    border-bottom: none;
}

.ios-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ios-item.active {
    background: rgba(239, 133, 24, 0.15);
}

.ios-icon {
    width: 32px;
    height: 32px;
    background: var(--brand-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.2rem;
    font-size: 1.1rem;
    color: white;
}

.ios-label {
    flex-grow: 1;
    font-weight: 500;
    font-size: 1.1rem;
}

.ios-arrow {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}

.ios-item.active .ios-arrow {
    color: var(--brand-primary);
    transform: translateX(3px);
}

/* IT Description Area */
.it-description-container {
    min-height: auto;
    display: flex;
    align-items: center;
    transition: all 0.5s ease;
    padding: 2rem 0;
}

@media (min-width: 992px) {
    .it-description-container {
        min-height: 350px;
        padding: 0;
    }
}

.fade-transition {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.fade-out {
    opacity: 0;
    transform: translateY(10px);
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.badge {
    font-weight: 500;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-content {
    position: relative;
    z-index: 10;
}

.hero-glow-circle {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(239, 133, 24, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    z-index: 3;
    pointer-events: none;
}

@media (min-width: 992px) {
    .hero-glow-circle {
        width: 600px;
        height: 600px;
        filter: blur(80px);
    }
}

.hero-glow-1 { top: -10%; right: -5%; }
.hero-glow-2 { bottom: -20%; left: -10%; }

.premium-glass {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 3rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
    animation: upFade 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.hero-sub-title {
    letter-spacing: 4px;
    opacity: 0.9;
    animation: upFade 1.1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

[lang="ar"] .hero-sub-title {
    letter-spacing: 0;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin-bottom: 2rem;
    line-height: 1.5;
    animation: upFade 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@media (min-width: 992px) {
    .hero-subtitle {
        font-size: 1.25rem;
        margin-bottom: 2.5rem;
        line-height: 1.6;
    }
}

.feature-chip {
    padding: 0.75rem 1.25rem;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    cursor: default;
    animation: upFade 1.4s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.feature-chip:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--brand-primary-50);
    transform: translateY(-5px);
}

.feature-chip i {
    font-size: 1.25rem;
    color: var(--brand-primary);
}

@keyframes upFade {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-image-container {
    position: relative;
    animation: floatingHero 6s ease-in-out infinite;
}

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

.hero-carousel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

@media (min-width: 992px) {
    .hero-carousel-bg {
        height: 100vh;
    }
}

.hero-carousel-bg .carousel,
.hero-carousel-bg .carousel-inner,
.hero-carousel-bg .carousel-item {
    height: 100%;
    width: 100%;
}

@media (min-width: 992px) {
    .hero-carousel-bg .carousel,
    .hero-carousel-bg .carousel-inner,
    .hero-carousel-bg .carousel-item {
        height: 100vh;
    }
}

.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(239, 133, 24, 0.15);
}

.why-tameem-section {
    background: linear-gradient(180deg, var(--brand-darker) 0%, rgba(10, 10, 10, 1) 50%, var(--brand-darker) 100%);
}

.feature-icon-box {
    width: 100px;
    height: 100px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-icon-box:hover {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--brand-primary);
    box-shadow: 0 0 30px rgba(239, 133, 24, 0.2);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-brand-primary {
    background: linear-gradient(
        135deg,
        var(--brand-primary) 0%,
        var(--brand-secondary) 100%
    );
    color: #fff;
    border: none;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-brand-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(239, 133, 24, 0.3);
    color: #fff;
}

.btn-brand-outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    padding: 12px 30px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-brand-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.vertical-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
    background-image: repeating-linear-gradient(
        90deg,
        transparent,
        transparent calc(100% / 12 - 1px),
        rgba(255, 255, 255, 0.04) calc(100% / 12 - 1px),
        rgba(255, 255, 255, 0.04) calc(100% / 12)
    );
}

@media (min-width: 992px) {
    .vertical-lines {
        background-image: repeating-linear-gradient(
            90deg,
            transparent,
            transparent calc(100% / 24 - 1px),
            rgba(255, 255, 255, 0.04) calc(100% / 24 - 1px),
            rgba(255, 255, 255, 0.04) calc(100% / 24)
        );
    }
}

.hero-overlay, .section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(5, 5, 5, 0.7) 0%, rgba(5, 5, 5, 0.9) 100%);
    z-index: 2;
}
.footer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(5, 5, 5, 0.7) 0%, rgba(5, 5, 5, 0.21) 100%);
    z-index: 2;
}
.service-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

body {
    font-family: 'Raleway', sans-serif;
    background-color: #050505;
    color: white;
    overflow-x: hidden;
}

[lang="ar"] body {
    font-family: 'Tajawal', sans-serif;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--brand-primary);
    transition: height 0.3s ease;
}

.service-card.active {
    background: rgba(239, 133, 24, 0.1);
    border-color: rgba(239, 133, 24, 0.3);
    transform: translateY(-10px);
}

.service-card.active::before {
    height: 4px; /* Default for mobile top bar */
}

@media (min-width: 992px) {
    .service-card.active::before {
        height: 100%;
    }
}

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

@media (max-width: 991.98px) {
    .service-card {
        padding: 1.5rem;
    }
}

.service-icon {
    font-size: 2.5rem;
    color: var(--brand-primary);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.service-card.active .service-icon {
    transform: scale(1.1);
}

.services-carousel-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.services-carousel-bg .carousel,
.services-carousel-bg .carousel-inner,
.services-carousel-bg .carousel-item {
    height: 100%;
}

@media (min-width: 992px) {
    .services-carousel-bg .carousel,
    .services-carousel-bg .carousel-inner,
    .services-carousel-bg .carousel-item {
        height: 100vh;
    }
}

.carousel-item img {
    object-fit: cover;
    height: 100%;
}

.carousel-control-prev, .carousel-control-next {
    width: 5%;
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--brand-primary);
}

.text-brand-primary {
    color: var(--brand-primary);
}
.text-brand-secondary {
    color: var(--brand-secondary);
}


.nav-blur {
    background: rgba(5, 5, 5, 0.28) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-scrolled {
    background: rgba(5, 5, 5, 0.362) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-bottom-color: rgba(239, 133, 24, 0.2);
}

/* Removed duplicate hero definitions */

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-link {
    color: var(--brand-text-muted) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #ffffff !important;
}

@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
}

/* iOS Style Contact Modal */
#contactModal {
    background: rgba(10, 10, 10, 0.432) !important;
    backdrop-filter: blur(20px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
}
.ios-modal-content {
    background: rgba(10, 10, 10, 0.381) !important;
    backdrop-filter: blur(10px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(40px) saturate(200%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 24px !important;
    color: white !important;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8) !important;
}

.modal-backdrop.show {
    backdrop-filter: blur(25px);
    background-color: rgba(0, 0, 0, 0.75);
}

.ios-close-btn {
    background-color: rgba(255, 255, 255, 0.1) !important;
    padding: 0.5rem !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
}

.ios-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.ios-list-group {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
}

.ios-list-header {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    padding: 1rem 1rem 0.5rem;
    letter-spacing: 0.5px;
}

.ios-list-body {
    display: flex;
    flex-direction: column;
}

.ios-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: transparent;
    transition: background 0.2s ease;
    border-bottom: 0.5px solid rgba(255, 255, 255, 0.1);
    text-decoration: none !important;
}

.ios-list-item:last-child {
    border-bottom: none;
}

.ios-list-item.no-border {
    border-bottom: none;
}

.ios-list-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ios-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.ios-item-title {
    font-weight: 600;
    font-size: 1rem;
    color: white;
}

.ios-item-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

.ios-chevron {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

/* Redesigned Footer Styles */
.footer-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.footer-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-image: url('imgs/footer.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    filter: brightness(0.4);
}

.social-icon-box {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-decoration: none !important;
}

.social-icon-box:hover {
    background: var(--brand-primary);
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(239, 133, 24, 0.2);
    border-color: var(--brand-primary);
}

.footer-link {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none !important;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-link:hover {
    color: white;
    transform: translateX(5px);
}

.footer-newsletter .form-control {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    padding: 12px 20px;
    transition: all 0.3s ease;
}

.footer-newsletter .form-control:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--brand-primary);
    box-shadow: 0 0 15px rgba(239, 133, 24, 0.1);
}

.footer-newsletter .form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

#contact {
    scroll-snap-align: start;
}
