/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-black: #000000;
    --primary-white: #ffffff;
    --text-gray: #333333;
    --light-gray: #f5f5f5;
    --border-gray: #e0e0e0;
    --serif-font: 'Playfair Display', serif;
    --sans-font: 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
    /* Prevent layout shift */
    font-size: 16px;
}

body {
    font-family: var(--sans-font);
    color: var(--text-gray);
    line-height: 1.6;
    overflow-x: hidden;
    /* Performance optimizations */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--primary-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.logo-img:hover {
    opacity: 0.8;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 400;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: var(--primary-black);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: var(--primary-black);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-white);
    text-align: center;
    margin-top: 70px;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero-logo {
    max-width: 500px;
    width: 100%;
    height: auto;
    margin: 0 auto 2rem;
    display: block;
}

.hero-tagline {
    font-family: var(--serif-font);
    font-size: 1.8rem;
    font-style: italic;
    color: var(--text-gray);
    margin-bottom: 2.5rem;
}

.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: var(--primary-black);
    color: var(--primary-white);
    text-decoration: none;
    font-family: var(--sans-font);
    font-weight: 500;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-black);
}

.cta-button:hover {
    background: transparent;
    color: var(--primary-black);
}

/* Section Styles */
.section {
    padding: 100px 0;
    background: var(--primary-white);
    /* Performance: content-visibility for off-screen sections */
    content-visibility: auto;
    contain-intrinsic-size: auto 500px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--serif-font);
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.title-line {
    width: 100px;
    height: 2px;
    background: var(--primary-black);
    margin: 0 auto;
}

/* About Section */
.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text h3 {
    font-family: var(--serif-font);
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary-black);
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-gray);
}

.about-text .highlight {
    font-style: italic;
    font-weight: 500;
    color: var(--primary-black);
}

/* Services Section */
.services-section {
    background: var(--light-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.service-item {
    background: var(--primary-white);
    padding: 40px 30px;
    border: 1px solid var(--border-gray);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.service-number {
    font-family: var(--serif-font);
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-black);
    margin-bottom: 15px;
}

.service-item h3 {
    font-family: var(--serif-font);
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-black);
}

.service-item ul {
    list-style: none;
}

.service-item ul li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-gray);
    line-height: 1.6;
}

.service-item ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-black);
    font-weight: bold;
}

.services-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.service-img-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-img-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-img-wrapper img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    /* Prevent layout shift */
    aspect-ratio: 16/9;
    /* Performance optimization */
    will-change: transform;
}

.services-images-section {
    background: var(--primary-white);
    padding: 60px 0;
}

/* Team Section */
.team-image {
    margin-bottom: 60px;
}

.team-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
}

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

.team-member {
    background: var(--light-gray);
    padding: 30px;
    border-radius: 4px;
}

.member-info h3 {
    font-family: var(--serif-font);
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--primary-black);
}

.credentials {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-gray);
}

.member-title {
    font-weight: 600;
    color: var(--primary-black);
    margin-bottom: 15px;
    font-size: 1rem;
    letter-spacing: 1px;
}

.member-info p:last-child {
    color: var(--text-gray);
    line-height: 1.7;
}

/* Timeline, Standards Sections */
.timeline-section,
.standards-section {
    background: var(--light-gray);
}

.timeline-image {
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Standards & Guarantees Content */
.standards-content {
    max-width: 1000px;
    margin: 0 auto;
}

.standards-intro {
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.standards-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
}

.standards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.standard-item {
    background: var(--primary-white);
    padding: 35px;
    border: 1px solid var(--border-gray);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.standard-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.standard-item h3 {
    font-family: var(--serif-font);
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary-black);
    font-weight: 700;
}

.standard-item p {
    color: var(--text-gray);
    line-height: 1.7;
    margin-bottom: 15px;
}

.standard-item ul {
    list-style: none;
    margin: 15px 0;
    padding-left: 0;
}

.standard-item ul li {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-gray);
    line-height: 1.6;
}

.standard-item ul li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary-black);
    font-weight: bold;
    font-size: 1.2rem;
}

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

.contact-image {
    order: 1;
}

.contact-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
}

.contact-info {
    order: 2;
}

.contact-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: var(--text-gray);
}

.contact-icons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    border: 2px solid var(--primary-black);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-black);
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-icon:hover {
    background: var(--primary-black);
    color: var(--primary-white);
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-detail {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: var(--text-gray);
    transition: color 0.3s ease;
}

.contact-detail:hover {
    color: var(--primary-black);
}

.contact-label {
    font-weight: 600;
    min-width: 100px;
}

.contact-value {
    color: var(--primary-black);
}

/* Portfolio Section */
.portfolio-section {
    background: var(--light-gray);
    padding-top: 120px;
}

.portfolio-intro {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-gray);
    max-width: 700px;
    margin: 30px auto 0;
    text-align: center;
}

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

.portfolio-item {
    position: relative;
    overflow: hidden;
    background: var(--primary-white);
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.portfolio-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    /* Prevent layout shift */
    aspect-ratio: 4/3;
    /* Performance optimization */
    will-change: transform;
}

.portfolio-image img.loaded {
    opacity: 1;
}

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

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--primary-white);
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-overlay h3 {
    font-family: var(--serif-font);
    font-size: 1.4rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.portfolio-overlay p {
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.9;
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow: auto;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-caption {
    color: var(--primary-white);
    text-align: center;
    padding: 20px 0;
    max-width: 800px;
}

.lightbox-caption h3 {
    font-family: var(--serif-font);
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.lightbox-caption p {
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 10px;
}

.lightbox-counter {
    font-size: 0.9rem;
    opacity: 0.7;
    display: block;
    margin-top: 10px;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 45px;
    color: var(--primary-white);
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.3s ease;
    z-index: 2001;
}

.lightbox-close:hover {
    opacity: 0.7;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-white);
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 2001;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev:active,
.lightbox-next:active {
    transform: translateY(-50%) scale(0.95);
}

/* Footer */
.footer {
    background: var(--primary-black);
    color: var(--primary-white);
    padding: 60px 0 30px;
}

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

.footer-logo-img {
    height: 60px;
    width: auto;
    margin-bottom: 15px;
    filter: brightness(0) invert(1);
}

.footer-logo p {
    font-family: var(--serif-font);
    font-style: italic;
    font-size: 1rem;
    opacity: 0.9;
}

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

.footer-contact a {
    color: var(--primary-white);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-contact a:hover {
    opacity: 0.7;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--primary-white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

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

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

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-logo {
        max-width: 350px;
    }

    .hero-tagline {
        font-size: 1.4rem;
    }

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

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

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

    .contact-image {
        order: 2;
    }

    .contact-info {
        order: 1;
    }

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

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

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

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-logo {
        max-width: 280px;
    }

    .hero-tagline {
        font-size: 1.2rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

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

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

    .service-number {
        font-size: 2.5rem;
    }

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

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 35px;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 35px;
        width: 50px;
        height: 50px;
        padding: 15px;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .lightbox-caption h3 {
        font-size: 1.4rem;
    }

    .lightbox-caption p {
        font-size: 1rem;
    }
}

