:root {
    --color-primary: #1f3a5f;
    --color-accent: #f2a900;
    --color-bg: #ffffff;
    --color-bg-alt: #f4f6f8;
    --color-text: #1c1c1c;
    --color-muted: #5b6470;
    --color-whatsapp: #25d366;
    
    --header-height: 70px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Base & Typography */
html {
    scroll-behavior: smooth;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    /* Add padding at the bottom on mobile so the floating bar doesn't hide content */
    padding-block-end: calc(70px + var(--safe-bottom)); 
}

h1, h2, h3, p {
    margin-block-start: 0;
}

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

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

.container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.section {
    padding-block: clamp(3rem, 8vw, 6rem);
    scroll-margin-top: var(--header-height);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    text-align: center;
    margin-block-end: 3rem;
    color: var(--color-primary);
}

.bg-alt {
    background-color: var(--color-bg-alt);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, opacity 0.2s;
    text-align: center;
}

.btn:hover, .btn:focus-visible {
    transform: translateY(-2px);
    opacity: 0.9;
}

.btn-primary { background-color: var(--color-primary); color: #fff; }
.btn-accent { background-color: var(--color-accent); color: #1c1c1c; }
.btn-whatsapp { background-color: var(--color-whatsapp); color: #fff; }

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Header */
#main-header {
    position: sticky;
    top: 0;
    background-color: var(--color-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 100;
    transition: box-shadow 0.3s;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--header-height);
}

.logo img {
    max-height: 40px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-primary);
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-primary);
    padding: 0.5rem;
}

/* Mobile Nav Default (Hidden) */
#main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    inset-inline-start: 0;
    inset-inline-end: 0;
    background-color: var(--color-bg);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 1.5rem;
}

#main-nav.is-open {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-weight: 600;
}

/* Hero */
.hero {
    position: relative;
    min-height: 70svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--color-primary); /* Fallback */
    background-size: cover;
    background-position: center;
    color: #fff;
    padding-block: 4rem;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(31, 58, 95, 0.7); /* Primary color with transparency */
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-block-end: 1rem;
}

.tagline {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    margin-block-end: 0.5rem;
    font-weight: 300;
}

.hero-meta {
    font-size: 1rem;
    margin-block-end: 2rem;
    color: var(--color-accent);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-card {
    background: var(--color-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    text-align: center;
}

.service-icon svg {
    width: 48px;
    height: 48px;
    color: var(--color-accent);
    margin-block-end: 1rem;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    cursor: zoom-in;
    position: relative;
}

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

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

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--color-muted);
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card {
    background: var(--color-bg);
    padding: 2rem 1rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-block-start: 4px solid var(--color-accent);
}

.stat-card h3 {
    font-size: 2rem;
    color: var(--color-primary);
    margin-block-end: 0.5rem;
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.contact-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.contact-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--color-bg-alt);
    border-radius: 12px;
    gap: 1.5rem;
    transition: background-color 0.2s;
}

a.contact-card:hover {
    background: #e2e8f0;
}

.card-icon svg {
    width: 32px;
    height: 32px;
    color: var(--color-primary);
}

.contact-card h3 {
    font-size: 1.1rem;
    margin-block-end: 0.2rem;
}

.contact-card p {
    color: var(--color-muted);
    margin: 0;
}

/* Footer */
footer {
    background: var(--color-primary);
    color: #fff;
    padding-block: 3rem;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.social-links {
    display: flex;
    gap: 1rem;
}

/* Floating Action Bar (Mobile) */
.mobile-fab {
    position: fixed;
    bottom: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    display: flex;
    background: var(--color-bg);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 99;
    padding-block-end: var(--safe-bottom);
}

.fab-btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.2rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
}

.fab-call { background-color: var(--color-primary); }
.fab-wa { background-color: var(--color-whatsapp); }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.lightbox[aria-hidden="false"] {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 80vh;
}

#lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    inset-inline-end: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
}

.lightbox-prev, .lightbox-next {
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    padding: 1rem;
    cursor: pointer;
}

.lightbox-caption {
    color: #fff;
    margin-block-start: 1rem;
    font-size: 1.1rem;
    text-align: center;
    padding-inline: 1rem;
}

/* Media Queries (Mobile First Upwards) */

@media (min-width: 640px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-actions { flex-direction: row; }
}

@media (min-width: 768px) {
    body { padding-block-end: 0; } /* Remove bottom padding on desktop */
    .mobile-fab { display: none; } /* Hide floating bar on desktop */
    
    .menu-toggle { display: none; }
    
    #main-nav {
        display: flex;
        position: static;
        background: transparent;
        box-shadow: none;
        padding: 0;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
    }
    
    .nav-links {
        flex-direction: row;
    }
    
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
    .contact-info { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .hero { min-height: 85svh; }
    .services-grid { grid-template-columns: repeat(3, 1fr); }
    .gallery-grid { grid-template-columns: repeat(4, 1fr); }
    .about-grid { grid-template-columns: 1fr 1fr; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* Hero Logo */
.hero-logo {
    max-height: 140px; /* Adjust this number to make it bigger or smaller */
    margin-inline: auto;
    margin-block-end: 1rem;
    display: block;
}

/* Gallery Photo Headlines */
.gallery-item-caption {
    position: absolute;
    bottom: 0;
    inset-inline-start: 0;
    inset-inline-end: 0;
    background: rgba(31, 58, 95, 0.85); /* Semi-transparent dark blue */
    color: #ffffff;
    padding: 0.6rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
}