/* ========================================
   شركة أسلاك لاستيراد المعدات الكهربائية
   Color Scheme: Orange, Gray, White
   ======================================== */

:root {
    /* Orange Palette */
    --orange: #f97316;
    --orange-dark: #ea580c;
    --orange-light: #fb923c;
    --orange-soft: #fed7aa;
    
    /* Gray Palette */
    --gray-900: #1f2937;
    --gray-800: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    
    /* White */
    --white: #ffffff;
    
    /* Typography */
    --font-main: 'Tajawal', sans-serif;
    
    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.3s var(--ease);
    
    /* Layout */
    --section-padding: 100px 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    background: var(--white);
    color: var(--gray-800);
    overflow-x: hidden;
}

body.loading { overflow: hidden; }

/* ========== Loader ========== */
.loader {
    position: fixed;
    inset: 0;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content { text-align: center; }

.loader-logo {
    max-width: 120px;
    margin-bottom: 24px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ========== Navigation ========== */
.navbar {
    padding: 20px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--gray-200);
}

.brand-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--orange);
    letter-spacing: -0.5px;
}

.navbar.scrolled .brand-text { color: var(--orange); }

.navbar .nav-link {
    color: var(--gray-800) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    transition: var(--transition);
}

.navbar .nav-link.active {
    color: var(--orange) !important;
}

.navbar .nav-link:hover {
    color: var(--orange) !important;
}

.nav-cta {
    background: var(--orange) !important;
    color: var(--white) !important;
    border-radius: 8px;
    margin-right: 8px;
}

.nav-cta:hover {
    background: var(--orange-dark) !important;
    color: var(--white) !important;
}

.navbar-toggler {
    border-color: var(--gray-300);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ========== Hero - Split Layout ========== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--gray-100);
    padding-top: 80px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
    min-height: calc(100vh - 80px);
}

.hero-visual {
    position: relative;
}

.hero-image-wrapper {
    position: relative;
    border-radius: 0 80px 80px 0;
    overflow: hidden;
    box-shadow: 20px 20px 0 var(--orange-soft);
}

.hero-image-wrapper img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.hero-shape {
    position: absolute;
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: var(--orange);
    opacity: 0.2;
    border-radius: 50%;
}

.hero-content {
    padding-left: 20px;
}

.hero-label {
    display: inline-block;
    background: var(--orange-soft);
    color: var(--orange-dark);
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.hero-title {
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 32px;
}

.btn-hero {
    padding: 14px 28px;
    font-weight: 600;
    border-radius: 8px;
    margin-left: 12px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--orange);
    border: none;
    color: var(--white) !important;
}

.btn-primary:hover {
    background: var(--orange-dark);
    transform: translateY(-2px);
}

.btn-outline-hero {
    border: 2px solid var(--gray-800);
    color: var(--gray-800) !important;
}

.btn-outline-hero:hover {
    background: var(--gray-800);
    color: var(--white) !important;
    transform: translateY(-2px);
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator {
    color: var(--gray-500);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

.scroll-indicator:hover { color: var(--orange); }

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* ========== About - Bento Grid ========== */
.about-section {
    padding: var(--section-padding);
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 30px;
}

.about-main {
    grid-row: span 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-tag {
    display: inline-block;
    color: var(--orange);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.about-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 20px;
    line-height: 1.3;
}

.about-text {
    color: var(--gray-600);
    line-height: 1.9;
    margin-bottom: 24px;
}

.about-features {
    list-style: none;
    padding: 0;
}

.about-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-weight: 600;
    color: var(--gray-800);
}

.about-features li i {
    color: var(--orange);
    font-size: 1.2rem;
}

.about-stats {
    display: flex;
    gap: 20px;
}

.stat-card {
    flex: 1;
    background: var(--gray-100);
    padding: 24px;
    border-radius: 12px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    background: var(--orange-soft);
    transform: translateY(-4px);
}

.stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--orange);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.about-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.about-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

/* ========== Services ========== */
.services-section {
    padding: var(--section-padding);
    background: var(--gray-100);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.section-desc {
    color: var(--gray-600);
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--white);
    padding: 32px 24px;
    border-radius: 16px;
    position: relative;
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.12);
    border-color: var(--orange-soft);
}

.service-number {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--gray-200);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: var(--orange-soft);
    color: var(--orange);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.6;
}

/* ========== Gallery - Masonry ========== */
.gallery-section {
    padding: var(--section-padding);
    background: var(--white);
}

.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-tall { grid-row: span 2; }
.gallery-wide { grid-column: span 2; }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(249, 115, 22, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay { opacity: 1; }

.gallery-overlay i {
    font-size: 2.5rem;
    color: var(--white);
    transform: scale(0.8);
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay i { transform: scale(1); }

.modal-content { background: transparent !important; }
.modal-image { border-radius: 12px; }

/* ========== Contact ========== */
.contact-section {
    padding: var(--section-padding);
    background: var(--gray-900);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 40px;
}

.contact-details { display: flex; flex-direction: column; gap: 28px; }

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--orange);
    margin-top: 4px;
}

.contact-item strong {
    display: block;
    color: var(--gray-400);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.contact-item p {
    color: var(--white);
    margin: 0;
    line-height: 1.6;
}

.contact-item a {
    color: var(--white);
    text-decoration: none;
}

.contact-item a:hover { color: var(--orange-light); }

.contact-map .map-placeholder {
    background: var(--gray-800);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    color: var(--white);
    border: 2px dashed var(--gray-600);
}

.map-placeholder i {
    font-size: 3rem;
    color: var(--orange);
    opacity: 0.7;
    margin-bottom: 20px;
}

.map-placeholder p { font-size: 1.2rem; margin: 8px 0; }
.map-placeholder span { color: var(--gray-400); }

/* ========== Footer ========== */
.footer {
    background: var(--gray-800);
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand .brand-text {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--orange);
}

.footer-brand p {
    color: var(--gray-400);
    font-size: 0.95rem;
    margin-top: 4px;
}

.footer-info {
    text-align: left;
}

.footer-info p {
    color: var(--gray-400);
    font-size: 0.95rem;
    margin: 0;
}

.footer-info a {
    color: var(--orange-light);
    text-decoration: none;
    font-weight: 600;
}

.footer-info a:hover { color: var(--orange); }

/* ========== Reveal Animation ========== */
.section-header, .about-main, .about-stats, .about-image,
.service-card, .contact-info, .contact-map {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s var(--ease);
}
.section-header.visible, .about-main.visible, .about-stats.visible,
.about-image.visible, .service-card.visible, .contact-info.visible,
.contact-map.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s var(--ease);
}
.gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 1200px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-masonry { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
    :root { --section-padding: 70px 0; }
    
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content { padding-left: 0; }
    
    .hero-image-wrapper {
        border-radius: 16px;
        box-shadow: 10px 10px 0 var(--orange-soft);
    }
    
    .hero-image-wrapper img { height: 350px; }
    
    .hero-buttons { display: flex; justify-content: center; flex-wrap: wrap; }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-main { grid-row: auto; }
    
    .about-stats { order: 3; }
    
    .gallery-masonry { grid-template-columns: repeat(2, 1fr); }
    .gallery-wide { grid-column: span 1; }
    
    .contact-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    :root { --section-padding: 60px 0; }
    
    .services-grid { grid-template-columns: 1fr; }
    
    .gallery-masonry {
        grid-template-columns: 1fr;
        grid-auto-rows: 250px;
    }
    
    .gallery-tall { grid-row: span 1; }
    
    .footer-content { flex-direction: column; text-align: center; }
    .footer-info { text-align: center; }
}
