/*
Theme Name: Smart Line Custom
Theme URI: https://smartline-survey.com
Author: Smart Line
Description: A custom, premium, lightweight theme for Smart Line Geophysical Survey.
Version: 3.0
Text Domain: smartline
*/
/* Corporate Engineering Theme Variables */
:root {
    --primary: #0f365c; /* Corporate Navy */
    --secondary: #e67e22; /* Safety/Earth Orange */
    --primary-light: #1b5b93; /* lighter navy, used in page-header gradients */
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-main: #ffffff;
    --bg-alt: #f8f9fa;
    --bg-light: #f8f9fa; /* alias kept for templates that reference it */
    --border: #e0e6ed;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    --shadow-sm: 0 2px 4px rgba(15, 54, 92, 0.05);
    --shadow-md: 0 10px 20px rgba(15, 54, 92, 0.08);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-main);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1.2;
}

.highlight {
    color: var(--secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
}

.btn-primary:hover {
    background-color: #d35400;
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background-color: transparent;
    border-color: white;
    color: white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--primary);
}

.btn-large {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-block {
    width: 100%;
}

/* Header & Nav */
.header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: white;
    box-shadow: var(--shadow-sm);
}

.top-bar {
    background-color: var(--primary);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
}

.contact-info i {
    color: var(--secondary);
    margin-right: 6px;
}

.social-links a {
    color: rgba(255, 255, 255, 0.8);
    margin-left: 15px;
}

.social-links a:hover {
    color: white;
}

.navbar {
    padding: 15px 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-smart {
    color: var(--secondary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--secondary);
}

.nav-links .btn {
    color: white;
}

.nav-links .btn:hover {
    color: white;
}

/* Hero Section */
.hero {
    margin-top: 100px; /* Offset for header */
    background: var(--primary);
    min-height: 88vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(230,126,34,0.1) 0%, rgba(230,126,34,0) 100%);
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative;
    z-index: 2;
}

.hero-text {
    flex: 1;
    color: white;
}

.badge {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.hero-title {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.hero-graphic {
    flex: 1;
    position: relative;
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 20px;
}

.grid-pattern {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
}

.data-box {
    background: white;
    padding: 20px 30px;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--primary);
    font-weight: 600;
    animation: float 6s ease-in-out infinite;
}

.data-box i {
    color: var(--secondary);
    font-size: 1.5rem;
}

.data-2 {
    margin-right: 50px;
    animation-delay: 1s;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* Trust Banner */
.trust-banner {
    background: var(--bg-alt);
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.trust-banner p {
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 30px;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 80px;
}

.stat h3 {
    font-size: 2.5rem;
    color: var(--primary);
}

.stat span {
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

/* Services */
.services {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    border: 1px solid var(--border);
    padding: 40px 30px;
    border-radius: 4px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--secondary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card.featured {
    border-color: var(--secondary);
    box-shadow: var(--shadow-sm);
}

.service-card.featured::before {
    transform: scaleX(1);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-alt);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 25px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 25px;
}

.learn-more {
    color: var(--secondary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.learn-more:hover {
    color: var(--primary);
}

/* CTA */
.cta {
    padding: 80px 0;
    background: var(--primary);
    background-image: linear-gradient(135deg, var(--primary) 0%, #1a4b7c 100%);
    color: white;
}

.cta-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.cta-text h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.cta-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

.cta-form-container {
    background: white;
    padding: 40px;
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 400px;
}

.clean-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.clean-form input {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
}

.clean-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    resize: vertical;
}

.clean-form input:focus, .clean-form textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: flex;
    gap: 15px;
}
.form-row input {
    flex: 1;
}

/* About Page */
.about-hero {
    margin-top: 100px;
    /* Solid colour first: it is the fallback if the photograph cannot load,
       and it is what the overlay gradient sits on. --about-bg is set on the
       element in page-about.php so the file path stays out of the stylesheet. */
    background-color: var(--primary);
    background-image:
        linear-gradient(rgba(9, 30, 53, 0.76), rgba(9, 30, 53, 0.64)),
        var(--about-bg, none);
    background-size: cover;
    background-position: center 58%;
    background-repeat: no-repeat;
    padding: 120px 0;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.about-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.32);
}

.about-hero-content h1 .highlight {
    color: var(--secondary);
}

.about-hero-content .subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.34);
}

@media (max-width: 768px) {
    .about-hero {
        padding: 78px 0;
        background-image:
            linear-gradient(rgba(9, 30, 53, 0.76), rgba(9, 30, 53, 0.64)),
            var(--about-bg-sm, var(--about-bg, none));
    }
    .about-hero-content h1 { font-size: 2.1rem; }
    .about-hero-content .subtitle { font-size: 1.02rem; }
}

.about-content-section {
    padding: 80px 0;
    background: white;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text-column h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
}

.about-text-column p {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    line-height: 1.8;
}

.mission-box {
    background: var(--primary);
    color: white;
    padding: 50px 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.mission-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--secondary);
}

.mission-icon {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.mission-box h3 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.mission-box p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
}

/* Footer */
.footer {
    background: var(--bg-alt);
    padding: 80px 0 0 0;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.logo-footer {
    margin-bottom: 20px;
}

.footer-desc {
    color: var(--text-light);
    max-width: 300px;
}

.footer h4 {
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer ul a {
    color: var(--text-light);
}

.footer ul a:hover {
    color: var(--secondary);
}

.contact-list li {
    color: var(--text-light);
    display: flex;
    gap: 10px;
    align-items: center;
}

.contact-list i {
    color: var(--primary);
}

.footer-bottom {
    background: white;
    padding: 20px 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-content { flex-direction: column; text-align: center; padding-top: 40px; }
    .hero-graphic { display: none; }
    .cta-container { flex-direction: column; text-align: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .top-bar { font-size: .8rem; }
    .top-bar .contact-info { gap: 14px; }
    .top-bar .contact-info .tb-hide-sm { display: none; }
    .hero { margin-top: 70px; }
    .hero-title { font-size: 2.5rem; }
    .stats-row { flex-direction: column; gap: 30px; }
    /* mobile nav is a real slide-down panel, see .nav-open below */
    .nav-links {
        display: none;
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch;
        gap: 0; padding: 8px 0 14px;
        background: var(--bg-main);
        border-top: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }
    .navbar.nav-open .nav-links { display: flex; }
    .nav-links li { list-style: none; }
    .nav-links a { display: block; padding: 13px 24px; }
    .nav-links .btn { margin: 10px 24px 0; text-align: center; }
    .menu-toggle { display: inline-flex; }
    .footer-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; gap: 15px; }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}


/* Hero Slider */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}
.hero-dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(90deg, rgba(15,54,92,0.88) 0%, rgba(15,54,92,0.62) 45%, rgba(15,54,92,0.35) 100%);
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slider .slide.active {
    opacity: 1;
}

.hero-graphic .data-box {
    z-index: 2;
    background: rgba(255, 255, 255, 0.95);
}

.grid-pattern {
    z-index: 0;
}


/* ==========================================================================
   v3 additions — replaces the inline styles that used to live in the
   templates. Keeping layout here means it can be cached, made responsive,
   and changed without editing PHP.
   ========================================================================== */

/* --- accessibility --- */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    background: var(--primary);
    color: #fff;
    padding: 12px 20px;
    font-weight: 600;
}
.skip-link:focus { left: 0; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
}

/* --- mobile menu button (hidden on desktop, shown in the 768px query) --- */
.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: transparent;
    color: var(--primary);
    font-size: 1.15rem;
    cursor: pointer;
    transition: var(--transition);
}
.menu-toggle:hover { background: var(--bg-alt); }
.navbar { position: relative; }

/* --- header / footer contact strip --- */
.top-bar .contact-info a,
.footer .contact-list a { color: inherit; }
.top-bar .contact-info a:hover,
.footer .contact-list a:hover { color: var(--secondary); }

.footer-social {
    display: flex;
    gap: 14px;
    margin-top: 16px;
}
.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: inherit;
    transition: var(--transition);
}
.footer-social a:hover { background: var(--secondary); color: #fff; }

/* --- generic section rhythm (was: inline padding on every <section>) --- */
.section { padding: 80px 0; }
.section-white { background-color: var(--bg-main); }
.section-alt   { background-color: var(--bg-alt); }

/* --- two-column image + text block (was: inline flex on every row) --- */
.split {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}
.split + .split { margin-top: 60px; }
.split-reverse { flex-direction: row-reverse; }
.split-col { flex: 1; min-width: 300px; }
.split-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}
.split h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 20px;
}
.split p {
    margin-bottom: 15px;
    color: var(--text-light);
    line-height: 1.8;
}
.split ul {
    list-style-type: disc;
    padding-left: 20px;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* --- wide feature cards (data processing / training) --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}
.feature-card {
    text-align: left;
    padding: 40px;
}
.feature-card .card-icon { margin-bottom: 20px; }
.feature-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}
.feature-card p {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 25px;
}
.feature-card p:last-child { margin-bottom: 0; }

/* --- inner page header (was: inline gradient that silently failed) --- */
.page-header {
    padding: 150px 0 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    background-color: var(--primary); /* fallback if the gradient cannot paint */
    color: #fff;
    text-align: center;
}
.page-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #fff;
}

/* --- services cards on the Services template --- */
.svc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}
.svc-card {
    background: var(--bg-main);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.svc-card:hover { transform: translateY(-4px); }
.svc-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}
.svc-card-body { padding: 30px; }
.svc-card-body h3 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 15px;
}
.svc-card-body h3 i { margin-right: 10px; }
.svc-card-body p {
    color: var(--text-dark);
    line-height: 1.8;
}

/* --- honeypot: must stay reachable to bots but invisible to people --- */
.sl-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- floating WhatsApp action --- */
.wa-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 200;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    font-size: 1.6rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .22);
    transition: var(--transition);
}
.wa-float:hover { transform: scale(1.07); color: #fff; }

@media (max-width: 768px) {
    .section { padding: 56px 0; }
    .split + .split { margin-top: 40px; }
    .split-reverse { flex-direction: column; }
    .feature-card { padding: 28px; }
    .page-header { padding: 110px 0 40px; }
    .page-header h1 { font-size: 2.1rem; }
    .svc-card img { height: 200px; }
    .wa-float { width: 48px; height: 48px; font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; animation: none !important; }
}

/* --- visually hidden, still read by screen readers --- */
.screen-reader-text {
    border: 0;
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}
.screen-reader-text:focus {
    clip-path: none;
    background: var(--bg-main);
    color: var(--primary);
    height: auto;
    width: auto;
    padding: 12px 20px;
    z-index: 100000;
}

/* --- generic inner page (was: inline styles in page.php / index.php) --- */
.page-content { padding: 60px 0; background-color: var(--bg-alt); }
.page-content .page-panel {
    background: var(--bg-main);
    padding: 40px;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
}
.page-content .featured-image { margin-bottom: 30px; text-align: center; }
.page-content .featured-image img { max-width: 100%; height: auto; border-radius: 8px; }
.page-header .breadcrumbs { color: rgba(255, 255, 255, .85); }
.blog-index { padding: 150px 0 50px; min-height: 50vh; }

@media (max-width: 768px) {
    .page-content { padding: 40px 0; }
    .page-content .page-panel { padding: 24px; }
    .blog-index { padding: 110px 0 40px; }
}

/* --- site logo -------------------------------------------------------------
   The header logo is the media-library file at full size (3090 x 1053 on this
   site), so its displayed height has to be constrained here. This previously
   lived as an inline style on a hardcoded <img>; keeping it in CSS means the
   logo stays the right size no matter which path renders it.
   .custom-logo is included as a safety net in case WordPress ever outputs the
   logo through the_custom_logo().
   -------------------------------------------------------------------------- */
.logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.logo img,
.logo .site-logo,
.logo .custom-logo,
.custom-logo-link img {
    height: 40px;
    width: auto;
    max-width: 100%;
    display: block;
}

.logo-footer img {
    height: 40px;
    width: auto;
    max-width: 100%;
    display: block;
}

@media (max-width: 768px) {
    .logo img,
    .logo .site-logo,
    .logo .custom-logo,
    .custom-logo-link img {
        height: 32px;
    }
}

/* ==========================================================================
   Projects
   ========================================================================== */

/* --- category filter --- */
.project-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 38px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border);
}
.project-filter a {
    font-family: var(--font-heading);
    font-size: .88rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 40px;
    border: 1px solid var(--border);
    color: var(--text-light);
    background: var(--bg-main);
    transition: var(--transition);
}
.project-filter a:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.project-filter a.on {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* --- grid --- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 34px;
}

.project-card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.project-card-media {
    display: block;
    aspect-ratio: 16 / 10;
    background: var(--bg-alt);
    overflow: hidden;
}
.project-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.project-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: rgba(255, 255, 255, .5);
    font-size: 2.6rem;
}

.project-card-body {
    padding: 24px 24px 26px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
.project-card-cat {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 10px;
}
.project-card-body h3 {
    font-size: 1.18rem;
    line-height: 1.35;
    margin-bottom: 9px;
}
.project-card-body h3 a { color: var(--primary); }
.project-card-body h3 a:hover { color: var(--secondary); }
.project-card-line {
    font-size: .83rem;
    color: var(--text-light);
    margin-bottom: 11px;
}
.project-card-ex {
    color: var(--text-light);
    line-height: 1.7;
    font-size: .94rem;
    margin-bottom: 18px;
}
.project-card .learn-more { margin-top: auto; }

.project-empty {
    padding: 40px;
    text-align: center;
    color: var(--text-light);
    background: var(--bg-main);
    border: 1px dashed var(--border);
    border-radius: 12px;
}
.project-intro {
    max-width: 70ch;
    margin-bottom: 34px;
    color: var(--text-light);
    line-height: 1.8;
}

/* --- single project --- */
.project-hero { text-align: left; }
.project-hero .about-hero-content { text-align: left; }
.project-hero-cat {
    display: inline-block;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #fff;
    background: var(--secondary);
    padding: 5px 13px;
    border-radius: 40px;
    margin-bottom: 18px;
}
.project-hero-cat:hover { color: #fff; opacity: .9; }

.project-single {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 54px;
    align-items: start;
}
.project-body { max-width: 68ch; }
.project-body p {
    color: var(--text-dark);
    line-height: 1.85;
    margin-bottom: 20px;
}
.project-body h2, .project-body h3 { margin: 34px 0 14px; }
.project-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 10px 0 24px;
}
.project-body .project-ar {
    direction: rtl;
    text-align: right;
    font-size: 1.04rem;
    line-height: 2;
    padding-top: 18px;
    margin-top: 26px;
    border-top: 1px solid var(--border);
}

.project-side {
    position: sticky;
    top: 110px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 26px 24px;
}
.project-side-h {
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 16px;
}
.project-meta { margin: 0 0 22px; }
.pmeta-row {
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.pmeta-row:last-child { border-bottom: 0; }
.pmeta-row dt {
    font-size: .74rem;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 3px;
}
.pmeta-row dd {
    margin: 0;
    color: var(--text-dark);
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.5;
}
.project-back {
    display: block;
    text-align: center;
    margin-top: 14px;
    font-size: .89rem;
    font-weight: 600;
    color: var(--text-light);
}
.project-back:hover { color: var(--primary); }

/* --- pagination --- */
.navigation.pagination {
    margin-top: 44px;
    display: flex;
    justify-content: center;
}
.navigation.pagination .nav-links,
.navigation.pagination > a,
.navigation.pagination > span {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.pagination .page-numbers {
    min-width: 40px;
    padding: 9px 13px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-light);
    font-weight: 600;
    font-size: .9rem;
    transition: var(--transition);
}
.pagination .page-numbers:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pagination .page-numbers.current {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

@media (max-width: 900px) {
    .project-single {
        grid-template-columns: 1fr;
        gap: 34px;
    }
    .project-side { position: static; }
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .project-filter { gap: 8px; margin-bottom: 28px; }
    .project-filter a { font-size: .82rem; padding: 7px 13px; }
    .project-hero-cat { font-size: .68rem; }
}
