/* Base & Reset */
:root {
    --primary-color: #2E7D32; /* Forest Green */
    --primary-dark: #1B5E20;
    --primary-light: #4CAF50;
    --secondary-color: #8D6E63; /* Earth Brown */
    --text-main: #333333;
    --text-light: #666666;
    --bg-light: #F9F9F9;
    --white: #FFFFFF;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
}

body {
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

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

.section {
    padding: 120px 0;
}

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

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-weight: 700;
}

.section-header p {
    font-size: 1.15rem;
    color: var(--text-light);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    padding: 16px 36px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 40px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(46, 125, 50, 0.4);
}

.full-width {
    width: 100%;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 24px 0;
    background: transparent;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

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

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--white);
    transition: var(--transition);
    letter-spacing: -0.5px;
}

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

nav ul {
    display: flex;
    gap: 40px;
}

nav a {
    color: var(--white);
    font-weight: 500;
    font-size: 1.05rem;
    transition: var(--transition);
    position: relative;
}

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

nav a:hover {
    color: var(--primary-light);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    padding-bottom: 20px;
    margin-bottom: -20px;
}

nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 15px);
    background: var(--white);
    min-width: max-content;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 10px 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.dropdown-menu li {
    width: 100%;
}

nav .dropdown-menu a {
    color: var(--text-main);
    padding: 12px 20px;
    display: block;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
}

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

nav .dropdown-menu a:hover,
header.scrolled nav .dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: brightness(0.65);
    z-index: -1;
    transform: scale(1.05);
    animation: slowZoom 25s infinite alternate ease-in-out;
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.hero-content {
    max-width: 1000px;
    padding: 20px;
    z-index: 2;
}

.hero-content h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 24px;
    font-weight: 700;
    text-shadow: 0 4px 20px rgba(0,0,0,0.4);
    letter-spacing: -1px;
    word-break: keep-all;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 45px;
    text-shadow: 0 2px 15px rgba(0,0,0,0.4);
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
}

/* Technology Section */
.tech-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}

.tech-image img {
    width: 100%;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.slider-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #f0f0f0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.slider-container .slider-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    box-shadow: none;
}

.slider-container .slider-img.active {
    opacity: 1;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary-dark);
    border: none;
    cursor: pointer;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    border-radius: 50%;
    z-index: 10;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: white;
}

.prev-btn { left: 15px; }
.next-btn { right: 15px; }

.slider-progress-bg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.slider-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-light);
}

.slider-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.slider-dot.active {
    background: #888888; /* Gray color for active dot */
    transform: scale(1.2);
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.tech-text h3 {
    font-size: 2.2rem;
    color: var(--primary-dark);
    margin-bottom: 24px;
    font-weight: 700;
}

.tech-text p {
    font-size: 1.15rem;
    color: #555;
    margin-bottom: 35px;
    line-height: 1.8;
}

.check-list li {
    position: relative;
    padding-left: 36px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--text-main);
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.3rem;
    background: rgba(46, 125, 50, 0.1);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.check-list-white li {
    color: var(--white);
}

.check-list-white li::before {
    color: #66bb6a;
    background: rgba(255, 255, 255, 0.1);
}

/* Products Section */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 50px;
}

.product-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.product-img-wrapper {
    height: 280px;
    overflow: hidden;
    background: #eee;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.08);
}

.product-info {
    padding: 35px;
}

.product-info h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--primary-dark);
    font-weight: 700;
}

.product-info p {
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.7;
}

.tag {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(46, 125, 50, 0.08);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-right: 10px;
}

/* Vision Parallax Section */
.hero-parallax {
    background-image: url('assets/hero_background.png');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    position: relative;
    padding: 0;
}

.hero-parallax::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(27, 94, 32, 0.75); /* Dark Green Tint */
    z-index: 1;
}

.parallax-content {
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

.parallax-content h2 {
    font-size: 3rem;
    margin-bottom: 24px;
    font-weight: 700;
}

.parallax-content p {
    font-size: 1.25rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.9);
}

/* Contact Section */
.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    background: var(--white);
    padding: 60px;
    border-radius: 24px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.08);
}

.contact-info h3 {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 12px;
    line-height: 1.4;
    font-weight: 700;
}

.contact-info > p {
    color: var(--text-light);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.contact-info ul li {
    margin-bottom: 20px;
    font-size: 1.15rem;
    display: flex;
}

.contact-info ul li strong {
    color: var(--primary-color);
    display: inline-block;
    width: 100px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 18px;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1.05rem;
    transition: var(--transition);
    background: var(--bg-light);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.1);
}

/* Footer */
footer {
    background: #252525;
    color: #999;
    padding: 60px 0 30px;
    font-size: 0.95rem;
    text-align: center;
}

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

.footer-info h3 {
    color: #f0f0f0;
    font-size: 1.25rem;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.footer-info p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.footer-info .divider {
    margin: 0 12px;
    color: #555;
}

.footer-copyright {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #3a3a3a;
    width: 100%;
    color: #666;
    font-size: 0.85rem;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.slide-in-up {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.is-visible {
    opacity: 1 !important;
    transform: translate(0) !important;
}

/* Responsive constraints */
@media (max-width: 992px) {
    .tech-grid, .contact-wrap {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .hero-content h2 {
        font-size: 3rem;
    }
    
    .parallax-content h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    nav {
        display: none;
    }
    .section {
        padding: 80px 0;
    }
    .hero-content h2 {
        font-size: 2.3rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
    .section-header h2 {
        font-size: 2rem;
    }
    .contact-wrap {
        padding: 30px;
    }
}

/* Sidebar Layout */
.container.page-layout {
    max-width: 1350px;
}

.page-layout {
    display: flex;
    gap: 70px;
    padding-top: 0;
    align-items: flex-start;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
    background: var(--white);
    border-radius: 16px;
    padding: 30px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.sidebar h3 {
    font-size: 1.25rem;
    color: var(--primary-dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    font-weight: 700;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu > li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-menu a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Active top-level or single menu */
.sidebar-menu > li.active > a,
.sidebar-menu > li > a.active {
    background: #f0f0f0;
    color: var(--text-main);
    font-weight: 700;
}

/* Sub-menu base */
.sidebar-menu .sub-menu {
    padding-left: 15px;
    margin-top: 8px;
    margin-bottom: 10px;
    border-left: 2px solid #eaeaea;
    margin-left: 15px;
    display: none;
}

.sidebar-menu .has-submenu.open .sub-menu {
    display: block;
}

.sidebar-menu .sub-menu a {
    font-size: 0.95rem;
    padding: 8px 15px;
    color: var(--text-light);
    font-weight: 400;
}

.sidebar-menu .sub-menu a:hover {
    color: var(--primary-color);
    background: none;
}

/* Gray background for actual active sub-page */
.sidebar-menu .sub-menu li.active a {
    background: #e8e8e8;
    color: var(--text-main);
    font-weight: 600;
}

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

@media (max-width: 992px) {
    .page-layout {
        flex-direction: column;
        gap: 30px;
    }
    .sidebar {
        width: 100%;
        position: static;
        padding: 20px;
    }
}

/* Mobile Hamburger Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
    padding: 0;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--white);
    transition: var(--transition);
    border-radius: 2px;
}

header.scrolled .mobile-menu-toggle span {
    background-color: var(--text-main) !important;
}

.menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 990; /* Placed below #header's 1000 to prevent blocking menu clicks */
}
.menu-backdrop.active {
    display: block;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        width: 240px;
        height: 100vh;
        background: var(--white);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
        padding: 90px 30px 40px;
        transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
        z-index: 1050;
        display: block !important;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 20px;
        align-items: flex-start;
    }

    nav a {
        color: var(--text-main) !important;
        font-size: 1.15rem;
        font-weight: 600;
        display: block;
        width: 100%;
        text-align: left;
    }

    nav .dropdown-menu {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        box-shadow: none !important;
        padding: 10px 0 0 15px !important;
        transform: none !important;
        display: flex !important;
        flex-direction: column;
        gap: 8px;
        width: 100%;
        background: transparent !important;
    }

    nav .dropdown-menu a {
        text-align: left !important;
        padding: 5px 0 !important;
        font-size: 0.95rem !important;
        color: var(--text-light) !important;
        font-weight: 500;
    }

    /* Active hamburger animation */
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: var(--text-main) !important;
    }

    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--text-main) !important;
    }
}
/* Hide sidebar on mobile to show main content immediately */
@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }
}
/* Compact styling for mobile subpages to allow scan-at-a-glance with less scrolling */
@media (max-width: 768px) {
    .section {
        padding: 40px 0 !important;
    }
    
    .section-header {
        margin-bottom: 30px !important;
    }
    
    .section-header h2 {
        font-size: 1.8rem !important;
        margin-bottom: 8px !important;
    }
    
    .section-header p {
        font-size: 1rem !important;
    }

    .detailed-sections > div {
        padding: 25px 20px !important;
        gap: 15px !important;
    }

    .detailed-sections h4 {
        font-size: 1.25rem !important;
        margin-bottom: 10px !important;
    }

    .detailed-sections p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    .slider-container {
        aspect-ratio: 16/10 !important;
    }

    .tech-text h3 {
        font-size: 1.5rem !important;
        margin-bottom: 12px !important;
    }

    .tech-text p {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
        line-height: 1.6 !important;
    }

    .check-list li {
        font-size: 0.95rem !important;
        margin-bottom: 10px !important;
        padding-left: 30px !important;
    }

    .check-list li::before {
        width: 22px !important;
        height: 22px !important;
        font-size: 1rem !important;
    }

    .stats-grid {
        gap: 12px !important;
        margin-top: 20px !important;
        margin-bottom: 20px !important;
    }

    .stat-card {
        padding: 15px 10px !important;
    }

    .stat-card h4 {
        font-size: 0.9rem !important;
    }

    .stat-card .number {
        font-size: 1.8rem !important;
    }

    .chart-grid {
        gap: 15px !important;
    }

    .chart-card {
        padding: 15px !important;
    }

    .chart-title {
        font-size: 1rem !important;
        margin-bottom: 10px !important;
    }

    .eco-hero {
        padding: 30px 20px !important;
        margin-top: 30px !important;
    }

    .eco-hero h3 {
        font-size: 1.5rem !important;
    }

    .eco-hero p {
        font-size: 1rem !important;
    }
}
/* Tech Excellence Grid responsive wrapping */
.tech-excellence-grid {
    grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 768px) {
    .tech-excellence-grid {
        grid-template-columns: 1fr !important;
    }
    .tech-excellence-grid * {
        white-space: normal !important;
    }
}

/* Print styles for PDF generation without header/menu */
@media print {
    #header, header, nav, .sidebar, .mobile-menu-toggle, .dropdown-menu, .slider-btn, .slider-progress-bg {
        display: none !important;
    }
    
    /* Make ALL animated elements 100% visible in print/PDF */
    .fade-in, .fade-in-up, .slide-in-left, .slide-in-right, .tech-grid, .tech-text, .tech-image, [class*="fade-"], [class*="slide-"] {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    body {
        background-color: #ffffff !important;
    }
    main {
        padding-top: 0 !important;
    }
    .page-layout {
        display: block !important;
    }
    .page-content {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .container {
        max-width: 100% !important;
        padding: 0 15px !important;
    }
    .section {
        padding: 20px 0 !important;
    }
    footer {
        margin-top: 40px !important;
    }
}