/* --- CSS Variables (Color Palette V11) --- */
:root {
    --bg-dark: #02281b;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --text-light: #ffffff;
    --text-dark: #333333;
    --accent-color: #eabc88;
    --link-color-dark: #011a12;
    --border-color: #e0e0e0;
}

/* --- Global Box Sizing --- */
*, *::before, *::after {
    box-sizing: border-box;
}

/* --- Global Styles & Typography --- */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 0; background-color: var(--bg-white); color: var(--text-dark); line-height: 1.7; }
h1, h2, h3, h4 { color: var(--bg-dark); font-weight: 700; margin-top: 0; }
h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
a { text-decoration: none; transition: color 0.3s ease; }
img { max-width: 100%; height: auto; display: block; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 4rem; }

/* --- Layout Grids --- */
.grid-two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.grid-three-cols-v2 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-four-cols-v2 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }

/* --- Header & Navigation --- */
.main-header { background-color: var(--bg-dark); padding: 0; position: sticky; top: 0; z-index: 1000; }
.main-header .container { display: flex; justify-content: space-between; align-items: center; height: 100px; }
.logo img { height: 60px; width: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
.main-nav ul li { margin-left: 2.5rem; }
.main-nav ul li a { color: var(--text-light); font-weight: 500; padding-bottom: 5px; border-bottom: 2px solid transparent; }
.main-nav ul li a:hover, .main-nav ul li a.active { color: var(--accent-color); border-bottom-color: var(--accent-color); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }
.hamburger { display: block; width: 25px; height: 3px; background-color: var(--text-light); position: relative; transition: transform 0.3s ease; }
.hamburger::before, .hamburger::after { content: ''; position: absolute; width: 100%; height: 3px; background-color: var(--text-light); left: 0; transition: transform 0.3s ease, top 0.3s ease; }
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* --- Hero Sections --- */
.hero-slider-container { position: relative; height: 90vh; overflow: hidden; }
.hero-slider { width: 100%; height: 100%; }
.hero-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease-in-out; }
.hero-slide.active { opacity: 1; }
.hero-background { width: 100%; height: 100%; background-size: cover; background-position: center; transform: scale(1.15); transition: transform 10s linear; }
.hero-slide.active .hero-background { transform: scale(1); }
.hero-slide .container { position: absolute; top: 0; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; z-index: 2; }
.hero-slide::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(2, 40, 27, 0.4), rgba(2, 40, 27, 0.8)); z-index: 1; }
.hero-slide h1, .hero-section h1 { color: var(--text-light); }
.hero-slide .subtitle, .hero-section .subtitle { font-size: 1.2rem; color: var(--accent-color); }
.hero-section .container { position: relative; z-index: 2; }
.slider-nav { position: absolute; top: 50%; transform: translateY(-50%); background: none; color: white; border: 1px solid rgba(255,255,255,0.5); font-size: 1.5rem; padding: 0.5rem; cursor: pointer; z-index: 10; transition: all 0.3s ease; border-radius: 50%; width: 50px; height: 50px; opacity: 0; }
.hero-slider-container:hover .slider-nav { opacity: 1; }
.slider-nav:hover { background-color: rgba(2, 40, 27, 0.7); }
.slider-nav.prev { left: 2rem; }
.slider-nav.next { right: 2rem; }
.hero-section { color: var(--text-light); text-align: center; padding: 8rem 0; background-size: cover; background-position: center; position: relative; }
.hero-section::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(2, 40, 27, 0.7); }
.hero-product { background-image: url('../images/hero-sound.jpg'); }
.hero-product-lighting { background-image: url('../images/hero-lighting.jpg'); }
.hero-contact { background-image: url('../images/hero-contact.jpg'); }

/* --- Buttons --- */
.btn { padding: 0.8rem 1.8rem; border-radius: 5px; font-weight: 700; display: inline-block; text-align: center; transition: all 0.3s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.btn-primary { background-color: var(--bg-dark); color: var(--text-light); border: 2px solid var(--bg-dark); }
.btn-primary:hover { background-color: #011a12; border-color: #011a12; }
.btn-learn-more { font-weight: 700; color: var(--bg-dark); }
.btn-learn-more:hover { color: var(--accent-color); }

/* --- Page Sections --- */
.philosophy-section, .intro-section-moved, .overview-section, .contact-section-v2, .leadership-section, .advantages-section { padding: 6rem 0; }
.services-section-v2, .features-section-v2, .scenarios-section-v2, .leadership-section, .advantages-section { background-color: var(--bg-light); }
.philosophy-image img, .service-image img, .overview-image img, .intro-image img, .leader-card img, .advantage-card img { aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; }
.service-item { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; margin-bottom: 4rem; }
.service-item.reverse { grid-template-areas: "content image"; }
.service-item:not(.reverse) { grid-template-areas: "image content"; }
.service-image { grid-area: image; }
.service-content { grid-area: content; }
.service-item:last-child { margin-bottom: 0; }
.app-card, .feature-card, .advantage-card { background-color: var(--bg-white); border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; }
.app-card img, .feature-card-image img, .advantage-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: transform 0.3s ease; }
.app-card:hover img, .feature-card:hover img, .advantage-card:hover img { transform: scale(1.05); }
.app-card-content, .feature-card-content, .advantage-card-content { padding: 1.5rem; flex-grow: 1; }
.advantage-card-content { text-align: center; }
.advantage-card-content h4 { margin-bottom: 0.5rem; }
.architecture-image { text-align: center; padding: 2rem; background: var(--bg-white); border: 1px solid var(--border-color); border-radius: 8px; }
.leader-card ul { list-style: none; padding: 0; }
.leader-card li { margin-bottom: 0.5rem; padding-left: 1.5rem; position: relative; }
.leader-card li::before { content: '\25CF'; color: var(--accent-color); position: absolute; left: 0; font-size: 0.8rem; top: 5px; }

/* --- Contact Page Specifics --- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.form-group { margin-bottom: 1.5rem; }
.form-group label { display: block; margin-bottom: 0.5rem; font-weight: 600; }
.form-group input, .form-group textarea { width: 100%; padding: 0.8rem; border: 1px solid var(--border-color); border-radius: 5px; font-size: 1rem; }
.contact-details-wrap h3, .contact-form-wrap h3 { margin-bottom: 2rem; }
.contact-block { margin-bottom: 2rem; }
.contact-block h4 { color: var(--accent-color); margin-bottom: 0.5rem; }
.contact-block address, .contact-block p { font-style: normal; line-height: 1.8; }
.contact-block a { color: var(--bg-dark); }
.contact-block a:hover { color: var(--accent-color); }
.map-section { padding-top: 6rem; }

/* --- Modal Styles --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.6); /* Black w/ opacity */
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    position: relative; /* This is the key fix */
    background-color: #fff;
    margin: auto;
    padding: 3rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    position: relative;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #333;
}

.modal-content h3 {
    margin-bottom: 1rem;
}

/* --- Form Messages --- */
.message {
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- CTA & Footer (V9 - Corrected) --- */
.cta-section { background-color: var(--bg-white); color: var(--text-dark); text-align: center; padding: 5rem 0; }
.cta-section h2 { color: var(--bg-dark); }
.main-footer-v2 { background-color: var(--bg-dark); color: var(--text-light); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; margin-bottom: 3rem; }
.footer-col .logo img { height: 40px; width: auto; margin-bottom: 1rem; }
.footer-col h4 { color: var(--accent-color); }
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--text-light); }
.footer-col a:hover { color: var(--accent-color); }
.footer-bottom { border-top: 1px solid #3a584e; padding-top: 2rem; text-align: center; font-size: 0.9rem; }

/* --- Responsive (Mobile) Styles V10 --- */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }

    .main-header .container { height: 80px; }
    .logo img { height: 45px; }

    .hero-slider-container { height: 60vh; }
    .hero-slide .btn { display: none; } /* Hide buttons on mobile */
    .hero-slide h1 { font-size: 1.8rem; }
    .hero-slide .subtitle { font-size: 1rem; padding: 0 1rem; }
    .slider-nav { display: none; }

    .philosophy-section, .intro-section-moved, .overview-section, .contact-section-v2, .leadership-section, .services-section-v2, .features-section-v2, .scenarios-section-v2, .advantages-section { padding: 3rem 0; }

    .grid-two-cols, .grid-three-cols-v2, .grid-four-cols-v2, .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .service-item { display: flex; flex-direction: column; gap: 2rem; margin-bottom: 3rem; }
    .service-item.reverse, .service-item { grid-template-areas: unset; }

    .philosophy-section .grid-two-cols { display: flex; flex-direction: column; }
    .philosophy-content { order: 1; }
    .philosophy-image { order: 2; margin-top: 2rem; }

    /* Contact Page Responsive */
    .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
    .map-section { padding-top: 3rem; }

    .nav-toggle { display: block; }
    .main-nav ul { display: none; position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--bg-dark); flex-direction: column; text-align: center; }
    .main-nav.is-open ul { display: flex; }
    .main-nav ul li { margin: 1rem 0; }
}