/* ============================================================
   ECO-OIL WEBSITE – style.css
   Framer-faithful redesign | RTL Hebrew | Responsive
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Rubik:wght@300;400;500;600;700&display=swap');

/* ---------- Custom Properties ---------- */
:root {
    --bg:           #EDE8DC;
    --pill:         #DAEFEA;
    --teal:         #5B9E96;
    --teal-dark:    #4a8a82;
    --mint:         #B8E0D2;
    --gray:         #EEEEEE;
    --purple:       #806080;
    --text:         #000000;
    --text-dark:    #222222;
    --text-mid:     #7A7878;
    --white:        #ffffff;
    --radius:       8px;
    --max-w:        1100px;
    --transition:   .25s ease;
    --font-heading: 'Fredoka', sans-serif;
    --font-body:    'Rubik', sans-serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    direction: rtl;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }

.container {
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: 2rem;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg);
}

.top-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .65rem 2.5rem;
}

.logo-link {
    display: flex;
    align-items: center;
}

.site-logo {
    width: 140px;
    height: auto;
    object-fit: contain;
}

/* Primary nav – plain text links */
.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 500;
    font-style: italic;
    color: #000000;
    background: var(--pill);
    padding: .6rem 1.5rem;
    border-radius: 999px;
    transition: background var(--transition), transform var(--transition);
}

.nav-link:hover,
.nav-link:focus-visible {
    background: #c8e6de;
    transform: translateY(-1px);
}

/* ---------- Services bar ---------- */
.services-bar {
    background: var(--bg);
    padding: .5rem 2.5rem .65rem;
    border-top: 1px solid rgba(0,0,0,.06);
}

.services-nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: stretch;
    width: 100%;
}

.srv-btn {
    flex: 1 1 0;
    text-align: center;
    padding: .6rem .8rem;
    background: #84A1A7;
    color: #000000;
    border-radius: 12px;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 500;
    font-style: italic;
    white-space: nowrap;
    transition: background var(--transition), transform var(--transition);
}

.srv-btn:hover,
.srv-btn:focus-visible {
    background: #6f8f95;
    transform: translateY(-1px);
}

/* Featured button — Eco-Depot (separate division, emphasized) */
.srv-btn--featured {
    flex: 1.4 1 0;
    font-size: 1.6rem;
    font-weight: 700;
    font-style: normal;
}

/* ---------- Hamburger (mobile) ---------- */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
}

.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--bg);
    border-top: 1px solid rgba(0,0,0,.08);
    padding: .75rem 1.5rem 1rem;
    gap: .2rem;
}

.mobile-menu.open { display: flex; }

.mobile-link {
    padding: .65rem .5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    border-bottom: 1px solid rgba(0,0,0,.06);
    transition: color var(--transition);
}

.mobile-link:last-child { border-bottom: none; }
.mobile-link:hover { color: var(--teal); }

.mobile-link--cta {
    margin-top: .5rem;
    background: var(--teal);
    color: var(--white) !important;
    border-radius: var(--radius);
    text-align: center;
    padding: .7rem;
    font-weight: 600;
    border-bottom: none;
}

.mobile-link--featured {
    font-size: 1.25rem;
    font-weight: 700;
}

.mobile-link--cta:hover { background: var(--teal-dark); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    inset: 0;
    background: url('images/factory.png') center / cover no-repeat;
}

/* ============================================================
   ABOUT
   ============================================================ */
.about {
    background: var(--bg);
    padding: 60px 0;
}

.about .container {
    max-width: none;
    padding-inline: 2.8rem;
}

.about-text {
    margin-bottom: 1.2rem;
    font-family: var(--font-body);
    font-size: 24px;
    font-weight: 400;
    font-style: italic;
    line-height: 1.9;
    color: #000000;
    max-width: none;
    margin-inline: 2.8rem;
    text-align: right;
}

.about-text:last-child {
    margin-bottom: 0;
}

.about-highlight {
    font-weight: 700;
    font-size: 34px;
    text-align: center;
    margin-top: 1.8rem;
    line-height: 1.5;
}

/* ============================================================
   SERVICE CARDS – Purple box with two items
   ============================================================ */
.service-cards {
    padding: 40px 2rem;
}

.purple-box {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    background: #806080;
    border-radius: 80px 0 80px 0; /* top-left & bottom-right rounded */
    padding: 2.6rem 4rem 2.3rem;
}

.purple-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: end;
    max-width: 100%;
}

.svc-item {
    position: relative;
    display: block;
    text-decoration: none;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.svc-img {
    display: block;
    width: 100%;
    height: 210px;
    object-fit: cover;
    border-radius: 40px 0 40px 0; /* top-left & bottom-right rounded */
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
}

#clients .svc-img {
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.55) 0%, black 10%);
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.55) 0%, black 10%);
}

.svc-label {
    position: absolute;
    bottom: -20px;
    left: -22px;
    background: #DAEFEA;
    color: #000000;
    font-family: var(--font-heading);
    font-weight: 500;
    font-style: italic;
    font-size: 1.25rem;
    padding: .85rem 2rem;
    border-radius: 24px 0 24px 0; /* top-left & bottom-right rounded */
    text-align: center;
    white-space: nowrap;
    z-index: 2;
}

/* ============================================================
   WHY CHOOSE US
   ============================================================ */
.why-us {
    background: var(--bg);
    padding: 55px 2.8rem;
}

.why-us .container {
    max-width: none;
    padding-inline: 0;
}

.why-us-grid {
    display: block;
    width: 100%;
    max-width: none;
    margin-inline: auto;
}

.why-us-subtitle {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    font-style: normal;
    color: #000000;
    margin: 0 0 .4rem 0;
    padding-top: 5rem; /* push subtitle down to vertical middle of logo */
    text-align: right;
}

.why-us-title {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 700;
    font-style: italic;
    color: #000000;
    margin-bottom: 1.3rem;
    line-height: 1.35;
    text-align: right;
    padding-right: 30rem;
}

.why-us-content p {
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 400;
    font-style: italic;
    color: #000000;
    margin-bottom: 1rem;
    line-height: 1.75;
    text-align: right;
}

.why-us-content p:nth-of-type(1) {
    clear: right; /* body paragraphs start below the floated logo */
    padding-top: 1rem;
}

.why-us-cta {
    margin-top: 1.5rem;
    font-family: var(--font-heading) !important;
    font-weight: 700 !important;
    font-style: normal !important;
    color: #000000 !important;
    font-size: 1.6rem !important;
    text-align: center !important;
}

/* Logo floated on the right, aligned under the service card image above */
.why-us-logo-box {
    float: right;
    width: 210px;
    margin: 0 4rem 1rem 2.5rem;
    padding: 0;
}

.why-us-logo {
    width: 210px;
    height: auto;
    display: block;
}

/* ============================================================
   CLIENTS
   ============================================================ */
.oil-clients-section {
    padding: 50px 0;
    text-align: center;
}

.oil-clients-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: .5rem;
}

.oil-clients-text {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-mid);
    margin-bottom: 2rem;
}

.oil-clients-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
}

.oil-client-logo {
    padding: 1rem 1.5rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow .25s ease;
}

.oil-client-logo:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.08);
}

.oil-client-logo img {
    max-height: 80px;
    max-width: 180px;
    object-fit: contain;
}

/* Square/icon-style logos need extra size to feel balanced next to wide ones */
.oil-client-logo--featured img {
    max-height: 115px;
    max-width: 200px;
}

/* ============================================================
   CONTACT
   ============================================================ */
.contact {
    position: relative;
    margin-top: 5rem;
    padding: 2rem 3rem 0;
    overflow: hidden;
    background: var(--bg);
    aspect-ratio: 1536 / 720;
}

.contact-bg {
    position: absolute;
    inset: 0;
    background: url('images/vector-Industrial Wastewater Treatment Facility.jpeg') center / 100% 100% no-repeat;
    opacity: .55;
    mix-blend-mode: multiply;
    z-index: 0;
}

/* ===== Shared sub-page footer (vector image) ===== */
.sub-footer {
    background: var(--bg);
    padding: 0;
    line-height: 0;
    margin-top: -40px;
}

/* CTA sitting visually on the footer vector image (per-page opt-in) */
.sub-cta-section--overlap {
    position: relative;
    z-index: 2;
    padding-bottom: 220px;
}

.sub-footer--overlap {
    margin-top: -260px;
    position: relative;
    z-index: 1;
}

.sub-footer-img {
    width: 100%;
    height: auto;
    display: block;
    opacity: .55;
    mix-blend-mode: multiply;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%);
}

.contact-overlay {
    display: none;
}

.contact-inner {
    position: relative;
    z-index: 2;
    max-width: none;
    padding: 0;
}

.contact-title {
    display: none;
}

.contact-form {
    max-width: 1100px;
    margin: 0 auto;
    background: transparent;
    border: 1px solid #444;
    border-radius: 14px;
    padding: 1.6rem 2rem;
    box-shadow: none;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.form-group--full {
    margin-bottom: 1.2rem;
}

.form-group label {
    font-family: var(--font-body);
    font-size: .88rem;
    font-weight: 500;
    color: var(--text-dark);
    text-align: right;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .65rem .9rem;
    border: 1px solid rgba(0,0,0,.12);
    border-radius: var(--radius);
    background: var(--white);
    font-family: var(--font-body);
    font-size: .93rem;
    color: var(--text);
    direction: rtl;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23666' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left .9rem center;
    padding-left: 2.5rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(91,158,150,.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aaa;
}

.form-group textarea {
    resize: vertical;
    min-height: 110px;
}

.form-submit {
    text-align: center;
    margin-top: .75rem;
}

.btn-submit {
    display: inline-block;
    padding: .75rem 3.5rem;
    background: var(--text);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.btn-submit:hover,
.btn-submit:focus-visible {
    background: #333;
    transform: translateY(-2px);
}

.form-success {
    margin-top: 1rem;
    padding: .85rem 1rem;
    background: rgba(91,158,150,.15);
    border: 1px solid var(--teal);
    border-radius: var(--radius);
    color: var(--teal-dark);
    font-weight: 600;
    text-align: center;
}

.form-group input.invalid,
.form-group textarea.invalid {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192,57,43,.12);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--bg);
    padding-top: 2rem;
}

.footer-inner {
    display: flex;
    justify-content: center;
    padding: 1rem 2rem 1.5rem;
}

.footer-info-img {
    height: auto;
}

.footer-bottom {
    border-top: 1px solid rgba(0,0,0,.08);
    padding: 1rem 0;
    text-align: center;
    font-size: .82rem;
    color: var(--text-mid);
}

/* ============================================================
   RESPONSIVE – Tablet (max 900px)
   ============================================================ */
@media (max-width: 900px) {
    .hero { height: 300px; }

    .main-nav  { display: none; }
    .hamburger { display: flex; }
    .services-bar { display: none; }

    .why-us-grid {
        grid-template-columns: 1fr;
    }

    .why-us-logo-box {
        max-width: 240px;
    }
}

/* ============================================================
   RESPONSIVE – Mobile (max 640px)
   ============================================================ */
@media (max-width: 640px) {
    .top-header {
        padding: .6rem 1rem;
        position: relative;
    }

    .site-logo { height: 48px; }

    .hero { height: 220px; }

    .about { padding: 40px 0; }
    .about-text { font-size: 16px; }

    .cards-grid { grid-template-columns: 1fr; }
    .service-card { height: 220px; }
    .card-label { font-size: 1.25rem; }

    .why-us { padding: 40px 1.2rem; }
    .why-us-title {
        font-size: 1.35rem;
        padding-right: 0;
        text-align: center;
    }
    .why-us-subtitle {
        font-size: 1rem;
        padding-top: 0;
        text-align: center;
    }
    .why-us-logo-box {
        float: none;
        max-width: 180px;
        margin: 0 auto 1rem;
    }
    .why-us-content p { text-align: right; }
    .why-us-content p:nth-of-type(1) { padding-top: 0; }

    .contact { padding: 40px 0; }
    .contact-form { padding: 1.5rem 1rem; }
    .form-row { grid-template-columns: 1fr; }

    .footer-info-img { max-width: 280px; }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
    html { scroll-behavior: auto; }
}
