/* Reset & Variables */
:root {
    --primary-color: #1a4f8b; /* Deep trustworthy blue */
    --secondary-color: #0d2b4d;
    --accent-color: #e65100; /* Energetic orange for highlights */
    --text-dark: #333333;
    --text-light: #ffffff;
    --text-muted: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --font-main: 'Noto Sans KR', sans-serif;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

/* Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

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

.section {
    padding: 100px 0;
}

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

.highlight {
    color: var(--accent-color);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
    padding: 20px 0;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 300;
    color: var(--text-light); /* Initial transparent state */
    transition: color var(--transition-speed);
}
.logo strong {
    font-weight: 900;
}

.header.scrolled .logo {
    color: var(--primary-color);
}

.nav-menu ul {
    display: flex;
    gap: 40px;
}

.nav-menu a {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-light);
    transition: color var(--transition-speed);
    position: relative;
}

.header.scrolled .nav-menu a {
    color: var(--text-dark);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width var(--transition-speed);
}

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

/* Hamburger (Mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 30px;
    height: 2px;
    background-color: var(--text-light);
    transition: all 0.3s;
}

.header.scrolled .hamburger span {
    background-color: var(--primary-color);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--text-light);
    overflow: hidden;
}

/* YouTube Video Background */
.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    pointer-events: none; /* Prevent clicks on the video */
    z-index: -2;
    overflow: hidden;
}

/* Scale iframe to ensure no black borders */
.video-foreground {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.video-foreground iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 56.25vw; /* 16:9 Aspect Ratio */
    min-height: 100vh;
    min-width: 177.77vh; /* 16:9 Aspect Ratio */
    transform: translate(-50%, -50%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
    z-index: -1;
}

.hero-content {
    z-index: 1;
    max-width: 800px;
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #e0e0e0;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 30px;
}

.hero-desc {
    font-size: 1.2rem;
    font-weight: 300;
    margin-bottom: 40px;
    color: #f0f0f0;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-block;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 4px;
    transition: all var(--transition-speed);
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-light);
    border: 2px solid var(--accent-color);
}

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

.btn-outline {
    background-color: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.btn-outline:hover {
    background-color: var(--text-light);
    color: var(--text-dark);
}

/* Section Shared Styles */
.section-header {
    margin-bottom: 60px;
}

.section-subtitle {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.divider {
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    margin: 20px auto 0;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text .lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

.about-features {
    margin-top: 40px;
}

.about-features li {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.about-features i {
    width: 24px;
    height: 24px;
    background-color: var(--accent-color);
    border-radius: 50%;
    margin-top: 5px;
    flex-shrink: 0;
}

.about-features strong {
    display: block;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.about-features span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.img-placeholder {
    width: 100%;
    padding-bottom: 100%; /* Square */
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
    border-radius: 8px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.experience-badge {
    position: absolute;
    bottom: -30px;
    left: -30px;
    background-color: var(--primary-color);
    color: white;
    padding: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 20px rgba(26, 79, 139, 0.2);
}

.experience-badge .num {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
}

/* Services Section */
.service-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.card-img {
    height: 240px;
    background-color: #ddd; /* placeholders */
    background-size: cover;
    background-position: center;
}

/* Gradient placeholders for service images */
.card-img.commercial { background: linear-gradient(45deg, #8e44ad, #9b59b6); }
.card-img.home { background: linear-gradient(45deg, #2ecc71, #27ae60); }
.card-img.sign { background: linear-gradient(45deg, #e74c3c, #c0392b); }
.card-img.leak { background: linear-gradient(45deg, #1a4f8b, #0d2b4d); }
.card-img.pipe { background: linear-gradient(45deg, #e65100, #ff9800); }
.card-img.facility { background: linear-gradient(45deg, #607d8b, #455a64); }

.card-body {
    padding: 30px;
}

.card-body h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.card-body p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.card-link {
    color: var(--primary-color);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s;
}

.card-link:hover {
    color: var(--accent-color);
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 10px;
}

.footer-logo strong {
    font-weight: 900;
}

.footer-slogan {
    color: #a0b6cc;
}

.footer-heading {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #ffffff;
}

.footer-contact .phone-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 5px;
}

.footer p {
    color: #a0b6cc;
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    color: #7a94b0;
    font-size: 0.9rem;
}

/* Animations */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .experience-badge {
        left: 20px;
        bottom: 20px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .service-cards {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .header.scrolled .hamburger span {
        background-color: var(--primary-color);
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #ffffff;
        padding: 80px 30px 30px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu ul {
        flex-direction: column;
        gap: 20px;
    }
    
    .nav-menu a {
        color: var(--text-dark);
        font-size: 1.2rem;
    }
    
    /* When mobile menu opens, header logo should be dark */
    .header.menu-open .logo {
        color: var(--primary-color);
    }
    .header.menu-open .hamburger span {
        background-color: var(--primary-color);
    }
}
