/* ============================================
   MAC Engineering - Stylesheet
   Brand Colors from MAC Partners Group
   Layout inspired by Minopex
   ============================================ */

/* --- CSS Variables --- */
:root {
    --primary: #3182CE;
    --primary-dark: #2B6CB0;
    --primary-darker: #1A365D;
    --accent: #0195FF;
    --navy: #1A202C;
    --dark: #0F1724;
    --text: #2D3748;
    --text-light: #4A5568;
    --text-muted: #718096;
    --light-bg: #F7FAFC;
    --blue-bg: #EEF5FA;
    --white: #ffffff;
    --border: #E2E8F0;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    --radius: 8px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

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

body {
    font-family: var(--font);
    color: var(--text);
    line-height: 1.6;
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* --- Container --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.header.scrolled {
    background: rgba(26, 32, 44, 0.95);
    backdrop-filter: blur(12px);
    padding: 10px 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 44px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.6);
    font-weight: 400;
    letter-spacing: 0.5px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    position: relative;
    padding: 4px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: var(--transition);
    border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Nav Dropdown --- */
.nav-item {
    position: relative;
}

.nav-item .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-item .nav-link .dropdown-arrow {
    width: 12px;
    height: 12px;
    transition: var(--transition);
}

.nav-item:hover .nav-link .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    min-width: 240px;
    background: rgba(26, 32, 44, 0.97);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
    z-index: 100;
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.08);
}

.dropdown-menu a.active {
    color: var(--accent);
}

/* --- Service Summary Cards (light bg) --- */
.services-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 48px;
}

.service-summary-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0;
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    display: block;
}

.service-summary-card:hover {
    border-color: var(--primary);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.service-summary-card .card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.service-summary-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.service-summary-card:hover .card-image img {
    transform: scale(1.05);
}

.service-summary-card .card-body {
    padding: 24px;
}

.service-summary-card .card-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.service-summary-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 10px;
}

.service-summary-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 16px;
}

.service-summary-card .card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

.service-summary-card:hover .card-link {
    gap: 10px;
    color: var(--accent);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    font-family: var(--font);
    letter-spacing: 0.3px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(49, 130, 206, 0.35);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--navy);
    border-color: var(--white);
    transform: translateY(-2px);
}

.btn-full {
    width: 100%;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.hero-video-wrapper {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.hero-video-wrapper iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110vw;
    height: 61.875vw; /* 16:9 scaled up */
    min-height: 110vh;
    min-width: 195.56vh; /* 16:9 scaled up */
    transform: translate(-50%, -50%);
    border: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(
        135deg,
        rgba(15, 23, 36, 0.88) 0%,
        rgba(26, 54, 93, 0.78) 50%,
        rgba(49, 130, 206, 0.55) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 120px;
    padding-bottom: 80px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(1, 149, 255, 0.15);
    border: 1px solid rgba(1, 149, 255, 0.3);
    border-radius: 50px;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 20px;
    max-width: 700px;
}

.hero-description {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.75);
    max-width: 560px;
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 48px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.hero-stat {
    display: flex;
    flex-direction: column;
}

.hero-stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
}

.hero-stat-suffix {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    margin-top: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 2;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.7); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* --- Sections --- */
.section {
    padding: 100px 0;
}

.section-light {
    background: var(--white);
}

.section-dark {
    background: var(--navy);
}

.section-dark .section-title,
.section-dark .section-subtitle,
.section-dark p {
    color: rgba(255,255,255,0.85);
}

.section-dark .section-label {
    color: var(--accent);
}

.section-accent {
    background: linear-gradient(135deg, var(--primary-darker), var(--primary-dark));
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 60px;
}

.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-label.light {
    color: rgba(255,255,255,0.7);
}

.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--navy);
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-title.light {
    color: var(--white);
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* --- Grid Layouts --- */
.section-grid {
    display: grid;
    gap: 60px;
    align-items: center;
}

.section-grid-2 {
    grid-template-columns: 1fr 1fr;
}

.section-grid-2.reverse {
    direction: ltr;
}

.section-content {
    direction: ltr;
}

.section-content p {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.8;
}

.section-image {
    position: relative;
    direction: ltr;
}

.section-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
}

.image-accent {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-lg);
    z-index: -1;
    opacity: 0.3;
}

/* --- Values Grid --- */
.values-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
}

.value-item {
    padding: 20px;
    background: var(--light-bg);
    border-radius: var(--radius);
    transition: var(--transition);
}

.value-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.value-icon {
    width: 40px;
    height: 40px;
    color: var(--primary);
    margin-bottom: 12px;
}

.value-icon svg {
    width: 100%;
    height: 100%;
}

.value-item h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.value-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.5;
}

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: var(--transition);
}

.service-card:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(1, 149, 255, 0.3);
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.service-icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: 20px;
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    transition: var(--transition);
}

.service-link:hover {
    gap: 12px;
    color: var(--white);
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.feature-card {
    padding: 40px 32px;
    background: var(--light-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--blue-bg);
    line-height: 1;
    margin-bottom: 16px;
    transition: var(--transition);
}

.feature-card:hover .feature-number {
    color: rgba(49, 130, 206, 0.15);
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* --- Clients Marquee --- */
.clients-marquee {
    overflow: hidden;
    margin-top: 20px;
}

.clients-track {
    display: flex;
    gap: 60px;
    animation: marquee 30s linear infinite;
    width: max-content;
}

.client-logo {
    flex-shrink: 0;
    width: 140px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: var(--transition);
}

.client-logo:hover {
    opacity: 1;
    transform: scale(1.05);
}

.client-logo img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Careers Section --- */
.career-highlights {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0 32px;
}

.career-highlight {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 500;
}

.career-highlight svg {
    color: var(--primary);
    flex-shrink: 0;
}

/* --- Page Hero (subpages) --- */
.page-hero {
    position: relative;
    padding: 180px 0 80px;
    overflow: hidden;
}

.page-hero-short {
    padding: 160px 0 60px;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.page-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero-content {
    position: relative;
    z-index: 3;
    max-width: 700px;
}

.page-hero-content h1 {
    font-size: clamp(2.2rem, 4vw, 3.2rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 16px;
}

.page-hero-content p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.7;
}

/* --- Projects Showcase (home) --- */
.projects-showcase {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.project-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--light-bg);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.project-image {
    height: 220px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-info {
    padding: 24px;
}

.project-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(49, 130, 206, 0.1);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.project-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
    line-height: 1.3;
}

.project-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

.section-cta {
    text-align: center;
    margin-top: 48px;
}

/* --- CTA Block --- */
.section-cta-block {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cta-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 36, 0.85);
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.cta-content h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* --- VMV (Vision Mission Values) Grid --- */
.vmv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.vmv-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    transition: var(--transition);
}

.vmv-card:hover {
    border-color: rgba(1, 149, 255, 0.3);
    background: rgba(255,255,255,0.08);
}

.vmv-icon {
    width: 48px;
    height: 48px;
    color: var(--accent);
    margin-bottom: 20px;
}

.vmv-icon svg {
    width: 100%;
    height: 100%;
}

.vmv-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.vmv-card p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.7;
}

.values-list {
    list-style: none;
    padding: 0;
}

.values-list li {
    padding: 8px 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.values-list li:last-child {
    border-bottom: none;
}

.values-list li strong {
    color: var(--accent);
}

/* --- ISO Banner --- */
.iso-banner {
    display: flex;
    align-items: center;
    gap: 60px;
}

.iso-content {
    flex: 1;
}

.iso-content h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
}

.iso-content p {
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
}

.iso-badges {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.iso-badge {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.3;
}

.iso-badge span {
    font-size: 0.65rem;
    font-weight: 400;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}

/* --- Directors Grid --- */
.directors-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.director-card {
    background: var(--light-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 32px;
    transition: var(--transition);
}

.director-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-4px);
}

.director-info h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}

.director-role {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

.director-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* --- Service Detail List --- */
.service-detail-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

.service-detail-list li {
    position: relative;
    padding: 8px 0 8px 24px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.section-dark .service-detail-list li {
    color: rgba(255,255,255,0.7);
}

.service-detail-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

/* --- Portfolio Grid --- */
.portfolio-filters {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 24px;
    border: 1px solid var(--border);
    border-radius: 50px;
    background: transparent;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font);
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

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

.portfolio-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--light-bg);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.portfolio-image {
    height: 200px;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 20px;
}

.portfolio-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
    line-height: 1.3;
}

.portfolio-client {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* --- Contact Page (light theme forms) --- */
.section-light .contact-item h4 {
    color: var(--navy);
}

.section-light .contact-item p {
    color: var(--text-light);
}

.section-light .contact-form-wrapper {
    background: var(--light-bg);
    border-color: var(--border);
}

.section-light .form-group input,
.section-light .form-group select,
.section-light .form-group textarea {
    background: var(--white);
    border-color: var(--border);
    color: var(--text);
}

.section-light .form-group input::placeholder,
.section-light .form-group textarea::placeholder {
    color: var(--text-muted);
}

.section-light .form-group select {
    color: var(--text-muted);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23718096' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.section-light .form-group select option {
    background: var(--white);
    color: var(--text);
}

.section-light .form-group input:focus,
.section-light .form-group select:focus,
.section-light .form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

/* --- Contact Section --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: rgba(1, 149, 255, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.contact-icon svg {
    width: 22px;
    height: 22px;
}

.contact-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}

.contact-form-wrapper {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: var(--radius-lg);
    padding: 40px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    font-size: 0.95rem;
    font-family: var(--font);
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius);
    color: var(--white);
    transition: var(--transition);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255,255,255,0.35);
}

.form-group select {
    appearance: none;
    color: rgba(255,255,255,0.35);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
}

.form-group select option {
    background: var(--navy);
    color: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    background: rgba(1, 149, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(1, 149, 255, 0.1);
}

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

/* --- Footer --- */
.footer {
    background: var(--dark);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-logo {
    height: 48px;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border-radius: var(--radius);
    color: rgba(255,255,255,0.5);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: var(--white);
}

.footer-links h4 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links a {
    display: block;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    padding: 6px 0;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.4);
}

.footer-bottom-links a:hover {
    color: var(--accent);
}

/* --- Animations --- */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate="fade-right"] {
    transform: translateX(-30px);
}

[data-animate="fade-left"] {
    transform: translateX(30px);
}

[data-animate].animated {
    opacity: 1;
    transform: translate(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .section-grid-2 {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

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

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .vmv-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

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

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

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

    .iso-banner {
        flex-direction: column;
        text-align: center;
    }

    .iso-badges {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--navy);
        flex-direction: column;
        justify-content: center;
        gap: 24px;
        padding: 40px;
        transition: var(--transition);
        box-shadow: var(--shadow-xl);
    }

    .nav.open {
        right: 0;
    }

    .nav-link {
        font-size: 1.1rem;
        color: rgba(255,255,255,0.7);
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    /* Mobile dropdown */
    .nav-item {
        width: 100%;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        min-width: 0;
        background: transparent;
        backdrop-filter: none;
        border: none;
        border-radius: 0;
        padding: 0;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-item.dropdown-open .dropdown-menu {
        max-height: 300px;
    }

    .nav-item:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
    }

    .nav-item.dropdown-open:hover .dropdown-menu {
        max-height: 300px;
    }

    .dropdown-menu a {
        padding: 8px 0 8px 16px;
        font-size: 0.95rem;
        color: rgba(255,255,255,0.5);
    }

    .dropdown-menu a:hover {
        background: transparent;
        color: var(--white);
    }

    .services-summary-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }

    .hero-stat {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .hero-stat-label {
        margin-top: 0;
    }

    .hero-scroll {
        display: none;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 60px 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .section-grid-2.reverse .section-image {
        order: -1;
    }

    .page-hero-content h1 {
        font-size: 2rem;
    }

    .directors-grid {
        grid-template-columns: 1fr;
    }

    .projects-showcase {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-filters {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .cta-content h2 {
        font-size: 1.8rem;
    }

    .iso-badges {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        padding: 12px 24px;
        width: 100%;
        text-align: center;
    }

    .contact-form-wrapper {
        padding: 24px;
    }
}
