/* General Reset */

/* ===== CSS Custom Properties for Theming ===== */

/* Light theme (default) */
:root {
    /* Background colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f4f4f4;
    --bg-header: #2c3e50;
    --bg-footer: #2c3e50;
    --bg-card: #ffffff;
    --bg-form: #ffffff;
    --bg-model-viewer: #f9f9f9;

    /* Text colors */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --text-header: #ffffff;
    --text-footer: #ffffff;
    --text-on-accent: #ffffff;

    /* Accent colors */
    --accent-primary: #e67e22;
    --accent-hover: #d35400;
    --accent-border: #e67e22;

    /* Border colors */
    --border-primary: #dddddd;
    --border-focus: #e67e22;

    /* Shadows */
    --shadow-card: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-card-hover: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-form: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-model: 0 4px 10px rgba(0, 0, 0, 0.1);

    /* Hero overlay */
    --hero-overlay: rgba(0, 0, 0, 0.5);
    /* Localized hero text halo (darkening behind the hero text) */
    --hero-halo: rgba(0, 0, 0, 0.72);
}

/* Dark theme */
[data-theme="dark"] {
    /* Background colors */
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-header: #0f3460;
    --bg-footer: #0f3460;
    --bg-card: #1f2937;
    --bg-form: #1f2937;
    --bg-model-viewer: #1f2937;

    /* Text colors */
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;
    --text-header: #ffffff;
    --text-footer: #ffffff;
    --text-on-accent: #ffffff;

    /* Accent colors */
    --accent-primary: #e67e22;
    --accent-hover: #f39c12;
    --accent-border: #e67e22;

    /* Border colors */
    --border-primary: #374151;
    --border-focus: #e67e22;

    /* Shadows */
    --shadow-card: 0 2px 5px rgba(0, 0, 0, 0.3);
    --shadow-card-hover: 0 5px 15px rgba(0, 0, 0, 0.4);
    --shadow-form: 0 4px 15px rgba(0, 0, 0, 0.3);
    --shadow-model: 0 4px 10px rgba(0, 0, 0, 0.3);

    /* Hero overlay - lighter for dark mode */
    --hero-overlay: rgba(0, 0, 0, 0.3);
    /* Localized hero text halo - slightly stronger for dark mode */
    --hero-halo: rgba(0, 0, 0, 0.78);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}

/* Header */
header {
    background: var(--bg-header);
    color: var(--text-header);
    min-height: 60px;
    border-bottom: var(--accent-primary) 3px solid;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}


header img {
    height: auto;
    max-height: 50px;
    width: auto;
    object-fit: contain;
    display: block;
}

header .logo {
    font-size: 24px;
    color: var(--text-header);
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
}

header nav {
    height: 100%;
    display: flex;
    align-items: center;
}

header nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
}

header nav ul li {
    display: flex;
    align-items: center;
    height: 100%;
}

header nav ul li a {
    display: flex;
    align-items: center;
    padding: 14px 15px;
    margin-left: 10px;
    box-sizing: border-box;
}

header nav a {
    color: var(--text-header);
    text-decoration: none;
    font-size: 16px;
}
header nav ul li a:hover {
    color: var(--text-header);
    background-color: var(--accent-primary);
    text-decoration: none;
    font-size: 16px;
}

/* Hero Section */
#home {
    background-image: url('Images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero {
    background-color: var(--bg-secondary);
    height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

/* Localized dark halo behind the hero text for readability */
#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse 75% 60% at center,
        var(--hero-halo) 0%,
        rgba(0, 0, 0, 0.4) 40%,
        transparent 75%
    );
    z-index: 1;
    pointer-events: none;
}

#home .container {
    position: relative;
    z-index: 2;
    color: #fff;
}

.hero h1 {
    font-size: 40px;
    margin-bottom: 10px;
}

.btn {
    display: inline-block;
    background: var(--accent-primary);
    color: var(--text-on-accent);
    padding: 10px 30px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    margin-top: 20px;
    border-radius: 5px;
}

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

/* Sections */
.section {
    padding: 40px 0;
    text-align: center;
}

.section.bg-light {
    background-color: var(--bg-secondary);
    text-align: left;
}

h2 {
    text-align: center;
    margin-bottom: 30px;
}

/* Section Title for Alternating Content */
.section-title {
    margin-bottom: 60px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.service-card {
    background: var(--bg-card);
    padding: 20px;
    border: 1px solid var(--border-primary);
    border-radius: 5px;
    box-shadow: var(--shadow-card);
    text-align: center;
}

.service-card h3 {
    color: var(--accent-primary);
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.team-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 5px;
    box-shadow: var(--shadow-card);
    text-align: center;
}

.team-card img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
    border: 3px solid var(--accent-border);
}

.team-card h3 {
    color: var(--text-primary);
    margin-bottom: 5px;
}

.team-card p:first-of-type {
    color: var(--accent-primary);
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 10px;
}

.team-card p:last-of-type {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Clients Grid */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
}

.client-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 5px;
    box-shadow: var(--shadow-card);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
}

.client-card img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.client-card:hover img {
    opacity: 1;
}

/* ===== Partners Logos Section ===== */

.partners-section {
    padding: 40px 0;
    background-color: var(--bg-secondary);
    overflow: hidden;
}

.partners-section h2 {
    text-align: center;
    margin-bottom: 10px;
}

/* Track wrapper - full width overflow container with edge fade */
.partners-track-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
    /* Fade edges for smooth visual transition */
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
}

/* Animated track - contains two identical sets of logos */
.partners-track {
    display: flex;
    gap: 40px;
    align-items: center;
    width: max-content;
    animation: partnersScroll 30s linear infinite;
}

.partners-track:hover {
    animation-play-state: paused;
}

/* Individual logo item */
.partner-logo {
    flex-shrink: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    width: 180px;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.partner-logo:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-card-hover);
}

.partner-logo img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    opacity: 0.6;
    transition: opacity 0.3s ease, filter 0.3s ease;
    filter: grayscale(100%);
}

.partner-logo:hover img {
    opacity: 1;
    filter: grayscale(0%);
}

/* Seamless infinite scroll animation */
@keyframes partnersScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .partners-track {
        animation: none;
        justify-content: center;
        width: 100%;
        flex-wrap: wrap;
    }

    .partners-track-wrapper {
        mask-image: none;
        -webkit-mask-image: none;
        padding: 20px 0;
    }
}

/* Responsive adjustments for partners section */
@media (max-width: 768px) {
    .partners-track {
        gap: 20px;
        animation-duration: 20s;
    }

    .partner-logo {
        width: 140px;
        height: 80px;
        padding: 10px 15px;
    }

    .partner-logo img {
        max-height: 45px;
    }
}

/* ===== Partner Showcase Section ===== */

.partner-showcase {
    text-align: center;
}

.partner-showcase img {
    max-width: 250px;
    height: auto;
    margin-bottom: 20px;
}

/* IRIS logo theme switching - two stacked images, visibility toggled by theme */
.iris-logo {
    display: block;
    margin: 0 auto 20px auto;
}

/* Light mode: show inverted logo, hide transparent */
.iris-logo-light {
    display: block;
}

.iris-logo-dark {
    display: none;
}

[data-theme="dark"] .iris-logo-light {
    display: none;
}

[data-theme="dark"] .iris-logo-dark {
    display: block;
}

.partner-showcase h2 {
    margin-bottom: 20px;
}

.partner-showcase p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-secondary);
}

/* ===== Partner Showcase Section ===== */

.partner-showcase {
    text-align: center;
}

.partner-showcase img {
    max-width: 250px;
    height: auto;
    margin-bottom: 20px;
}

.partner-showcase h2 {
    margin-bottom: 20px;
}

.partner-showcase p {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-secondary);
}

/* ===== Coverage Area Map Section ===== */

.map-figure {
    margin: 0 auto;
    max-width: 800px;
    text-align: center;
}

.map-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.3s ease;
}

.map-figure img:hover {
    box-shadow: var(--shadow-card-hover);
}

/* 3D Model Viewer Section */
#model-viewer {
    text-align: center;
}

#model-viewer h2 {
    color: var(--text-primary);
}

#model-viewer p {
    margin-bottom: 30px;
    color: var(--text-secondary);
}

model-viewer {
    width: 100%;
    height: 500px;
    background-color: var(--bg-model-viewer);
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    box-shadow: var(--shadow-model);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    model-viewer {
        height: 400px;
    }
}

/* Contact Form Styles */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-form);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow-form);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-primary);
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
    color: var(--text-primary);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

/* Contact Info Section */
#contact-info .service-card {
    cursor: default;
}

#contact-info .service-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

#contact-info .service-card p {
    color: #666;
    margin: 5px 0;
}

/* Timezone adjustment note (populated by hours.js) */
.hours-note {
    font-size: 13px;
    font-style: italic;
    color: var(--text-secondary);
    margin: 8px 0 0;
}

/* Hidden when hours.js leaves the note empty (visitor already in the base timezone) */
.hours-note:empty {
    display: none;
}

/* Keep the note readable in both themes inside the contact card (overrides the hardcoded #666 above) */
#contact-info .service-card .hours-note {
    color: var(--text-secondary);
}

.footer-column .hours-note {
    color: var(--text-footer);
    opacity: 0.7;
}

/* Responsive form adjustments */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-container {
        padding: 25px;
    }
    
    .hero {
        height: 300px;
    }

    /* Widen the halo so it still covers the taller text block on mobile */
    #home::before {
        background: radial-gradient(
            ellipse 120% 120% at center,
            var(--hero-halo) 0%,
            rgba(0, 0, 0, 0.4) 40%,
            transparent 75%
        );
    }
}

/* Footer */
footer {
    background: var(--bg-footer);
    color: var(--text-footer);
    text-align: center;
    padding: 0;
    margin-top: auto;
}

footer .container {
    max-width: 1200px;
}

/* Footer Grid Layout */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 40px 0;
    text-align: left;
}

.footer-column h3 {
    color: var(--accent-primary);
    font-size: 18px;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--accent-primary);
    display: inline-block;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    color: var(--text-footer);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--accent-primary);
    padding-left: 5px;
}

.footer-column p {
    margin: 6px 0;
    line-height: 1.6;
}

.footer-column a {
    color: var(--text-footer);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column a:hover {
    color: var(--accent-primary);
}

/* Footer Bottom Bar */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding: 15px 0;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

/* Footer responsive */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
        padding: 30px 0;
    }

    .footer-column h3 {
        display: block;
        border-bottom: none;
        padding-bottom: 0;
    }

    .footer-column ul li a:hover {
        padding-left: 0;
    }
}

/* ===== Theme Toggle Button ===== */
.theme-toggle {
    background: transparent;
    border: 2px solid var(--accent-primary);
    color: var(--text-header);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 10px;
    font-family: inherit;
}

.theme-toggle:hover {
    background-color: var(--accent-primary);
    color: var(--text-on-accent);
}

.theme-toggle .icon {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.theme-toggle .label {
    font-weight: 500;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .theme-toggle {
        padding: 4px 8px;
        font-size: 12px;
    }

    .theme-toggle .label {
        display: none;
    }
}

/* Mobile: let the header wrap so the nav drops onto its own centered row.
   This prevents the nav from being clipped by .container's overflow:hidden
   on narrow viewports (~320px-768px). Desktop layout is untouched. */
@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 0;
        row-gap: 8px;
    }

    header nav {
        width: 100%;
        height: auto;
    }

    header nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    header nav ul li {
        height: auto;
    }

    header nav ul li a {
        margin: 4px 0;
        padding: 10px 14px;
    }
}

/* ===== Alternating Image-Text Section ===== */

.content-row {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}

.content-row:last-child {
    margin-bottom: 0;
}

.content-row.reverse {
    flex-direction: row-reverse;
}

.content-image {
    flex: 1;
    min-width: 0;
}

.content-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    display: block;
}

/* Full-size modifier — no cropping, natural image dimensions (capped at 80vh) */
.content-image.full-size img {
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

.content-text {
    flex: 1;
    min-width: 0;
}

.content-text h2 {
    text-align: left;
    margin-bottom: 20px;
    font-size: 28px;
    color: var(--accent-primary);
}

.content-text p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
}

/* Responsive for alternating content */
@media (max-width: 768px) {
    .content-row,
    .content-row.reverse {
        flex-direction: column;
        gap: 20px;
    }

    .content-image img {
        height: 250px;
    }

    .content-image.full-size img {
        height: auto;
    }

    .content-text h2 {
        text-align: center;
        font-size: 24px;
    }

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

/* ===== Mural Gallery Section ===== */

.mural-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.mural-tile {
    height: 220px;
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mural-tile span {
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
    text-align: center;
}

.mural-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
}

/* Real photos inside tiles: fill the tile completely without overflowing.
   Applies to any <img> placed inside a .mural-tile — no inline styles needed. */
.mural-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Photos span the full 220px tile (no padding ring); placeholder <span> labels keep the 10px inset */
.mural-tile:has(img) {
    padding: 0;
}

/* Distinct placeholder gradients — semi-transparent so they read in both themes */
.mural-tile-1 { background: linear-gradient(135deg, rgba(230, 126, 34, 0.45), rgba(142, 68, 173, 0.35)); }
.mural-tile-2 { background: linear-gradient(135deg, rgba(52, 152, 219, 0.45), rgba(26, 188, 156, 0.35)); }
.mural-tile-3 { background: linear-gradient(135deg, rgba(231, 76, 60, 0.40), rgba(230, 126, 34, 0.35)); }
.mural-tile-4 { background: linear-gradient(135deg, rgba(142, 68, 173, 0.40), rgba(52, 73, 94, 0.40)); }
.mural-tile-5 { background: linear-gradient(135deg, rgba(26, 188, 156, 0.40), rgba(41, 128, 185, 0.35)); }
.mural-tile-6 { background: linear-gradient(135deg, rgba(241, 196, 15, 0.40), rgba(230, 126, 34, 0.35)); }

/* Content-row heading link — used by the "Custom Murals" point in "What We Do" (index.html) */
.content-text h2 a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.content-text h2 a:hover {
    color: var(--accent-hover);
}

/* Custom Murals row placeholder — gradient tile sized like the sibling .content-image img
   (semi-transparent, so it reads in both light and dark themes). Swap for a real <img> when available. */
.content-image-placeholder {
    width: 100%;
    height: 350px;
    border-radius: 8px;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: linear-gradient(135deg, rgba(230, 126, 34, 0.45), rgba(142, 68, 173, 0.35));
}

.content-image-placeholder span {
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
    text-align: center;
}

@media (max-width: 768px) {
    .content-image-placeholder {
        height: 250px;
    }
}



.google-form-card {
  width: min(100%, 820px);
  margin-inline: auto;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(31, 41, 51, 0.1);
  border-radius: 18px;
  box-shadow: 0 20px 55px rgba(31, 41, 51, 0.12);
}

.google-form-card iframe {
  display: block;
  width: 100%;
  min-height: 1500px;
  border: 0;
  background: #ffffff;
}

.contact-form-fallback {
  margin: 1rem auto 0;
  color: #52606d;
  font-size: 0.9rem;
  text-align: center;
}

.contact-form-fallback a {
  color: #9b5a10;
  font-weight: 600;
}

@media (max-width: 600px) {
  .contact-form-section {
    padding-inline: 0;
  }

  .contact-form-intro,
  .contact-form-fallback {
    padding-inline: 1rem;
  }

  .google-form-card {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .google-form-card iframe {
    min-height: 1500px;
  }
}
