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

:root {
    --chevron-blue: #1a4480;
    --chevron-blue-dark: #0f2d5a;
    --chevron-blue-light: #2d5aa0;
    --text-light: #ffffff;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --text-gray-light: #999999;
    --section-bg: #ffffff;
    --card-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --accent-color: #0066cc;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background-color: var(--section-bg);
}

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

/* Navigation - Chevron Style */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--text-light);
    z-index: 1000;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--chevron-blue);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 400;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-menu a:hover {
    color: var(--chevron-blue);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--chevron-blue);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 68, 128, 0.4) 0%, rgba(15, 45, 90, 0.5) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
    max-width: 900px;
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: -1px;
    line-height: 1.2;
}

.hero-message {
    font-size: 1.25rem;
    line-height: 1.8;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
    font-weight: 300;
    max-width: 700px;
    margin: 0 auto;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

/* Scroll Text Section */
.scroll-text-wrapper {
    position: relative;
    height: 500vh; /* Increased height to allow more scroll time per line */
}

.scroll-text-section {
    background: var(--chevron-blue-dark);
    min-height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    overflow: hidden;
    z-index: 10;
}

.scroll-text-container {
    max-width: 1200px;
    width: 100%;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.scroll-text-line {
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.8s ease, transform 0.8s ease;
    will-change: transform, opacity;
}

.scroll-text-line.visible {
    opacity: 1;
    transform: translateX(0);
}

.scroll-text-line h1 {
    font-size: 3.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin: 0;
    letter-spacing: -1px;
    line-height: 1.2;
}

.scroll-text-line h2 {
    font-size: 2.5rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.3;
}



/* Page Header Styles */
.page-header {
    text-align: center;
    margin-bottom: 4rem;
    padding-top: 2rem;
}

.page-title {
    font-size: 3rem;
    font-weight: 600;
    color: var(--chevron-blue);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.page-subtitle {
    font-size: 1.25rem;
    color: var(--text-gray);
    font-weight: 300;
}

/* Section Styles */
section {
    padding: 6rem 0;
    min-height: calc(100vh - 200px);
}

.about-page,
.offices-page,
.certifications-page {
    padding-top: 8rem;
}

.contact-page {
    position: relative;
    padding-top: 8rem;
    padding-bottom: 6rem;
    min-height: 100vh;
    overflow: hidden;
}

/* Contact Page Background with Blur */
.contact-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background-image: url('assets/globalAGPIC.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(8px);
    transform: scale(1.1); /* Slight scale to prevent blur edges */
}

/* Ensure content appears above background */
.contact-page .container {
    position: relative;
    z-index: 1;
}

.contact-page .page-header,
.contact-page .contact-content {
    position: relative;
    z-index: 1;
}

/* Add overlay for better text readability */
.contact-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    z-index: 0;
}

/* About Section */
.about {
    background: var(--section-bg);
    padding: 6rem 0;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.about-card {
    background: var(--section-bg);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.about-subtitle {
    font-size: 1.5rem;
    color: var(--chevron-blue);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-list li {
    padding: 0.75rem 0;
    padding-left: 1.5rem;
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.7;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

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

.about-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--chevron-blue);
    font-weight: 600;
    font-size: 1.1rem;
}

.about-text-short {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 1.2rem;
    color: var(--text-gray);
    text-align: left;
}

.about-text-short:last-child {
    margin-bottom: 0;
}

/* Our Offices Section */
.offices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.office-card {
    background: var(--section-bg);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.office-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.office-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--chevron-blue) 0%, var(--chevron-blue-dark) 100%);
    position: relative;
}

.office-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.office-image::after {
    content: '📷';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    opacity: 0.3;
}

.office-image img[src]::after {
    display: none;
}

.office-info {
    padding: 2rem;
}

.supervisor-name {
    font-size: 1.4rem;
    color: var(--chevron-blue);
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.supervisor-location {
    color: var(--chevron-blue-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.office-address,
.office-address-cont {
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0.3rem;
}

.office-number {
    color: var(--chevron-blue);
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Certifications Section */
.certifications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.cert-card {
    background: var(--section-bg);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.cert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.cert-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cert-card h3 {
    font-size: 1.3rem;
    color: var(--chevron-blue);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.cert-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Services Section */
.services-page {
    padding-top: 8rem;
    padding-bottom: 0;
}

.services-scroll-wrapper {
    position: relative;
    height: 300vh; /* Extra height to allow scrolling while section is sticky */
}

.service-sticky-section {
    background: var(--chevron-blue-dark);
    min-height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 4rem 0;
    overflow: hidden;
    z-index: 10;
    width: 100vw;
}

.services-scroll-container {
    display: flex;
    gap: 0;
    width: max-content;
    padding: 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.service-item {
    width: 100vw;
    min-width: 100vw;
    max-width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
    flex-shrink: 0;
}

.service-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 900px;
    gap: 3rem;
}

.service-text {
    opacity: 1;
    text-align: center;
    width: 100%;
}

.service-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
    opacity: 1;
}

.service-description {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.service-learn-more {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--text-light);
    color: var(--chevron-blue);
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    opacity: 1;
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.service-learn-more:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.service-learn-more:active {
    transform: translateY(0);
}

.service-line {
    font-size: 1.1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    opacity: 1;
    transform: translateX(0);
}

/* Service Image Carousel */
.service-image-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    height: 400px;
}

.service-images-container {
    display: flex;
    width: 400%;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.service-image-slide {
    width: 25%;
    flex-shrink: 0;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    position: relative;
}

.service-image-slide.active {
    opacity: 1;
}

.service-image-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
}

.service-image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.service-image-placeholder:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

/* Service Image Navigation Arrows */
.service-image-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.service-image-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.service-image-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.service-image-arrow svg {
    width: 20px;
    height: 20px;
    stroke: var(--text-light);
}

.service-image-arrow-left {
    left: 1rem;
}

.service-image-arrow-right {
    right: 1rem;
}

.service-image-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.service-image-arrow:disabled:hover {
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Service Navigation Arrows */
.service-arrow {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--text-light);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.service-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.service-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.service-arrow svg {
    width: 24px;
    height: 24px;
    stroke: var(--text-light);
}

.service-arrow-left {
    left: 2rem;
}

.service-arrow-right {
    right: 2rem;
}

.service-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.service-arrow:disabled:hover {
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.info-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.info-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.info-item h3 {
    color: var(--chevron-blue);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.info-item p {
    color: var(--text-gray);
    line-height: 1.7;
    font-size: 1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: rgba(255, 255, 255, 1);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--chevron-blue);
    box-shadow: 0 0 0 3px rgba(26, 68, 128, 0.1);
}

.submit-btn {
    padding: 1rem 2rem;
    background: var(--chevron-blue);
    color: var(--text-light);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    align-self: flex-start;
}

.submit-btn:hover {
    background: var(--chevron-blue-dark);
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Footer */
.footer {
    background: var(--chevron-blue-dark);
    color: var(--text-light);
    text-align: center;
    padding: 2.5rem 0;
    margin-top: 4rem;
}

.footer p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1.5rem;
        font-size: 0.9rem;
    }

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

    .hero-message {
        font-size: 1.1rem;
    }

    .scroll-text-line h1 {
        font-size: 2.5rem;
    }

    .scroll-text-line h2 {
        font-size: 2rem;
    }

    .scroll-text-container {
        gap: 3rem;
        padding: 0 1.5rem;
    }

    .page-title {
        font-size: 2.25rem;
    }

    .page-subtitle {
        font-size: 1.1rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

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

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

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

    .services-scroll-wrapper {
        height: 250vh; /* Reduce height on mobile */
    }

    .service-item {
        min-width: 100vw;
        max-width: 100vw;
        padding: 0 1rem;
    }

    .service-content {
        gap: 2rem;
        max-width: 100%;
    }

    .service-title {
        font-size: 2rem;
    }

    .service-image-placeholder {
        height: 300px;
        font-size: 5rem;
    }

    .service-image img {
        height: 300px;
    }

    .service-arrow {
        width: 50px;
        height: 50px;
    }

    .service-arrow-left {
        left: 1rem;
    }

    .service-arrow-right {
        right: 1rem;
    }

    section {
        padding: 4rem 0;
    }

    .about-page,
    .offices-page,
    .certifications-page,
    .contact-page,
    .services-page {
        padding-top: 6rem;
    }
}

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

    .hero-message {
        font-size: 1rem;
    }

    .scroll-text-line h1 {
        font-size: 2rem;
    }

    .scroll-text-line h2 {
        font-size: 1.5rem;
    }

    .scroll-text-container {
        gap: 2.5rem;
        padding: 0 1rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .nav-menu {
        gap: 1rem;
        font-size: 0.85rem;
    }

    .navbar .container {
        padding: 0.75rem 15px;
    }

    .logo {
        font-size: 1.25rem;
    }
}
