/* =========================================
   YALSSA BASE STYLES & VARIABLES
   ========================================= */
:root {
    /* Colors based on Des.md */
    --primary: #FF5A36;
    --primary-hover: #E34A29;
    --bg-white: #FFFFFF;
    --bg-light: #F8F9FA;
    --text-dark: #111111;
    --text-gray: #555555;
    --text-light: #888888;
    --dark-footer: #0A0A0A;

    /* Typography */
    --font-heading: 'Alexandria', sans-serif;
    --font-body: 'Tajawal', sans-serif;

    /* Spacing */
    --section-padding: 120px 0;
    /* Pro Max: Increased for better breathability */
    --border-radius: 24px;
    --border-radius-sm: 12px;

    /* Shadows (Pro Max deeper elevation) */
    --shadow-soft: 0 30px 60px rgba(0, 0, 0, 0.08);
    /* Darker, spread out */
    --shadow-hover: 0 40px 80px rgba(255, 90, 54, 0.15), 0 15px 30px rgba(0, 0, 0, 0.06);
    /* Rich 2-layer shadow */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.6;
    color: var(--text-gray);
    background-color: var(--bg-white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-padding {
    padding: var(--section-padding);
}

.text-primary {
    color: var(--primary);
}

.text-center {
    text-align: center;
}

.bg-light {
    background-color: var(--bg-light);
}

.bg-primary {
    background-color: var(--primary);
    color: white;
}

.mt-5 {
    margin-top: 50px;
}

/* =========================================
   BUTTONS & UI ELEMENTS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    /* Pro Max velvet curve */
    border: none;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 90, 54, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 90, 54, 0.3);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 18px;
}

.badge {
    display: inline-block;
    padding: 8px 16px;
    background-color: rgba(255, 90, 54, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 14px;
    margin-bottom: 20px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: var(--shadow-soft);
}

/* =========================================
   TYPOGRAPHY SPECIFICS
   ========================================= */
.section-subtitle {
    display: block;
    color: var(--primary);
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 20px;
}

.section-desc {
    font-size: 20px;
    max-width: 600px;
    margin: 0 auto 50px;
}

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background-color: rgba(255, 255, 255, 0.9);
    /* More transparent for better glass */
    backdrop-filter: blur(20px);
    /* Pro Max heavier blur */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar.scrolled {
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.logo svg {
    height: 40px;
    width: auto;
}

.logo:hover {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    color: var(--text-dark);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-dark);
    cursor: pointer;
}

/* =========================================
   1. HERO SECTION
   ========================================= */
.hero {
    padding: 180px 0 0;
    /* Shift content upwards to top third */
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    /* Align content to the top */
    position: relative;
    overflow: hidden;
    background-image: url('assets/images/stc/bkground.jpg');
    background-size: cover;
    background-position: center center;
    /* Anchored to the center */
    background-repeat: no-repeat;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    /* 20% white overlay */
    z-index: 0;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    /* Ensure text is above overlay */
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.hero-title {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
}

.hero-description {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0 auto 25px;
    max-width: 550px;
}

.hero-actions {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}



/* =========================================
   LOGO LOOP
   ========================================= */
.logo-loop-section {
    padding: 40px 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background: var(--bg-white);
    overflow: hidden;
}

.logo-track-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    direction: ltr;
    padding: 20px 0;
    /* Ensures space for hover scaling without clipping */
    /* Ensure scrolling is smooth LTR even in RTL document */
}

.logo-track-container::before,
.logo-track-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
}

.logo-track-container::before {
    right: 0;
    background: linear-gradient(to left, white, transparent);
}

.logo-track-container::after {
    left: 0;
    background: linear-gradient(to right, white, transparent);
}

.logo-track {
    display: flex;
    width: max-content;
    animation: scroll 45s linear infinite;
}

.logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 40px;
}

.logo-item img {
    height: 55px;
    /* Reverting to 55px for better visibility */
    width: auto;
    max-width: 180px;
    filter: grayscale(100%);
    opacity: 0.8;
    transition: filter 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.logo-item img.logo-v-large {
    height: 48px;
    /* Increased for better prominence */
}

.logo-item img.logo-sq {
    height: 52px;
    /* Increased for better prominence */
}

.logo-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* =========================================
   2. ABOUT SECTION
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-top: 50px;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lead-text {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

.message-box {
    background: var(--bg-light);
    padding: 30px;
    border-right: 4px solid var(--primary);
    border-radius: var(--border-radius-sm);
    margin-top: 30px;
}

.message-box h3 {
    margin-bottom: 10px;
    color: var(--primary);
}



/* =========================================
   3. SERVICES SECTION
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
    perspective: 1000px;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    transition: box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(255, 90, 54, 0.1);
}

.service-card .icon-wrapper {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background-color: rgba(255, 90, 54, 0.1);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s ease;
}

.service-card:hover .icon-wrapper {
    background-color: var(--primary);
    color: white;
}

.service-card h3 {
    font-size: 22px;
    margin: 0;
}

.service-card p {
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
}

/* =========================================
   4. PORTFOLIO SECTION
   ========================================= */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.portfolio-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-light);
    cursor: pointer;
    transition: box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.portfolio-item:hover {
    transform: translateY(-5px);
    /* Note: relying on GSAP to not overwrite this after scroll, but hover trans is safer without trans-all */
    box-shadow: var(--shadow-hover);
}

.portfolio-item.half {
    grid-column: span 1;
}

.portfolio-img {
    position: relative;
    aspect-ratio: 4 / 5;
    height: auto;
    width: 100%;
    overflow: hidden;
    border-radius: var(--border-radius);
    background-color: var(--bg-light);
    /* Placeholder background */
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 50%);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    color: white;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.dark-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.tag {
    align-self: flex-start;
    background: var(--primary);
    color: white;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
}

.overlay-content h4 {
    color: white;
    font-size: 24px;
    margin-bottom: 10px;
}

.overlay-content ul {
    list-style-type: none;
    margin-right: 0;
    padding-right: 0;
}

.overlay-content ul li {
    font-size: 14px;
    margin-bottom: 5px;
    opacity: 0.9;
}

.portfolio-info {
    padding: 30px;
}

.portfolio-info h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.result {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.5;
}

.result strong {
    color: var(--primary);
}



/* =========================================
   5. TESTIMONIALS SECTION
   ========================================= */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    position: relative;
}

.quote-icon {
    font-size: 40px;
    color: rgba(255, 90, 54, 0.1);
    position: absolute;
    top: 30px;
    left: 30px;
    /* Switch from right to left for RTL */
}

.quote {
    font-size: 18px;
    font-style: italic;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 30px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 20px;
}

.avatar {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 20px;
    color: var(--primary);
}

.client-info h4 {
    font-size: 16px;
    margin: 0;
}

.client-info span {
    font-size: 14px;
    color: var(--text-light);
}

/* =========================================
   6. FOOTER
   ========================================= */
.footer {
    background-color: var(--dark-footer);
    color: white;
    padding: 100px 0 30px;
}

.footer-contact-wrap {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
}

.footer-title {
    color: white;
    font-size: clamp(36px, 5vw, 54px);
    margin-bottom: 20px;
}

.footer-desc {
    font-size: 22px;
    color: #AAAAAA;
    margin-bottom: 50px;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.contact-btn {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 20px 30px;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-align: right;
    width: 300px;
}

.contact-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: var(--primary);
}

.contact-btn i {
    font-size: 32px;
    color: var(--primary);
}

.contact-btn span {
    display: block;
    font-size: 14px;
    color: #AAAAAA;
    margin-bottom: 5px;
}

.contact-btn strong {
    font-family: var(--font-heading);
    font-size: 18px;
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    margin-bottom: 10px;
    display: inline-block;
    color: white;
}

.footer-brand .logo svg {
    height: 50px;
    /* Slightly larger in footer */
}

.footer-brand p {
    color: #888888;
    font-size: 16px;
}

.footer-copy {
    color: #666666;
    font-size: 14px;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 992px) {

    .hero-container,
    .about-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 140px;
        text-align: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        margin-top: 40px;
        max-width: 600px;
        margin-inline: auto;
    }

    .collage {
        height: 400px;
        order: -1;
    }

    .about-text {
        text-align: center;
    }

    .message-box {
        text-align: right;
    }
}

@media (max-width: 768px) {

    .nav-links,
    .nav-btn {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-item.half {
        grid-column: span 1;
    }

    .contact-methods {
        flex-direction: column;
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

/* =========================================
   MEDIA GALLERY MODAL
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-white);
    width: 100%;
    max-width: 900px;
    border-radius: var(--border-radius);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    /* Switch to left for RTL */
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--primary);
    color: white;
}

.gallery-header {
    padding: 30px 30px 20px;
}

.gallery-header .section-desc {
    margin-bottom: 0;
    font-size: 16px;
}

.gallery-main {
    padding: 0 30px;
}

.gallery-display {
    position: relative;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: #050505;
    /* Cinematic black to absorb letterboxing */
    height: 35vh;
    /* Flexible height instead of rigid ratio */
    min-height: 250px;
    max-height: 450px;
    box-shadow: var(--shadow-soft);
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-display img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-dark);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 5;
    backdrop-filter: blur(5px);
}

.gallery-nav:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.next {
    left: 20px;
}

.gallery-nav.prev {
    right: 20px;
}

.gallery-caption {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 20px;
}

.gallery-caption h3 {
    font-size: 24px;
    margin-bottom: 6px;
}

.gallery-thumbnails {
    padding: 20px 30px 30px;
    display: flex;
    gap: 12px;
    overflow-x: auto;
}

/* Custom Scrollbar for thumbnails */
.gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
    margin: 0 40px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.thumb-btn {
    flex-shrink: 0;
    width: 160px;
    height: 90px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    position: relative;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    background: black;
    padding: 0;
}

.thumb-btn img,
.thumb-btn video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.thumb-btn i {
    color: white;
    font-size: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.thumb-btn:hover {
    border-color: rgba(255, 90, 54, 0.5);
}

.thumb-btn.active {
    border-color: var(--primary);
}

.thumb-btn.active i {
    opacity: 1;
}

.thumb-btn.active .thumb-overlay {
    background: rgba(0, 0, 0, 0.4);
}

@media (max-width: 768px) {
    .gallery-caption {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .gallery-header,
    .gallery-main,
    .gallery-thumbnails {
        padding-left: 15px;
        padding-right: 15px;
    }

    .gallery-header {
        padding-top: 30px;
        padding-bottom: 15px;
    }

    .gallery-display {
        height: 35vh;
        min-height: 250px;
    }

    .thumb-btn {
        width: 100px;
        height: 60px;
    }
}