/* style.css - W-Shipping exact match style */

:root {
    --theme-color: #e3000f; /* Exact red used in W-Shipping */
    --theme-hover: #c4000c;
    --dark-bg: #222222;
    --text-dark: #333333;
}

body {
    font-family: 'El Messiri', Tahoma, Arial, sans-serif;
    color: var(--text-dark);
    background-color: #ffffff;
}

.text-theme {
    color: var(--theme-color) !important;
}

.bg-theme {
    background-color: var(--theme-color) !important;
}

.btn-theme {
    background-color: var(--theme-color);
    border-color: var(--theme-color);
    color: white;
    border-radius: 0;
}

.btn-theme:hover {
    background-color: var(--theme-hover);
    border-color: var(--theme-hover);
    color: white;
}

/* Top Bar */
.top-bar {
    background-color: var(--dark-bg);
    color: #999;
    font-size: 13px;
    height: 50px;
}

.top-link:hover {
    color: var(--theme-color) !important;
    transition: 0.3s;
}

/* Navbar */
.navbar-brand .logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--theme-color);
}

.navbar-nav .nav-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    padding: 30px 15px !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover, 
.navbar-nav .nav-link.active {
    color: var(--theme-color);
}

.search-btn {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Section */
.hero-section {
    min-height: 600px;
    overflow: hidden;
    background-color: var(--dark-bg);
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background-color: rgba(0,0,0,0.5);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.2);
    transition: 0.3s;
}

.slider-arrow:hover {
    background-color: var(--theme-color);
    border-color: var(--theme-color);
}

.slider-arrow-left {
    left: 30px; /* Right for RTL if we want, but let's keep visual L/R */
}

.slider-arrow-right {
    right: 30px;
}

/* Services Playing Cards Deck */
.services-deck-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    perspective: 1000px;
}

.service-playing-card {
    border-radius: 12px;
    background: #fff;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
    cursor: pointer;
    
    /* Animation initial state */
    opacity: 0;
    transform: translate(var(--start-x, 0), var(--start-y, 0)) rotate(var(--start-r, 0)) scale(0.8);
    transition: transform 1s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.8s ease-out, box-shadow 0.4s ease;
    will-change: transform, opacity;
}

.services-deck-container.in-view .service-playing-card {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
}

/* Stagger transition delay */
.services-deck-container.in-view .service-playing-card:nth-child(1) { transition-delay: 0.1s; }
.services-deck-container.in-view .service-playing-card:nth-child(2) { transition-delay: 0.2s; }
.services-deck-container.in-view .service-playing-card:nth-child(3) { transition-delay: 0.3s; }
.services-deck-container.in-view .service-playing-card:nth-child(4) { transition-delay: 0.4s; }

/* Micro-interaction on hover for desktop */
@media (hover: hover) {
    .services-deck-container.in-view .service-playing-card:hover {
        transform: translateY(-10px) scale(1.02);
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        z-index: 2;
    }
}

/* RTL / LTR start positions for the deck */
/* Desktop */
@media (min-width: 992px) {
    .service-playing-card:nth-child(1) { --start-x: -150%; --start-y: 50px; --start-r: -15deg; }
    .service-playing-card:nth-child(2) { --start-x: -50%;  --start-y: 20px; --start-r: -5deg; }
    .service-playing-card:nth-child(3) { --start-x: 50%;   --start-y: 20px; --start-r: 5deg; }
    .service-playing-card:nth-child(4) { --start-x: 150%;  --start-y: 50px; --start-r: 15deg; }
    
    [dir="ltr"] .service-playing-card:nth-child(1) { --start-x: 150%; }
    [dir="ltr"] .service-playing-card:nth-child(2) { --start-x: 50%; }
    [dir="ltr"] .service-playing-card:nth-child(3) { --start-x: -50%; }
    [dir="ltr"] .service-playing-card:nth-child(4) { --start-x: -150%; }
}
/* Tablet */
@media (max-width: 991px) {
    .services-deck-container { grid-template-columns: repeat(2, 1fr); }
    .service-playing-card:nth-child(odd) { --start-x: -50%; --start-y: 50px; --start-r: -10deg; }
    .service-playing-card:nth-child(even) { --start-x: 50%; --start-y: 50px; --start-r: 10deg; }
    
    [dir="ltr"] .service-playing-card:nth-child(odd) { --start-x: 50%; }
    [dir="ltr"] .service-playing-card:nth-child(even) { --start-x: -50%; }
}
/* Mobile */
@media (max-width: 575px) {
    .services-deck-container { grid-template-columns: 1fr; }
    .service-playing-card { --start-x: 0; --start-y: 100px; --start-r: 0deg; }
}

@media (prefers-reduced-motion: reduce) {
    .service-playing-card {
        transform: none !important;
        opacity: 1 !important;
        transition: none !important;
    }
    .service-playing-card:hover {
        transform: none !important;
    }
}

.service-playing-card .card-inner {
    border-radius: 8px;
    overflow: hidden;
}
.service-playing-card .card-image-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}
.service-playing-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.service-playing-card:hover img {
    transform: scale(1.08);
}

.service-playing-card .card-number {
    position: absolute;
    top: 15px;
    inset-inline-start: 15px;
    background: rgba(255,255,255,0.9);
    color: var(--theme-color);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.service-playing-card .card-content {
    padding: 25px 10px 10px;
    text-align: start;
}

.service-playing-card .card-content h5 {
    font-size: 16px;
    letter-spacing: 0.5px;
}

.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--theme-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 13px;
    transition: 0.3s;
}
.read-more-link:hover {
    color: var(--theme-hover);
    gap: 12px;
}
/* Flip arrows in LTR for read-more-link */
[dir="ltr"] .read-more-link i {
    transform: scaleX(-1);
}

/* CTA Section */
.cta-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(168, 25, 34, 0.85); /* Darkish red overlay */
}

/* Why Choose Us Timeline */
.title-line {
    width: 40px;
    height: 2px;
    background-color: var(--theme-color);
}

.why-timeline::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 10px;
    right: 25px; /* Right instead of left for RTL */
    width: 2px;
    background-color: var(--theme-color);
    z-index: 1;
}

.timeline-icon {
    width: 50px;
    height: 50px;
    font-size: 20px;
}

/* Service Process */
.process-wrapper {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.process-wrapper::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 10%;
    right: 10%;
    height: 2px;
    background-color: var(--theme-color);
    z-index: 1;
}

.process-circle {
    width: 120px;
    height: 120px;
    border: 2px solid var(--theme-color);
}

.process-number {
    position: absolute;
    top: 0;
    right: 0; /* Top right in RTL = Top left in LTR visually */
    width: 35px;
    height: 35px;
    font-size: 18px;
    transform: translate(20%, -20%);
}

/* Quote Section */
.quote-form-bg {
    background: rgba(227, 0, 15, 0.9);
    clip-path: polygon(0 0, 100% 0, 100% 100%, 15% 100%); /* Diagonal cut for RTL */
}

@media (max-width: 991px) {
    .quote-form-bg {
        clip-path: none;
    }
}

/* Counters Section */
.counter-box {
    margin-top: 25px; /* space for the top icon */
    border: 1px solid #eee;
}

.counter-icon {
    top: -30px;
    width: 70px;
    height: 60px;
}

/* News & Testimonials */
.title-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0; /* right for RTL */
    width: 40px;
    height: 2px;
    background-color: var(--theme-color);
}

.news-item {
    transition: 0.3s;
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-date {
    border-right: 4px solid var(--theme-color); /* To make it look like a distinct block */
}

.testimonial-box {
    overflow: hidden;
    background-color: var(--theme-color);
}

.scroll-top {
    transition: 0.3s;
    opacity: 0.8;
}

.scroll-top:hover {
    opacity: 1;
    background-color: var(--theme-color) !important;
}

/* Footer & Top Bar Adjustments */
.footer-link-item {
    transition: 0.3s;
}
.footer-link-item:hover {
    color: var(--theme-color) !important;
    padding-right: 5px; /* right for RTL */
}
.social-icon {
    transition: 0.3s;
}
.social-icon:hover {
    background-color: var(--theme-color) !important;
}
.top-bar-divider {
    font-size: 11px;
    opacity: 0.5;
}
.top-bar-item {
    font-size: 12px;
}

/* Custom FAQ Accordion */
.custom-accordion .accordion-item {
    background-color: transparent;
}
.custom-accordion .accordion-button {
    box-shadow: none !important;
    transition: 0.3s;
    font-size: 15px;
}
.custom-accordion .accordion-button:not(.collapsed) {
    background-color: var(--theme-color) !important;
    color: white !important;
}
.custom-accordion .accordion-button::after {
    margin-inline-start: auto;
    margin-inline-end: 0;
}
.custom-accordion .accordion-button:not(.collapsed)::after {
    filter: brightness(0) invert(1);
}

/* ============================================================
   hydrowinch-cairo additions (same theme, content sections)
   ============================================================ */
.ico { width: 1em; height: 1em; fill: currentColor; vertical-align: -0.125em; }
.top-bar-item .ico { color: var(--theme-color); margin-left: 6px; }
a { color: var(--theme-color); }
.navbar-brand .text-theme { line-height: 1.2; }

/* Hero: content + image column (no background image) */
.hero-overlay { background: linear-gradient(135deg, rgba(34,34,34,0.96), rgba(168,25,34,0.85)); }
.hero-title { font-size: 2rem; line-height: 1.45; }
.sub-lead { font-size: 1.05rem; line-height: 1.9; color: #f1f1f1; }
.sub-lead a, .hero-points a { color: #fff; text-decoration: underline; }
.hero-points li { background: rgba(255,255,255,0.08); border-right: 4px solid var(--theme-color); padding: 10px 14px; margin-bottom: 10px; font-weight: 600; font-size: 0.97rem; }
.hero-media { aspect-ratio: 4 / 3; }
.hero-img { width: 100%; height: auto; }
@media (min-width: 992px) { .hero-title { font-size: 2.4rem; } }

/* Work photos: 3 cards, no hover text */
.photos-deck { grid-template-columns: repeat(3, 1fr); }
.photos-deck .service-playing-card img { height: auto; aspect-ratio: 4 / 3; }
@media (max-width: 991px) { .photos-deck { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .photos-deck { grid-template-columns: 1fr; } }
.service-playing-card img { aspect-ratio: 4 / 3; }
a.service-playing-card { display: block; color: inherit; }

/* Why choose us */
.why-img { min-height: 260px; }
.timeline-item h3 { line-height: 1.6; }

/* What makes us different (counters look) */
.counters-section { background-color: #1a1a1a; }
.counter-box h3 { line-height: 1.6; }

/* Steps */
.process-step-num { font-size: 2rem; }
.process-circle { display: flex; }

/* FAQ accordion with native details */
.custom-accordion details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; width: 100%; padding: 1rem 1.25rem; }
.custom-accordion details > summary::-webkit-details-marker { display: none; }
.custom-accordion details > summary::after { content: '+'; margin-inline-start: auto; padding-inline-start: 12px; font-size: 1.3rem; line-height: 1; }
.custom-accordion details[open] > summary { background-color: var(--theme-color) !important; color: #fff !important; }
.custom-accordion details[open] > summary::after { content: '−'; }
.custom-accordion .faq-q { font-size: 15px; font-weight: 700; line-height: 1.7; color: inherit; }
.custom-accordion .accordion-body { padding: 1rem 1.25rem; }

/* CTA without background photo */
.cta-section { background-color: #a81922; }
.cta-text { max-width: 720px; margin: 0 auto; line-height: 1.9; }
.cta-section a:not(.btn) { color: #fff; }
.btn-cta { min-height: 48px; display: inline-flex; align-items: center; }

/* Footer (was inline styles) */
.footer-section { background-color: #1a1a1a; color: #999999; }
.footer-section .text-muted { color: #b5b5b5 !important; }
.footer-section .logo-icon { width: 35px; height: 35px; }
.footer-brand-2 { color: #d0d0d0; }
.footer-title { font-size: 1rem; }
.footer-links li a, .footer-links li span { display: inline-block; padding: 4px 0; }
.bottom-bar { background-color: #111111; }
.scroll-top { width: 44px; height: 44px; bottom: 20px; right: 20px; z-index: 999; text-decoration: none; }

/* Fixed pages */
.fixed-page { max-width: 820px; }
.fixed-page p { line-height: 2; }

/* Blog (same theme) */
.blog-wrap { max-width: 860px; }
.blog-crumbs a { color: var(--text-dark); text-decoration: none; }
.blog-crumbs a:hover { color: var(--theme-color); }
.blog-title { font-size: 1.9rem; line-height: 1.5; }
.blog-hero img { width: 100%; height: auto; aspect-ratio: 4 / 3; }
.blog-toc { background: #f5f5f5; border-right: 4px solid var(--theme-color); padding: 16px 20px; }
.blog-toc ol { margin: 0; padding-right: 20px; }
.blog-toc li { padding: 3px 0; }
.blog-toc a { color: var(--text-dark); text-decoration: none; }
.blog-toc a:hover { color: var(--theme-color); }
.blog-sec { margin-bottom: 2.5rem; scroll-margin-top: 90px; }
.blog-sec h2 { font-size: 1.45rem; line-height: 1.6; margin-bottom: 1rem; padding-bottom: 8px; position: relative; scroll-margin-top: 90px; }
.blog-sec h2::after { content: ''; position: absolute; bottom: 0; right: 0; width: 40px; height: 2px; background-color: var(--theme-color); }
.blog-sec p, .blog-list li { line-height: 2; color: #444; }
.blog-list { padding-right: 22px; margin-bottom: 1rem; }
.blog-list li { margin-bottom: 6px; }
.blog-table th { background-color: var(--theme-color); color: #fff; font-weight: 700; }
.blog-table td, .blog-table th { padding: 10px 12px; vertical-align: top; line-height: 1.8; }
.blog-final { background: #fff5f5; border: 1px solid #f3c6c9; padding: 20px; border-radius: 6px; }
.blog-intro { max-width: 720px; line-height: 2; }
@media (min-width: 992px) { .blog-title { font-size: 2.3rem; } }

/* Service cards on the home page without photos */
.service-playing-card .card-no-img { padding: 15px 15px 0; }
.service-playing-card .card-no-img .card-number { position: static; background: var(--theme-color); color: #fff; }
/* Home work photos: two larger cards, centred */
@media (min-width: 768px) {
    .services-deck-container.photos-deck { grid-template-columns: repeat(2, minmax(0, 420px)); justify-content: center; }
    .photos-deck .service-playing-card img { height: 300px; }
}
