﻿/* Color Palette */
:root {
    --page-bg: #FCFBF9;
    --white: #FFFFFF;
    --text-light: #FFFFFF;
    --text-primary: #000000;
    --text-secondary: #3A556A;
    /* --primary-accent: #02155a; */
    --primary-accent: #042d62;
    --font-brand: 'Montserrat', 'Gotham', 'Helvetica Neue', Arial, sans-serif;
    --font-ui: 'Montserrat', 'Gotham', 'Helvetica Neue', Arial, sans-serif;
    --transition: 0.3s ease;
}

/* Page layout */
body {
    background-color: var(--page-bg);
    color: var(--text-primary);
    font-family: var(--font-ui);
    font-weight: 500;
    text-align: center;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    padding: 110px 0 80px;
    flex: 1;
    background: var(--page-bg);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Defer rendering of below-the-fold sections to reduce initial LCP pressure. */
.deferred-section {
    content-visibility: auto;
    contain-intrinsic-size: 1px 900px;
}

/* Hero Section */
.hero {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--page-bg) 0%, rgba(95, 168, 211, 0.05) 100%);
}

.hero h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero .secondary-text {
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(95, 168, 211, 0.3);
}

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

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

.btn-secondary {
    background-color: var(--primary-accent);
    color: var(--text-light);
}

.btn-secondary:hover {
    background-color: var(--primary-accent);
    color: var(--white);
}

/* Section Headers */
section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.section-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Services Section */
.services {
    padding: 4rem 0;
    background: var(--white);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: flex-start;
    margin-top: 3rem;
}

.services-list,
.services-certifications {
    background: var(--page-bg);
    padding: 2.2rem;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.services-list h3,
.services-certifications h3 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.services-list ul,
.services-certifications ul {
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--text-secondary);
    line-height: 1.8;
}

.services-list ul li,
.services-certifications ul li {
    margin-bottom: 0.6rem;
    padding-left: 0;
}

.services-certifications p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.small-text {
    font-size: 0.9rem;
    opacity: 0.8;
}


/* Projects Section */
.projects {
    padding: 4rem 0;
    background: var(--page-bg);
}

.projects-carousel {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-top: 3rem;
    position: relative;
}

.carousel-container {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e8edf0;
}

#carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.2s ease;
    display: block;
}

#carousel-img.is-fading {
    opacity: 0.45;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

.carousel-caption {
    padding: 1.5rem;
    text-align: center;
}

#carousel-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

#carousel-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.projects-cta {
    margin-top: 3rem;
    text-align: center;
}

.projects-cta .btn {
    background-color: var(--primary-accent);
    color: var(--white);
    border: none;
}

.projects-cta .btn:hover {
    background-color: var(--primary-accent);
    color: var(--white);
}

/* About Preview Section */
.about-preview {
    padding: 4rem 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    text-align: left;
    margin-bottom: 1rem;
}

.about-text p {
    text-align: left;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.about-features {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.about-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-primary);
}

.about-features li::before {
    content: "✓";
    color: var(--primary-accent);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.about-image {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    background: var(--page-bg);
    color: var(--text-primary);
    text-align: center;
}

.cta-section h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--text-primary);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-section .btn-primary {
    background-color: var(--primary-accent);
    color: var(--text-light);
    border: none;
    box-shadow: 0 8px 25px rgba(95, 168, 211, 0.3);
}

.cta-section .btn-primary:hover {
    background-color: var(--primary-accent);
}

.cta-section .btn-secondary {
    background-color: var(--primary-accent);
    border-color: var(--white);
    border: none;
    box-shadow: 0 8px 25px rgba(95, 168, 211, 0.3);
}

.cta-section .btn-secondary:hover {
    background-color: var(--primary-accent);
    color: var(--text-light);
}

/* Main homepage text */
main h1,
main h2,
main h3 {
    font-family: var(--font-brand);
    font-weight: 800;
}

main p {
    font-family: var(--font-ui);
    font-weight: 500;
}

/* Header / Navigation */
header,
nav {
    background-color: var(--primary-accent);
    color: var(--white);
}

/* Body text */
p {
    color: var(--text-primary);
}

/* Secondary text */
.secondary-text,
small {
    color: var(--text-secondary);
    font-family: var(--font-ui);
    font-weight: 500;
}

/* Footer */
footer {
    background-color: var(--primary-accent);
    color: var(--white);
}

/* 404 Page */
.page-404 main {
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-hero {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}

.error-card {
    background: var(--white);
    border: 1px solid rgba(16, 47, 67, 0.1);
    border-radius: 22px;
    box-shadow: 0 18px 48px rgba(16, 47, 67, 0.12);
    padding: 3rem 2.4rem;
    text-align: center;
    margin: 0 auto;
}

.error-code {
    margin: 0;
    font-size: clamp(3rem, 7vw, 5.5rem);
    line-height: 1;
    font-weight: 800;
    color: var(--primary-accent);
}

.error-card h2 {
    margin: 0.7rem 0 1rem;
    font-size: clamp(1.6rem, 4vw, 2.3rem);
    color: var(--text-primary);
}

.error-message {
    margin: 0 auto;
    max-width: 60ch;
    color: var(--text-secondary);
    font-size: 1.03rem;
    line-height: 1.6;
}

.error-actions {
    margin-top: 1.8rem;
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}


.error-help {
    margin: 1.3rem 0 0;
    color: var(--text-secondary);
}

.error-help a {
    color: var(--text-primary);
    font-weight: 700;
    text-decoration-thickness: 2px;
    text-underline-offset: 2px;
}

@media (max-width: 768px) {
    .error-card {
        padding: 2.2rem 1.3rem;
        border-radius: 18px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Homepage responsive styles */
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero h2 {
        font-size: 2.5rem;
    }

    .services,
    .projects,
    .about-preview,
    .cta-section {
        padding: 3rem 0;
    }

    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .services-list,
    .services-certifications {
        padding: 1.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-text h2 {
        text-align: center;
    }

    .about-text p {
        text-align: center;
    }

    .about-features {
        text-align: left;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}