/* ========================================
   Homepage Styles - Cubic Meter Engineering
   Brand Colors & Smooth Animations
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --primary-dark: #222f37;
    --primary-gold: #f7b445;
    --primary-orange: #ed5e32;

    /* Extended Palette */
    --text-dark: #222f37;
    --text-light: #5a6872;
    --bg-light: #ffffff;
    --bg-cream: #faf8f5;
    --bg-dark: #1a2329;
    --border-color: #e8eaed;

    /* Gradients */
    --gradient-gold: linear-gradient(135deg, #f7b445 0%, #ed5e32 100%);
    --gradient-dark: linear-gradient(135deg, #222f37 0%, #1a2329 100%);

    /* Spacing */
    --section-padding: 120px 0;
    --container-padding: 0 24px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(34, 47, 55, 0.08);
    --shadow-md: 0 8px 24px rgba(34, 47, 55, 0.12);
    --shadow-lg: 0 16px 48px rgba(34, 47, 55, 0.16);
    --shadow-gold: 0 8px 32px rgba(247, 180, 69, 0.3);
}

/* Dark Mode */
body.dark {
    --text-dark: #f5f5f5;
    --text-light: #b0b8c0;
    --bg-light: #1a2329;
    --bg-cream: #222f37;
    --bg-dark: #0f1419;
    --border-color: #3a4550;
}

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--bg-light);
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--container-padding);
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes craneSwing {

    0%,
    100% {
        transform: rotate(-5deg);
    }

    50% {
        transform: rotate(5deg);
    }
}

@keyframes craneLift {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-30px);
    }
}

@keyframes craneMove {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100vw);
    }
}

@keyframes constructionPulse {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.1s;
}

.delay-2 {
    transition-delay: 0.2s;
}

.delay-3 {
    transition-delay: 0.3s;
}

.delay-4 {
    transition-delay: 0.4s;
}

/* ========================================
   Navigation
   ======================================== */

.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-bottom: 1px solid transparent;
}

.main-nav.scrolled {
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
}

body.dark .main-nav {
    background: rgba(26, 35, 41, 0.95);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 65px;
    width: auto;
    transition: transform 0.3s ease;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    position: relative;
    padding: 8px 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-gold);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-gold);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.lang-btn,
.theme-toggle {
    background: transparent;
    border: 1.5px solid var(--border-color);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.lang-btn:hover,
.theme-toggle:hover {
    background: var(--primary-dark);
    color: white;
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--gradient-gold);
    color: var(--primary-dark);
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-gold);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(247, 180, 69, 0.4);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-dark);
    padding: 8px;
}

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #222f37 0%, #1a2329 100%);
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(247, 180, 69, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(237, 94, 50, 0.1) 0%, transparent 50%);
    z-index: 1;
}

/* Construction Elements Container */
.construction-elements {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

/* Tower Cranes */
.crane {
    position: absolute;
    bottom: 50%;
}

.crane-1 {
    left: 5%;
    transform: scale(0.8);
}

.crane-2 {
    left: 50%;
    transform: translateX(-50%) scale(1.2);
}

.crane-3 {
    right: 10%;
    transform: scale(0.9);
}

.crane-tower {
    width: 8px;
    height: 200px;
    background: var(--primary-dark);
    position: relative;
}

.crane-tower::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-dark);
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.crane-jib {
    position: absolute;
    top: 0;
    left: 50%;
    width: 150px;
    height: 6px;
    background: var(--primary-dark);
    transform-origin: left center;
    animation: craneSwing 8s ease-in-out infinite;
}

.crane-2 .crane-jib {
    animation-delay: 2s;
    width: 180px;
}

.crane-3 .crane-jib {
    animation-delay: 4s;
    width: 120px;
}

.crane-jib::before {
    content: '';
    position: absolute;
    left: 0;
    top: -50px;
    width: 2px;
    height: 50px;
    background: var(--primary-gold);
    transform: rotate(30deg);
    transform-origin: bottom;
}

.crane-jib::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -40px;
    width: 2px;
    height: 45px;
    background: var(--primary-gold);
    transform: rotate(-25deg);
    transform-origin: bottom;
}

.crane-hook {
    position: absolute;
    right: 20px;
    top: 6px;
    width: 2px;
    height: 60px;
    background: var(--primary-dark);
    animation: craneLift 6s ease-in-out infinite;
}

.crane-hook::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border: 2px solid var(--primary-gold);
    border-radius: 0 0 6px 6px;
    border-top: none;
}

.crane-counter {
    position: absolute;
    top: -5px;
    right: calc(100% + 5px);
    width: 25px;
    height: 15px;
    background: var(--primary-orange);
}

.hero-floating-shapes {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    bottom: 20%;
    left: 5%;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: rgba(247, 180, 69, 0.1);
    top: 40%;
    left: 20%;
    animation-delay: 4s;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 40px 24px;
    animation: fadeInUp 1s ease-out;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(247, 180, 69, 0.15);
    color: var(--primary-gold);
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 32px;
    border: 1px solid rgba(247, 180, 69, 0.3);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-title {
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.1;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-title .highlight {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(18px, 2.5vw, 22px);
    margin-bottom: 48px;
    opacity: 0.9;
    font-weight: 300;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.8s both;
}

.btn-hero {
    padding: 18px 40px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary-hero {
    background: var(--gradient-gold);
    color: var(--primary-dark);
    box-shadow: var(--shadow-gold);
}

.btn-primary-hero:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 50px rgba(247, 180, 69, 0.4);
}

.btn-secondary-hero {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary-hero:hover {
    background: white;
    color: var(--primary-dark);
    border-color: white;
    transform: translateY(-4px);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: pulse 2s infinite;
}

.hero-scroll-indicator i {
    font-size: 28px;
    color: var(--primary-gold);
}

/* ========================================
   Section Styles
   ======================================== */

.section {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 80px;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(247, 180, 69, 0.1);
    color: var(--primary-gold);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid rgba(247, 180, 69, 0.2);
}

.section-title {
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
    line-height: 1.2;
}

.section-description {
    font-size: 18px;
    color: var(--text-light);
    line-height: 1.9;
}

/* ========================================
   About Section
   ======================================== */

.about-section {
    background: var(--bg-cream);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.about-card {
    background: var(--bg-light);
    padding: 48px 32px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-gold);
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.about-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-lg);
}

.about-card:hover::before {
    transform: scaleX(1);
}

.about-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-gold);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transition: transform 0.4s ease;
}

.about-card:hover .about-icon {
    transform: scale(1.1) rotate(5deg);
}

.about-icon i {
    font-size: 32px;
    color: var(--primary-dark);
}

.about-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text-dark);
}

.about-card p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 15px;
}

/* ========================================
   Services Section
   ======================================== */

.services-section {
    background: var(--primary-dark);
    position: relative;
    overflow: hidden;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(247, 180, 69, 0.1) 0%, transparent 60%);
}

.services-section .section-header .section-tag {
    background: rgba(247, 180, 69, 0.15);
    border-color: rgba(247, 180, 69, 0.3);
}

.services-section .section-header .section-title {
    color: white;
}

.services-section .section-header .section-description {
    color: rgba(255, 255, 255, 0.8);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
    z-index: 1;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 40px 28px;
    border-radius: 16px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-gold);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-gold);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover .service-icon {
    background: white;
}

.service-card:hover .service-icon i {
    color: var(--primary-dark);
}

.service-card:hover h3,
.service-card:hover p {
    color: var(--primary-dark);
}

.service-icon {
    width: 72px;
    height: 72px;
    background: rgba(247, 180, 69, 0.15);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    transition: all 0.4s ease;
}

.service-icon i {
    font-size: 28px;
    color: var(--primary-gold);
    transition: color 0.4s ease;
}

.service-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: white;
    transition: color 0.4s ease;
}

.service-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.7;
    transition: color 0.4s ease;
    margin-bottom: 15px;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-gold);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.service-card:hover .service-link {
    color: var(--primary-dark);
}

a.service-card {
    text-decoration: none;
    display: block;
}

/* 7 services grid layout */
.services-grid-7 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .services-grid-7 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .services-grid-7 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .services-grid-7 {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Footer
   ======================================== */

.main-footer {
    background: var(--bg-dark);
    padding: 80px 0 24px;
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
    align-items: start;
}

.footer-brand .logo-img {
    height: 60px;
    margin-bottom: 20px;
    filter: brightness(0) invert(1);
}

.footer-brand .footer-logo {
    height: 135px;
    margin-bottom: 20px;
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    max-width: 300px;
    font-size: 15px;
}

/* Footer Contact Info - White Text */
.footer-contact .contact-list li {
    color: white;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-contact .contact-list li span {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 400;
}

.footer-contact .contact-list li i {
    color: var(--primary-gold);
    font-size: 16px;
    width: 20px;
}

.footer-section h4 {
    color: white;
    font-size: 18px;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gradient-gold);
}

[dir="rtl"] .footer-section h4::after {
    left: auto;
    right: 0;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 400;
}

.footer-section ul li a:hover {
    color: var(--primary-gold);
    transform: translateX(5px);
}

[dir="rtl"] .footer-section ul li a:hover {
    transform: translateX(-5px);
}

.footer-section ul li i {
    color: var(--primary-gold);
    width: 20px;
}

/* Quick Links 2-Column Layout */
.footer-links-grid .links-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 30px;
}

.footer-links-grid .links-columns ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Social Media Icons */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.social-icon {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    background: var(--primary-gold);
    color: var(--primary-dark);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(247, 180, 69, 0.3);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

.footer-bottom a {
    color: var(--primary-gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: white;
    text-decoration: underline;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .about-content {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 80px 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-light);
        flex-direction: column;
        justify-content: center;
        gap: 32px;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
    }

    .nav-links.mobile-active {
        transform: translateX(0);
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .about-content,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-section h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn-hero {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}