:root {
    --accent: #f0ac3d;
    --dark: #282828;
    --gray: #575757;
    --text: #686868;
    --heading: #282828;
    --light-bg: #f7f7f7;
    --radius: 6px;
    --container: 1160px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
    color: var(--text);
    font-size: 15px;
    line-height: 1.9;
    background: #fff;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

h1,
h2,
h3 {
    color: var(--heading);
    font-weight: 600;
}

h1 {
    font-size: 40px;
    margin-bottom: 24px;
}

h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.btn {
    display: inline-block;
    background: var(--dark);
    color: #fff;
    padding: 14px 34px;
    border-radius: var(--radius);
    font-size: 15px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.btn:hover {
    background: var(--accent);
    color: var(--dark);
}

.btn-outline {
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
}

.btn-outline:hover {
    background: #fff;
    color: var(--dark);
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #eee;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
    gap: 16px;
}

.logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    white-space: nowrap;
}

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

nav ul {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

nav a {
    font-size: 15px;
    color: var(--heading);
    padding-bottom: 4px;
}

nav a.active,
nav a:hover {
    color: var(--accent);
}

nav a.active {
    border-bottom: 2px solid var(--accent);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--dark);
}

.mobile-nav {
    display: none;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 0 24px 16px;
}

.mobile-nav.open {
    display: block;
}

.mobile-nav a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    color: var(--heading);
}

.mobile-nav a.active {
    color: var(--accent);
}

/* Hero */
.hero {
    position: relative;
    height: 78vh;
    min-height: 480px;
    background-color: #1c1c1c;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}

.hero--home {
    background-image:
        linear-gradient(135deg, rgba(24, 24, 24, 0.62), rgba(10, 10, 10, 0.78)),
        url("../assets/images/hero/offshore-platform.jpg");
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(240, 172, 61, 0.18), transparent 60%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    padding: 0 20px;
}

.hero h1 {
    color: #fff;
}

.hero p {
    margin-bottom: 32px;
    font-size: 16px;
    color: #ddd;
}

.page-hero {
    min-height: 280px;
    height: auto;
    padding: 80px 0;
}

.page-hero h1 {
    font-size: 36px;
    margin-bottom: 12px;
}

.page-hero p {
    margin-bottom: 0;
}

/* About */
.about {
    padding: 90px 0;
}

.about .container {
    display: flex;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.about .image,
.about .text {
    flex: 1;
    min-width: 300px;
}

.about .image {
    height: 340px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #ddd, #bbb);
    overflow: hidden;
}

.about .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.section-heading {
    text-align: center;
    margin-bottom: 50px;
}

.section-heading p {
    max-width: 640px;
    margin: 12px auto 0;
}

/* Products grid */
.services {
    padding: 60px 0 100px;
    background: var(--light-bg);
}

.services-grid {
    display: flex;
    gap: 4px;
    min-height: 420px;
    overflow: hidden;
}

.service-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, #555, #222);
    filter: grayscale(1);
    transition: flex 0.45s ease, filter 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: flex-end;
    flex: 1;
    min-width: 0;
    min-height: 420px;
    background-size: cover;
    background-position: center;
}

.service-card:hover {
    flex: 3.2;
    filter: grayscale(0);
    z-index: 2;
}

.service-card .label {
    position: relative;
    z-index: 2;
    padding: 24px 16px;
    color: #fff;
    width: 100%;
}

.service-card .label strong {
    display: block;
    font-size: 17px;
    margin-bottom: 8px;
}

.service-card .subcategory-list {
    font-size: 11px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}

.service-card:hover .subcategory-list {
    max-height: 120px;
    opacity: 1;
}

.service-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 60%);
}

/* Certificates teaser */
.certificates-teaser {
    padding: 80px 0;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.cert-card {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    border: 1px solid #eee;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.cert-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
}

.cert-card .badge {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--dark);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

.cert-card h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.cert-card p {
    font-size: 13px;
}

/* Inner pages */
.page-content {
    padding: 70px 0 90px;
}

.breadcrumb {
    font-size: 13px;
    color: #999;
    margin-bottom: 28px;
}

.breadcrumb a:hover {
    color: var(--accent);
}

.breadcrumb span {
    margin: 0 8px;
}

.prose {
    max-width: 820px;
}

.prose p {
    margin-bottom: 18px;
}

.prose h2 {
    margin-top: 36px;
}

.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.subcategory-card {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid #eee;
}

.subcategory-card h3 {
    color: var(--heading);
    margin-bottom: 10px;
}

.category-hero-image {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 32px;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-card {
    background: var(--light-bg);
    border-radius: var(--radius);
    padding: 32px;
    border: 1px solid #eee;
}

.contact-card h3 {
    margin-bottom: 16px;
}

.contact-card p {
    margin-bottom: 10px;
}

.contact-map {
    margin-top: 40px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #eee;
    min-height: 320px;
    background: var(--light-bg);
}

.contact-map iframe {
    width: 100%;
    height: 360px;
    border: 0;
}

/* Footer */
footer {
    background: var(--light-bg);
    padding: 70px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 40px;
}

footer h3 {
    font-size: 18px;
    margin-bottom: 18px;
}

.socials {
    display: flex;
    gap: 14px;
    margin-top: 10px;
}

.socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #999;
}

.call-float {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 200;
    background: var(--dark);
    color: #fff;
    border-radius: 50px;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.call-float:hover {
    background: var(--accent);
    color: var(--dark);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    background: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    background: #fff;
    border-radius: var(--radius);
    padding: 40px;
    max-width: 520px;
    text-align: center;
}

.lightbox-close {
    position: absolute;
    top: 24px;
    left: 24px;
    background: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

@media (max-width: 1100px) {
    .services-grid {
        flex-wrap: wrap;
        min-height: auto;
    }

    .service-card {
        flex: 1 1 calc(33.333% - 4px);
        min-height: 200px;
    }

    .service-card:hover {
        flex: 1 1 calc(33.333% - 4px);
    }

    .service-card .subcategory-list {
        max-height: 120px;
        opacity: 1;
    }

    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .footer-grid,
    .contact-grid,
    .subcategory-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        flex-direction: column;
    }

    .service-card,
    .service-card:hover {
        flex: none;
        width: 100%;
        min-height: 180px;
    }

    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 26px;
    }
}

@media (max-width: 600px) {
    .services-grid,
    .cert-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 400px;
    }
}
