/* ==========================================
   CSS Variables & Reset
   ========================================== */
:root {
    --bg-dark: #0d1117;
    --bg-card: #161b22;
    --bg-card-hover: #21262d;
    --text-main: #f0f6fc;
    --text-muted: #8b949e;
    
    /* Emergency Theme Colors */
    --accent-orange: #ff9f0a;
    --accent-orange-hover: #e08b00;
    --accent-orange-glow: rgba(255, 159, 10, 0.35);
    
    /* WhatsApp Colors */
    --accent-whatsapp: #25d366;
    --accent-whatsapp-hover: #20ba5a;
    --accent-whatsapp-glow: rgba(37, 211, 102, 0.35);

    --border-color: rgba(240, 246, 252, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-ar);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar Style */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8b949e;
}

/* ==========================================
   Utility Classes & Layout
   ========================================== */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

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

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

.highlight {
    color: var(--accent-orange);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.btn svg {
    width: 20px;
    height: 20px;
}

.btn-call {
    background-color: var(--accent-orange);
    color: #000;
}

.btn-call:hover {
    background-color: var(--accent-orange-hover);
    box-shadow: 0 6px 20px var(--accent-orange-glow);
    transform: translateY(-2px);
}

.btn-whatsapp {
    background-color: var(--accent-whatsapp);
    color: #fff;
}

.btn-whatsapp:hover {
    background-color: var(--accent-whatsapp-hover);
    box-shadow: 0 6px 20px var(--accent-whatsapp-glow);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.2rem;
}

/* Ripple effect animation */
.ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple-effect {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    pointer-events: none;
    border-radius: 50%;
    animation: button-ripple 0.6s linear;
    width: 0;
    height: 0;
}

@keyframes button-ripple {
    to {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* ==========================================
   Header Section
   ========================================== */
.header {
    background-color: rgba(13, 17, 23, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo h1 {
    font-family: var(--font-en);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-main);
}

.logo h1 span {
    color: var(--accent-orange);
}

/* Glowing Amber Beacon Animation */
.pulse-beacon {
    width: 12px;
    height: 12px;
    background-color: var(--accent-orange);
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(255, 159, 10, 0.7);
    animation: beacon-pulse 1.8s infinite;
}

@keyframes beacon-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 159, 10, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 159, 10, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 159, 10, 0);
    }
}

.phone-link {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 159, 10, 0.1);
    color: var(--accent-orange);
    border: 1px solid rgba(255, 159, 10, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-family: var(--font-en);
}

.phone-link:hover {
    background-color: var(--accent-orange);
    color: #000;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    position: relative;
    padding: 80px 0 100px;
    text-align: center;
    background-image: linear-gradient(rgba(13, 17, 23, 0.95), rgba(13, 17, 23, 0.75)), url('depanage_1.jpeg');
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid var(--border-color);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 30%, var(--bg-dark) 95%);
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.badge {
    background-color: rgba(255, 159, 10, 0.15);
    border: 1px solid var(--accent-orange);
    color: var(--accent-orange);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
    animation: flash 2s infinite alternate;
}

@keyframes flash {
    0% { opacity: 0.8; }
    100% { opacity: 1; box-shadow: 0 0 15px rgba(255, 159, 10, 0.3); }
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 650px;
    margin-bottom: 40px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.hero-actions {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 500px;
}

.hero-actions .btn {
    flex: 1;
    min-width: 200px;
}

/* ==========================================
   Urgent Banner
   ========================================== */
.urgent-banner {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 15px 0;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-weight: 600;
    text-align: center;
    font-size: 1rem;
}

.live-tag {
    background-color: #ff3b30;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    animation: pulse-red 1.2s infinite;
}

@keyframes pulse-red {
    0% { transform: scale(0.95); opacity: 0.9; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.9; }
}

/* ==========================================
   Services Section
   ========================================== */
.services {
    padding: 80px 0;
    background-color: var(--bg-dark);
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.section-title span {
    font-size: 1rem;
    color: var(--accent-orange);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.service-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px 25px;
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    background-color: var(--bg-card-hover);
    border-color: rgba(255, 159, 10, 0.3);
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}

.service-icon {
    background-color: rgba(255, 159, 10, 0.1);
    color: var(--accent-orange);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background-color: var(--accent-orange);
    color: #000;
    transform: scale(1.1);
}

.service-card h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ==========================================
   Gallery Section
   ========================================== */
.gallery {
    padding: 80px 0;
    background-color: #121620;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-desc {
    text-align: center;
    max-width: 600px;
    margin: -35px auto 45px;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* Masonry feel for 5 items */
.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    border: 1px solid var(--border-color);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    background-color: #161b22;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(13, 17, 23, 0.9) 10%, rgba(255, 159, 10, 0.2) 90%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
}

.zoom-icon {
    font-size: 2rem;
    color: var(--accent-orange);
    background-color: rgba(13, 17, 23, 0.85);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: auto;
    margin-top: 30px;
    font-family: var(--font-en);
    border: 1px solid var(--accent-orange);
    transition: var(--transition);
}

.gallery-hover p {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    transform: translateY(15px);
    transition: transform 0.4s ease;
}

/* Hover effects */
.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-hover {
    opacity: 1;
}

.gallery-item:hover .gallery-hover p {
    transform: translateY(0);
}

/* ==========================================
   Why Choose Us Section
   ========================================== */
.why-us {
    padding: 80px 0;
    background-color: var(--bg-dark);
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 800px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 25px 30px;
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateX(-5px);
    border-color: rgba(255, 159, 10, 0.2);
}

.feature-number {
    background-color: var(--accent-orange);
    color: #000;
    font-family: var(--font-en);
    font-size: 1.5rem;
    font-weight: 800;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 10px rgba(255, 159, 10, 0.3);
}

.feature-info h5 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.feature-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ==========================================
   Call To Action (CTA) Banner
   ========================================== */
.cta-banner {
    position: relative;
    padding: 80px 0;
    text-align: center;
    background-image: linear-gradient(rgba(13, 17, 23, 0.9), rgba(13, 17, 23, 0.9)), url('depanage_5.jpeg');
    background-size: cover;
    background-position: center;
    border-top: 1px solid var(--border-color);
}

.cta-container {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.cta-banner h3 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.cta-banner p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-buttons .btn {
    min-width: 240px;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background-color: #0b0e14;
    border-top: 1px solid var(--border-color);
    padding: 40px 0 110px; /* Space at bottom for sticky action bar */
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-phone-text a {
    color: var(--accent-orange);
    font-weight: 700;
    font-family: var(--font-en);
}

.footer-phone-text a:hover {
    text-decoration: underline;
}

/* ==========================================
   Sticky Bottom Bar (Mobile Only)
   ========================================== */
.sticky-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 76px;
    background-color: rgba(13, 17, 23, 0.92);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-color);
    display: flex;
    padding: 10px 15px;
    gap: 12px;
    z-index: 99;
    box-shadow: 0 -5px 25px rgba(0,0,0,0.5);
}

.sticky-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 35px;
    font-size: 1.05rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    transition: var(--transition);
}

.sticky-btn svg {
    flex-shrink: 0;
}

.sticky-action-bar .btn-call {
    background-color: var(--accent-orange);
    color: #000;
}

.sticky-action-bar .btn-whatsapp {
    background-color: var(--accent-whatsapp);
    color: #fff;
}

/* ==========================================
   Lightbox Gallery Popup
   ========================================== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(10, 11, 15, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 75vh;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    object-fit: contain;
    animation: zoom 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

@keyframes zoom {
    from {transform: scale(0.9); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1010;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255,255,255,0.05);
    border-radius: 50%;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--accent-orange);
    background-color: rgba(255, 255, 255, 0.15);
}

.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -30px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    transition: var(--transition);
    user-select: none;
    background-color: rgba(255,255,255,0.05);
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1005;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--accent-orange);
}

.lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 20px 0;
    font-size: 1.1rem;
    font-weight: 700;
}

/* ==========================================
   Responsive Breakpoints
   ========================================== */

/* Larger Devices (Desktop / Tablet) */
@media (min-width: 769px) {
    /* Hide bottom sticky bar on large screens since buttons are already prominent */
    .sticky-action-bar {
        display: none !important;
    }
    
    .footer {
        padding-bottom: 40px; /* Normal footer spacing */
    }
}

/* Smaller Devices (Mobile / Small Tablet) */
@media (max-width: 768px) {
    html {
        font-size: 14px; /* Slightly scale down for smaller viewports */
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-desc {
        font-size: 1.1rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 35px;
    }
    
    .services-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 20px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
        gap: 15px;
    }

    .feature-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }

    .feature-number {
        margin-bottom: 10px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .lightbox-prev, .lightbox-next {
        padding: 10px;
        font-size: 18px;
        width: 44px;
        height: 44px;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 65vh;
    }
}
