:root {
    /* Brand Colors */
    --primary: #0A192F;
    /* Deep Blue */
    --primary-light: #182C47;
    --secondary: #FF4500;
    /* Emergency Orange representing action/reliability */
    --accent: #BDC3C7;
    /* Silver/Gray for engineering feel */
    --bg-light: #F4F6F8;
    --white: #ffffff;
    --text-main: #333333;
    --text-light: #666666;

    --border-radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 12px 24px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Performance: Reduce animations for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    /* Design Manual: Montserrat for body text */
    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-main);
    background-color: var(--white);
    overflow-x: hidden;
    /* Performance: Enable GPU compositing */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeSpeed;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    /* Design Manual: Tourney for headlines */
    font-family: 'Tourney', cursive;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 60px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

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

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-whatsapp {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    /* Modern pill shape */

    font-family: 'Tourney', cursive;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4);
    background-color: #E03E00;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
    margin-left: 10px;
}

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

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: auto;
}

.btn-whatsapp.large {
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    font-size: 1.2rem;
    padding: 18px;
}

.btn-whatsapp:hover {
    background-color: #1ebd56;
    transform: translateY(-2px);
}

/* Nav */
.navbar {
    background: var(--white);
    padding: 5px 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo Update */
.logo {
    /* font-family: 'Tourney', cursive; */
    /* text-transform: uppercase; */
    /* Tourney is largely uppercase anyway */
    font-family: inherit;
    /* Inherit form h1-h6 setting if applied globally, or explicitly set below */
    font-family: 'Tourney', cursive;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 0.9;
    display: inline-block;
    text-align: left;
}



.logo-image {
    height: 70px;
    width: auto;
    transition: var(--transition);
}

.logo-image:hover {
    transform: scale(1.05);
}

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

.nav-links a {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: var(--secondary);
}

.nav-links .btn-primary.small {
    padding: 10px 24px;
    font-size: 0.85rem;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
}

/* Hero */
.hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(8, 20, 38, 0.4) 0%, rgba(8, 20, 38, 0.85) 100%);
    z-index: 1;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
}

.hero-content.centered {
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
}



.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
    color: white !important;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3rem;
    margin: 0 auto 40px;
    color: #e0e6ed;
    max-width: 650px;
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}


/* Services Tabs System */
.services {
    padding: 100px 0;
    background: white;
}

.tabs-container {
    margin-top: 40px;
}

.tabs-header {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 50px;
    background-color: var(--primary);
    padding: 20px;
    border-radius: 30px;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 10px 30px rgba(10, 25, 47, 0.2);
}

.tab-btn {
    padding: 15px 30px;
    background: #f4f6f8;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid transparent;
}

.tab-btn i {
    font-size: 1.1rem;
}

.tab-btn:hover {
    background: #eef2f5;
    color: var(--primary);
}

.tab-btn.active {
    background: var(--white);
    color: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 10px 25px rgba(255, 69, 0, 0.15);
}

.tabs-content-wrapper {
    position: relative;
    min-height: 400px;
}

.tab-pane {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    animation: fadeInTab 0.5s ease;
}

.tab-pane.active {
    display: grid;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-image {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.tab-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tab-info h3 {
    font-size: 2.6rem;
    margin-bottom: 25px;
    color: var(--primary);
}

.tab-list {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.tab-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    color: #555;
    font-weight: 500;
}

.tab-list li i {
    color: var(--secondary);
}


/* Brand Slider - Fixed */
.brand-slider-section {
    padding: 40px 0;
    background: #fafbfc;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
}

.brand-slider-wrapper {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: hidden;
}

.slider-title {
    flex-shrink: 0;
    width: 220px;
    margin: 0;
    margin-right: 40px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.slider-container {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* Mask image replaces pseudo elements for better browser support in this context */
.slider-track {
    display: flex;
    width: max-content;
    animation: scroll 40s linear infinite;
    gap: 80px;
}

.brand-item {
    font-size: 1.4rem;
    font-weight: 800;
    color: #cbd5e0;
    white-space: nowrap;
}


/* About - High Contrast */
.about {
    padding: 120px 0;
    background-color: var(--primary);
    color: white;
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.03) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.lead-text {
    font-size: 1.5rem;
    line-height: 1.6;
    color: white;
    max-width: 900px;
    margin: 0 auto 60px;
    font-weight: 400;
}

.about .section-title {
    color: white;
    margin-bottom: 50px;
}

.features-row {
    gap: 80px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 200px;
}

.feature-item i {
    color: var(--secondary);
    margin-bottom: 20px;
    font-size: 3.5rem;
}

.feature-item span {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Gallery Carousel */
.gallery-section {
    padding: 100px 0;
    background: var(--white);
    color: var(--primary);
}

.gallery-section .section-title {
    color: var(--primary);
}

.carousel-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.carousel-track-container {
    overflow: hidden;
    border-radius: 12px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    height: 500px;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    color: var(--primary);
    font-size: 1.5rem;
    padding: 15px;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

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

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    opacity: 0.8;
    transition: 0.3s;
}

.lightbox-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Contact */
.contact {
    padding: 100px 0;
    background: var(--bg-light);
}

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

.contact-card {
    background: var(--white);
    /* max-width removed to allow grid expansion */
    width: 100%;
    margin: 0;
    padding: 50px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.map-card {
    padding: 0;
    overflow: hidden;
    height: 100%;
    min-height: 500px;
}

.contact-info-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.c-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 500;
}

.c-item i {
    color: var(--secondary);
}

.contact-link {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.contact-link:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.contact-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
}

.registry-text {
    font-size: 0.8rem;
    color: #bdc3c7;
    margin-top: 5px;
    font-weight: 400;
}

.contact-details-footer {
    margin-top: 30px;
    font-size: 0.9rem;
    color: #999;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

@media (max-width: 900px) {
    .contact-grid-wrapper {
        grid-template-columns: 1fr;
    }

    .map-card {
        min-height: 300px;
    }
}

/* Footer */
footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.4);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Animation Keyframes */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-200px * 6));
    }
}

/* Mobile */
/* Tablet Optimizations */
@media (max-width: 1024px) {
    .tab-pane {
        gap: 30px;
    }

    .carousel-container {
        max-width: 100%;
    }

    .contact-grid-wrapper {
        gap: 30px;
    }

    /* Performance: Add content-visibility for offscreen sections */
    .gallery-section,
    .contact {
        content-visibility: auto;
        contain-intrinsic-size: 0 500px;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {

    /* Performance: Simpler shadows and effects on mobile */
    .contact-card,
    .carousel-container {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    /* Performance: Disable backdrop-filter on mobile (expensive) */
    .hero-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

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

    .tab-image {
        height: 250px;
    }

    .tab-info {
        text-align: center;
    }

    .tab-list {
        grid-template-columns: 1fr;
        text-align: left;
        /* Keep list items readable */
        max-width: 300px;
        margin: 30px auto;
    }

    .slider-title {
        margin-bottom: 20px;
        width: 100%;
        text-align: center;
        margin-right: 0;
    }

    .brand-slider-wrapper {
        flex-direction: column;
    }

    .hero {
        min-height: 500px;
        height: auto;
        padding: 100px 0 60px;
    }

    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

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

    .hero-content {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .btn-secondary {
        margin-left: 0;
        width: 100%;
        max-width: 280px;
    }

    .btn-primary {
        width: 100%;
        max-width: 280px;
        padding: 14px 24px;
    }

    .nav-links {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .carousel-slide {
        height: 280px;
    }

    /* Performance: Pause animations on mobile */
    .slider-track {
        animation: scroll 20s linear infinite;
    }

    .features-row {
        gap: 30px;
    }

    .feature-item i {
        font-size: 2.5rem;
    }

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

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        padding: 30px;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        gap: 20px;
        text-align: center;
    }

    .contact-card {
        padding: 25px 20px;
    }

    .c-item {
        flex-direction: column;
        gap: 5px;
        margin-bottom: 15px;
    }

    .contact-info-grid {
        gap: 20px;
    }

    .contact-link {
        font-size: 1.15rem;
        display: block;
        padding: 5px 0;
    }

    .tabs-header {
        padding: 15px;
        gap: 10px;
    }

    .tab-btn {
        padding: 12px 18px;
        font-size: 0.85rem;
    }

    .services,
    .about,
    .gallery-section,
    .contact {
        padding: 60px 0;
    }

    .map-card {
        min-height: 280px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

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

    .tab-image {
        height: 200px;
    }

    .carousel-slide {
        height: 220px;
    }

    .btn-primary,
    .btn-secondary {
        font-size: 0.9rem;
        padding: 12px 20px;
    }
}