/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    will-change: auto;
}

html {
    scroll-behavior: smooth;
}

/* Performance optimizations with hardware acceleration */
.nav-link, .btn, .hamburger {
    will-change: transform, color, box-shadow;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Reduce layout shifts */
.nav-menu {
    contain: layout style;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #1a1a1a;
}

.highlight {
    color: #1a1a1a;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    transform: translateZ(0);
}

/* Button variants - consolidated styles */
.btn-primary,
.cta-button {
    background: linear-gradient(135deg, #1a1a1a, #000000);
    color: white;
}

.btn-primary:hover,
.cta-button:hover {
    background: linear-gradient(135deg, #333333, #1a1a1a);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 26, 26, 0.3);
}

.btn-primary:active,
.cta-button:active {
    transform: translateY(-1px);
    transition: transform 0.1s ease;
}

.btn-secondary {
    /* background: transparent;
    color: #1a1a1a;
    border: 2px solid #1a1a1a; */
    background: #1a1a1a;
    color: #f0f0f0;
    border: 2px solid #f0f0f0;
}

.btn-secondary:hover {
    background: #1a1a1a;
    color: white;
}

.btn-secondary:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

.btn-full {
    width: 100%;
}

.cta-button {
    color: white !important;
    padding: 10px 20px;
    border-radius: 25px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    /* background: rgba(255, 255, 255, 0.95); */
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: #1a1a1a;
    font-size: 1.8rem;
}

.nav-logo img {
    width: 188px; 
    padding-top: 8px; 
    margin: 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #1a1a1a;
}

.nav-link:active,
.nav-link-active {
    color: #1a1a1a;
    transform: scale(0.98);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #1a1a1a;
    transition: width 0.2s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.hamburger:active {
    transform: scale(0.95);
}

/* Touch device optimizations */
.touch-active {
    opacity: 0.7;
    transform: scale(0.98);
}

/* Faster tap highlights */
* {
    -webkit-tap-highlight-color: rgba(26, 26, 26, 0.2);
    -webkit-touch-callout: none;
}

/* Allow text selection for most elements */
body {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Disable text selection only for interactive elements */
button, .btn, .hamburger, .nav-link {
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

input, textarea {
    -webkit-user-select: text;
    -khtml-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.hamburger .bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    /* background: linear-gradient(135deg, #f8fbff 0%, #e8f4ff 100%); */
    background: url('../images/cms-265128_1920.jpg') no-repeat center center;
    background-size: cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 2.7rem;
    margin-bottom: 1.5rem;
    /* color: #1a1a1a; */
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.1rem;
    /* color: #666; */
    color: #e0e0e0;
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 300px;
    background: linear-gradient(135deg, #1a1a1a, #000000);
    background-size: cover;
    border-radius: 20px;
    color: white;
    font-size: 6rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Problems Section */
.problems {
    padding: 80px 0;
    background: #ffffff;
}

.problem-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Card base styles - consolidated */
.problem-card,
.damage-card,
.critical-card {
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.problem-card {
    background: #f8f9fa;
}

.problem-card:hover,
.damage-card:hover {
    transform: translateY(-5px);
}

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

.problem-icon,
.damage-icon {
    margin-bottom: 1rem;
}

.problem-icon {
    font-size: 3rem;
    color: #ff6b6b;
}

.problem-card h3 {
    font-size: 1.2rem;
    color: #333;
    line-height: 1.5;
}

.problem-detail {
    text-align: center;
    margin: 4rem 0;
}

.problem-title {
    font-size: 2.2rem;
    color: #1a1a1a;
    margin-bottom: 3rem;
}

.damage-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.damage-card {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.damage-icon {
    font-size: 2.5rem;
}

.damage-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.critical-info {
    display: flex;
    justify-content: center;
}

.critical-card {
    background: linear-gradient(135deg, #1a1a1a, #000000);
    color: white;
    padding: 3rem;
    border-radius: 20px;
    max-width: 400px;
}

.critical-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.critical-number {
    font-size: 4rem;
    font-weight: 900;
    margin: 1rem 0;
    color: #ffd700;
}

/* Solutions Section */
.solutions {
    padding: 80px 0;
    background: #f8f9fa;
}

.solution-tabs {
    max-width: 1000px;
    margin: 0 auto;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: 2px solid #1a1a1a;
    color: #1a1a1a;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-btn.active,
.tab-btn:hover {
    background: #1a1a1a;
    color: white;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 3rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Benefits Section */
.benefits {
    padding: 80px 0;
    background: white;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefit-card {
    background: linear-gradient(135deg, #e8f4ff, #f0f8ff);
    padding: 2.5rem 1.5rem;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(26, 26, 26, 0.15);
    border-color: #1a1a1a;
}

.benefit-icon {
    font-size: 3rem;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

.benefit-card h3 {
    font-size: 1.2rem;
    color: #1a1a1a;
    line-height: 1.4;
}

/* Testimonials Section */
.testimonials {
    padding: 80px 0;
    background: #f8f9fa;
}

.testimonials-carousel {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.testimonial-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.testimonial-card {
    display: none;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.testimonial-card.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.testimonial-content p {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 2rem;
    line-height: 1.6;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1a1a1a, #000000);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.author-info h4 {
    color: #1a1a1a;
    margin-bottom: 0.2rem;
}

.author-info span {
    color: #666;
    font-size: 0.9rem;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.carousel-btn {
    background: #1a1a1a;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: #000000;
    transform: scale(1.1);
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background 0.3s ease;
}

.dot.active {
    background: #1a1a1a;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: linear-gradient(135deg, #1a1a1a, #000000);
    color: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-features {
    margin-bottom: 2rem;
}

.contact-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-feature i {
    color: #4ade80;
}

.contact-form-container {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.contact-form {
    color: #333;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a1a1a;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.privacy-link {
    color: #1a1a1a;
    text-decoration: none;
}

.privacy-link:hover {
    text-decoration: underline;
}

.grecaptcha-info {
    font-size: 0.7em;
    color: #aaa;
    /* text-align: center; */
    margin-top: 1rem;
}

.grecaptcha-info a {
    color: #222;
    text-decoration: none;
}

.grecaptcha-badge {
    visibility: hidden;
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #1a1a1a;
}

.footer-section p {
    margin-bottom: 0.5rem;
    color: #ccc;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #1a1a1a;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: #1a1a1a;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 1rem 0;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }

    .hero-visual {
        display: none;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .problem-cards {
        grid-template-columns: 1fr;
    }
    
    .damage-types {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tab-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-bottom {
        text-align: center;
        flex-direction: column;
    }
    
    .footer-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .problem-title {
        font-size: 1.6rem;
    }
    
    .critical-card {
        padding: 2rem;
    }
    
    .critical-number {
        font-size: 3rem;
    }
    
    .contact-info h2 {
        font-size: 2rem;
    }
    
    .contact-form-container {
        padding: 1.5rem;
    }
    
    .testimonial-card {
        padding: 2rem;
    }
    
    .testimonial-content p {
        font-size: 1.2rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    background: #4ade80;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    display: none;
}

.error-message {
    background: #ff6b6b;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
    display: none;
}
