/* Global Styles */
:root {
    --primary-color: #e3001b; /* Red from logo */
    --secondary-color: #0064b6; /* Blue from logo */
    --dark-color: #000000;
    --light-color: #ffffff;
    --gray-color: #f8f9fa;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

section {
    padding: 80px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.section-title {
    position: relative;
    margin-bottom: 50px;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -15px;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #c00016;
    border-color: #c00016;
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: #00518f;
    border-color: #00518f;
}

/* Navigation */
.navbar {
    transition: var(--transition);
    padding: 20px 0;
    background-color: transparent;
}

.navbar.scrolled {
    background-color: var(--light-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

.navbar-brand img {
    height: 40px;
}

.navbar:not(.scrolled) .navbar-brand img {
    filter: invert(1) brightness(1.5);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--light-color);
    margin-left: 20px;
    position: relative;
    padding: 5px 0;
}

.navbar.scrolled .navbar-nav .nav-link {
    color: var(--dark-color);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.navbar:not(.scrolled) .navbar-nav .nav-link:hover,
.navbar:not(.scrolled) .navbar-nav .nav-link.active {
    color: var(--light-color);
    opacity: 0.85;
}

/* Hero Section */
#home {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1588421357574-87938a86fa28?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--light-color);
    position: relative;
    padding-top: 0;
}

#home .container {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
}

/* About Section */
#about {
    background-color: var(--gray-color);
}

.about-img {
    position: relative;
    padding-right: 30px;
}

.about-img::after {
    content: '';
    position: absolute;
    top: 30px;
    right: 0;
    width: 80%;
    height: 80%;
    background-color: var(--primary-color);
    z-index: -1;
}

.about-content h2 {
    margin-bottom: 30px;
    position: relative;
}

.about-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 30px;
}

.about-content ul li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.about-content ul li i {
    color: var(--primary-color);
    margin-right: 10px;
}

/* Problem Recognition Section */
#problem {
    background-color: var(--light-color);
}

.problem-item {
    text-align: center;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    margin-bottom: 30px;
    height: 100%;
}

.problem-item:hover {
    transform: translateY(-10px);
}

.problem-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--light-color);
}

.problem-icon i {
    font-size: 2rem;
}

/* Testing Section */
#testing {
    background-color: var(--gray-color);
}

.testing-item {
    position: relative;
    padding: 20px;
    border-radius: 5px;
    background-color: var(--light-color);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.testing-number {
    position: absolute;
    top: 0;
    left: 0;
    background-color: var(--primary-color);
    color: var(--light-color);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.testing-content {
    padding-left: 60px;
}

/* Fire Prevention System */
#prevention {
    background-color: var(--light-color);
}

.system-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    margin-bottom: 30px;
    height: 100%;
}

.system-card:hover {
    transform: translateY(-10px);
}

.system-card .card-body {
    padding: 25px;
}

.system-card .card-title {
    color: var(--primary-color);
}

.system-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 20px;
}

.system-icon i {
    color: var(--light-color);
    font-size: 1.5rem;
}

/* Patents Section */
#patents {
    background-color: var(--gray-color);
}

.patent-item {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: var(--transition);
    height: 100%;
}

.patent-item:hover {
    transform: translateY(-10px);
}

.patent-number {
    color: var(--primary-color);
    font-weight: 700;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 50px 0 20px;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 20px;
}

.footer-contact p {
    margin-bottom: 15px;
}

.footer-contact i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-links h5 {
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul {
    list-style: none;
    padding-left: 0;
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 30px;
}

.footer-bottom p {
    margin-bottom: 0;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: var(--light-color);
    text-align: center;
    line-height: 40px;
    border-radius: 3px;
    z-index: 99;
    display: none;
    transition: var(--transition);
}

.back-to-top:hover {
    background-color: var(--secondary-color);
}

/* Responsive */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: var(--light-color);
        padding: 20px;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-toggler {
        border: none;
        outline: none;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .about-img::after {
        display: none;
    }
    
    .about-img {
        margin-bottom: 30px;
    }
}

@media (max-width: 767px) {
    section {
        padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-title {
        margin-bottom: 30px;
    }
}
