/* Al Tareeq Al Sarea Technical Service - design system
   Brand teal #046F76 - page background #F4F5F6 */
:root {
    --brand: #046F76;
    --brand-dark: #035a60;
    --brand-deep: #023a3f;
    --brand-tint: #e6f2f3;
    --bg: #F4F5F6;
    --surface: #fff;
    --line: #e0e5e6;
    --text: #243133;
    --text-soft: #5d6e70;
    --wa: #1fa855;
    --wa-dark: #178a46;
    --radius: 12px;      /* cards, panels, images */
    --radius-sm: 8px;    /* buttons, inputs */
    --shadow: 0 1px 2px rgba(2,58,63,.05), 0 6px 18px rgba(2,58,63,.06);
    --shadow-lg: 0 2px 4px rgba(2,58,63,.06), 0 16px 34px rgba(2,58,63,.12);
    --ease: cubic-bezier(.2,.7,.2,1);
    --font-head: 'Manrope', system-ui, sans-serif;

    --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bs-body-bg: var(--bg);
    --bs-body-color: var(--text);
    --bs-link-color: var(--brand);
    --bs-link-hover-color: var(--brand-dark);
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { background: var(--bg); color: var(--text); line-height: 1.7; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .btn, .brand-text { font-family: var(--font-head); }
h1, h2, h3 { color: var(--brand-deep); letter-spacing: -.02em; line-height: 1.2; }
p { max-width: 66ch; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.skip-link { position: absolute; left: 8px; top: 8px; z-index: 2000; background: #fff; padding: .5rem 1rem; border-radius: var(--radius-sm); }

/* Scroll reveal (hidden only while JS runs) */
.js [data-reveal] { opacity: 0; transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
.js [data-reveal="up"] { transform: translateY(24px); }
.js [data-reveal="left"] { transform: translateX(-32px); }
.js [data-reveal="right"] { transform: translateX(32px); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* Top bar and header */
.topbar { background: var(--brand-deep); color: #cfe3e5; font-size: .85rem; padding: .4rem 0; }
.topbar a { color: #fff; text-decoration: none; transition: color .2s; }
.topbar a:hover { color: #a8dde0; }
.topbar i { color: #a8dde0; }

.site-header { background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); z-index: 1030; transition: box-shadow .3s; }
.site-header.is-scrolled { box-shadow: 0 6px 20px rgba(2,58,63,.1); }
.navbar { padding: .6rem 0; }
.navbar-brand { margin-right: 1rem; }
.navbar-brand img { transition: transform .5s var(--ease); }
.navbar-brand:hover img { transform: scale(1.06); }
.brand-text { display: flex; flex-direction: column; font-weight: 800; font-size: 1.12rem; line-height: 1.1; color: var(--brand-deep); }
.brand-text small { font-family: var(--bs-body-font-family); font-weight: 500; font-size: .72rem; color: var(--text-soft); letter-spacing: .03em; }
.site-footer .brand-text small { color: #a8cfd2; }
.navbar .nav-link { font-weight: 600; font-size: .95rem; color: var(--brand-deep); padding: .55rem 1rem; position: relative; transition: color .2s; }
.navbar .nav-link::after { content: ''; position: absolute; left: 1rem; right: 1rem; bottom: .25rem; height: 2px; border-radius: 2px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--brand); }
.navbar .nav-link:hover::after, .navbar .nav-link.active::after { transform: scaleX(1); }
.navbar-toggler { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .4rem .6rem; }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(4,111,118,.2); }

/* Buttons */
.btn { font-weight: 700; font-size: .95rem; border-radius: var(--radius-sm); padding: .65rem 1.3rem; position: relative; overflow: hidden; isolation: isolate; transition: transform .2s var(--ease), box-shadow .2s, background-color .2s, color .2s, border-color .2s; }
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.3) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s var(--ease); }
.btn:hover::before { transform: translateX(120%); }
.btn-lg { padding: .85rem 1.7rem; font-size: 1rem; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-brand { background: var(--brand); color: #fff; border: 2px solid var(--brand); }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; box-shadow: 0 8px 18px rgba(4,111,118,.3); }
.btn-outline-brand { border: 2px solid var(--brand); color: var(--brand); background: transparent; }
.btn-outline-brand:hover { background: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(4,111,118,.25); }
.btn-light-solid { background: #fff; color: var(--brand-dark); border: 2px solid #fff; }
.btn-light-solid:hover, .btn-light-solid:focus { background: var(--brand-tint); border-color: var(--brand-tint); color: var(--brand-deep); box-shadow: 0 8px 18px rgba(0,0,0,.2); }
.btn-whatsapp { background: var(--wa); color: #fff; border: 2px solid var(--wa); }
.btn-whatsapp:hover, .btn-whatsapp:focus { background: var(--wa-dark); border-color: var(--wa-dark); color: #fff; box-shadow: 0 8px 18px rgba(31,168,85,.3); }

/* Hero and page banners */
.hero, .page-header { position: relative; color: #fff; overflow: hidden; background: var(--brand-deep); }
.hero { padding: clamp(5rem, 13vw, 9.5rem) 0; }
.page-header { padding: clamp(3rem, 7vw, 4.75rem) 0; }
.hero-bg { position: absolute; inset: -12% 0; will-change: transform; background-image: url('/images/photos/hero.jpg'), url('/images/hero.svg'); background-size: cover; background-position: center; }
.hero::before, .page-header::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(100deg, rgba(2,58,63,.94) 0%, rgba(3,84,90,.82) 55%, rgba(4,111,118,.55) 100%); }
.hero .container, .page-header .container { position: relative; z-index: 2; }
.hero-copy { max-width: 640px; }
.hero h1 { color: #fff; font-size: clamp(2.3rem, 5.5vw, 3.9rem); font-weight: 800; letter-spacing: -.03em; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .1em; }
.hero h1 .line > span { display: inline-block; animation: lineUp .9s var(--ease) both; }
.hero h1 .line:nth-child(2) > span { animation-delay: .15s; }
.hero-lead { font-size: 1.12rem; color: #dcecee; margin: 1.25rem 0 0; animation: rise .8s .3s var(--ease) both; }

/* Hero panel: quick links to the services */
.hero-panel-col { animation: rise .9s .4s var(--ease) both; }
.hero-panel { background: #fff; color: var(--text); border-radius: var(--radius); padding: 1.35rem 1.5rem; border-top: 4px solid var(--brand); box-shadow: 0 24px 50px rgba(0,0,0,.28); }
.hero-panel h2 { font-size: 1.15rem; font-weight: 800; margin-bottom: .5rem; }
.hero-panel li + li { border-top: 1px solid var(--line); }
.hero-panel a { display: flex; align-items: center; gap: .8rem; padding: .75rem .2rem; color: var(--brand-deep); text-decoration: none; font-weight: 600; font-size: .95rem; transition: color .2s, padding-left .25s var(--ease); }
.hero-panel a > .bi:first-child { font-size: 1.2rem; color: var(--brand); width: 1.5rem; transition: transform .3s var(--ease); }
.hero-panel a .bi-chevron-right { color: var(--text-soft); font-size: .8rem; transition: transform .25s var(--ease); }
.hero-panel a:hover { color: var(--brand); padding-left: .5rem; }
.hero-panel a:hover > .bi:first-child { transform: scale(1.15); }
.hero-panel a:hover .bi-chevron-right { transform: translateX(4px); }

.page-header h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 2.9rem); font-weight: 800; }
.page-header p { color: #dcecee; margin: .5rem 0 0; font-size: 1.08rem; }
.page-title-anim { animation: rise .8s var(--ease) both; }
@keyframes lineUp { from { transform: translateY(110%); } to { transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* Sections */
.section { padding: clamp(3.25rem, 7vw, 5.5rem) 0; }
.section-white { background: #fff; border-block: 1px solid var(--line); }
.section-head { max-width: 640px; margin: 0 auto 2.5rem; text-align: center; }
.section-head p { margin: 0 auto; color: var(--text-soft); }
.section-title { font-size: clamp(1.65rem, 3.2vw, 2.25rem); font-weight: 800; margin-bottom: .85rem; }
.section-head .section-title::after { content: ''; display: block; width: 44px; height: 3px; border-radius: 3px; background: var(--brand); margin: .85rem auto 0; }
.lead-text { font-size: 1.1rem; }
.text-muted-2 { color: var(--text-soft); }

/* About */
.about-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); background: var(--brand-tint); position: relative; }
.about-media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.about-media:hover img { transform: scale(1.04); }
.about-badge { position: absolute; left: 1rem; bottom: 1rem; display: flex; gap: .7rem; align-items: center; background: #fff; border-radius: var(--radius-sm); padding: .65rem .95rem; box-shadow: var(--shadow); font-weight: 700; font-size: .92rem; color: var(--brand-deep); line-height: 1.25; }
.about-badge i { color: var(--brand); font-size: 1.3rem; }
.about-badge small { display: block; font-weight: 500; color: var(--text-soft); }

/* Service cards (compact, equal height, consistent image ratio) */
.service-tile, .service-card { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); text-decoration: none; color: inherit; transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.service-tile:hover, .service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(4,111,118,.45); }
.tile-media, .service-card-img { position: relative; overflow: hidden; background: var(--brand-tint); }
.tile-media img, .service-card-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; transition: transform .7s var(--ease); }
.service-tile:hover img, .service-card:hover img { transform: scale(1.06); }
.tile-icon { position: absolute; left: .85rem; bottom: .85rem; width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--brand); color: #fff; font-size: 1.1rem; box-shadow: 0 4px 12px rgba(0,0,0,.2); transition: transform .35s var(--ease), background .25s, color .25s; }
.service-tile:hover .tile-icon, .service-card:hover .tile-icon { transform: translateY(-3px) scale(1.08); background: #fff; color: var(--brand); }
.service-tile-body, .service-card-body { padding: 1rem 1.1rem 1.15rem; flex: 1; }
.service-tile-body h3, .service-card-body h2 { font-size: 1.05rem; font-weight: 800; margin: 0 0 .35rem; }
.service-tile-body p, .service-card-body p { margin: 0; font-size: .9rem; line-height: 1.55; color: var(--text-soft); }
.service-list { list-style: none; padding: .75rem 0 0; margin: .75rem 0 0; border-top: 1px solid var(--line); }
.service-list li { display: flex; gap: .5rem; align-items: flex-start; padding: .15rem 0; font-size: .86rem; color: var(--text); }
.service-list i { color: var(--brand); font-size: 1rem; line-height: 1.5; }
.col[id] { scroll-margin-top: 96px; }
.col[id]:target .service-card { box-shadow: 0 0 0 3px rgba(4,111,118,.45); }

/* Why choose us */
.why { display: flex; gap: 1rem; align-items: flex-start; }
.why > i { flex: 0 0 auto; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--brand-tint); color: var(--brand); font-size: 1.2rem; transition: background .3s, color .3s, transform .35s var(--ease); }
.why:hover > i { background: var(--brand); color: #fff; transform: scale(1.08); }
.why h3 { font-size: 1.05rem; font-weight: 800; margin-bottom: .2rem; }
.why p { margin: 0; color: var(--text-soft); font-size: .93rem; }

/* CTA band */
.cta-band { background: linear-gradient(120deg, var(--brand-deep), var(--brand)); background-size: 160% 100%; color: #fff; padding: clamp(2.5rem, 5vw, 3.5rem) 0; animation: bgShift 14s ease-in-out infinite alternate; }
@keyframes bgShift { from { background-position: 0 0; } to { background-position: 100% 0; } }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; }
.cta-band p { color: #d3e7e9; }

/* Visit card and maps */
.visit-card { background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.visit-info { padding: clamp(1.5rem, 4vw, 2.5rem); }
.visit-map iframe, .map-frame iframe { width: 100%; height: 100%; min-height: 320px; border: 0; display: block; }
.contact-mini li { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: .8rem; }
.contact-mini i { color: var(--brand); margin-top: .25rem; }
.contact-mini a { color: var(--text); text-decoration: none; }
.contact-mini a:hover { color: var(--brand); }
.map-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); height: clamp(300px, 45vw, 420px); background: var(--brand-tint); }
.map-section { padding-top: 0; }

/* Contact page */
.contact-list { display: grid; gap: .75rem; }
.contact-item { display: flex; gap: 1rem; align-items: center; padding: .9rem 1.05rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); color: var(--text); text-decoration: none; transition: border-color .25s, transform .25s var(--ease), box-shadow .25s; }
.contact-item:hover { border-color: var(--brand); transform: translateX(4px); box-shadow: var(--shadow-lg); color: var(--text); }
.contact-item > i { flex: 0 0 auto; width: 2.75rem; height: 2.75rem; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--brand); color: #fff; font-size: 1.15rem; }
.contact-item > i.wa { background: var(--wa); }
.contact-item small { display: block; color: var(--text-soft); font-size: .78rem; line-height: 1.3; }
.contact-item strong { font-family: var(--font-head); font-size: 1rem; color: var(--brand-deep); }

.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: var(--shadow); }
.form-label { font-weight: 600; font-size: .92rem; color: var(--brand-deep); margin-bottom: .35rem; }
.form-control { border-radius: var(--radius-sm); border: 1.5px solid #cdd8d9; padding: .7rem .9rem; transition: border-color .2s, box-shadow .2s; }
.form-control:focus { border-color: var(--brand); box-shadow: 0 0 0 .2rem rgba(4,111,118,.18); }
.invalid-feedback { font-size: .85rem; margin-top: .25rem; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#status:empty { display: none; }
#status:focus { outline: none; }
.alert { border-radius: var(--radius-sm); }
.alert-success { animation: rise .5s var(--ease) both; }

/* Footer */
.site-footer { background: var(--brand-deep); color: #cfe3e5; padding-top: clamp(2.5rem, 6vw, 4rem); }
.logo-chip { background: #fff; border-radius: var(--radius-sm); padding: .35rem .5rem; display: grid; place-items: center; }
.footer-muted { color: #a8cfd2; max-width: 38ch; font-size: .93rem; }
.footer-title { font-size: .95rem; color: #fff; margin-bottom: 1rem; font-weight: 800; }
.footer-links li { margin-bottom: .5rem; font-size: .93rem; }
.footer-links a { color: #cfe3e5; text-decoration: none; transition: color .2s, padding-left .25s var(--ease); display: inline-block; }
.footer-links a:hover { color: #fff; padding-left: 4px; }
.footer-contact a { display: flex; gap: .7rem; align-items: flex-start; }
.footer-contact a:hover { padding-left: 0; }
.footer-contact i { color: #a8dde0; margin-top: .2rem; }
.footer-bottom { margin-top: 2.75rem; padding: 1.25rem 0; border-top: 1px solid rgba(255,255,255,.14); font-size: .85rem; color: #a8cfd2; }

/* Floating WhatsApp */
.float-whatsapp { position: fixed; right: 18px; bottom: 18px; z-index: 1040; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--wa); color: #fff; font-size: 1.75rem; text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,.28); transition: transform .25s var(--ease), background .2s; }
.float-whatsapp:hover { background: var(--wa-dark); color: #fff; transform: scale(1.08); }

/* Tablet and mobile */
@media (max-width: 991.98px) {
    .hero::before { background: rgba(2,58,63,.86); }
    .navbar-collapse { border-top: 1px solid var(--line); margin-top: .6rem; }
    .navbar-nav { padding: .35rem 0 .5rem; }
    .navbar .nav-link { padding: .85rem .25rem; border-bottom: 1px solid var(--line); }
    .navbar .nav-item:last-child .nav-link { border-bottom: 0; }
    .navbar .nav-link::after { display: none; }
    .navbar .nav-link.active { color: var(--brand); box-shadow: inset 3px 0 0 var(--brand); padding-left: .85rem; }
    .visit-map iframe { min-height: 280px; }
}
@media (max-width: 575.98px) {
    .cta-band .btn-lg { width: 100%; }
    .brand-text { font-size: 1rem; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
    .js [data-reveal] { opacity: 1 !important; transform: none !important; }
    .hero-bg { transform: none !important; }
}
