/* ===========================
   CSS Variables
   =========================== */
:root {
    /* Colors */
    --primary-color: #1e7bb8;
    --primary-dark: #1a6a9e;
    --secondary-color: #2a8fc9;
    --kakao-yellow: #FEE500;
    --kakao-dark: #F5C500;
    --daangn-orange: #ff6f0f;
    --daangn-dark: #e65900;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 80px 0;
    --section-padding-mobile: 60px 0;
    
    /* Transitions */
    --transition-base: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

/* ===========================
   Reset & Base Styles
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ===========================
   Container & Layout
   =========================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: var(--section-padding);
}

/* ===========================
   Header & Navigation
   =========================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--bg-white);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    transition: var(--transition-base);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.brand-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding: 8px 0;
}

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: transparent;
}

.nav-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    border-radius: 3px;
    transition: var(--transition-base);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    background: linear-gradient(135deg, #1e7bb8 0%, #2a8fc9 100%);
    color: var(--bg-white);
    text-align: center;
    padding: 180px 0 100px;
    margin-top: 80px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.9;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease 0.2s backwards;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-message {
    font-size: 1.125rem;
    line-height: 1.9;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.highlight {
    color: var(--kakao-yellow);
    font-weight: 600;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

/* ===========================
   Buttons
   =========================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition-base);
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

.btn i {
    font-size: 1.125rem;
}

.btn-primary {
    background-color: #10b981;
    color: var(--bg-white);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-kakao {
    background-color: var(--kakao-yellow);
    color: #3c1e1e;
    box-shadow: var(--shadow-lg);
}

.btn-kakao:hover {
    background-color: var(--kakao-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-daangn {
    background-color: #ff6b35;
    color: var(--bg-white);
    box-shadow: var(--shadow-lg);
}

.btn-daangn:hover {
    background-color: #e55a2b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.btn-outline-kakao {
    color: var(--kakao-dark);
    border-color: var(--kakao-dark);
}

.btn-outline-kakao:hover {
    background-color: var(--kakao-yellow);
    color: #3c1e1e;
}

.btn-outline-daangn {
    color: #ff6b35;
    border-color: #ff6b35;
}

.btn-outline-daangn:hover {
    background-color: #ff6b35;
    color: var(--bg-white);
}

/* ===========================
   Section Headers
   =========================== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ===========================
   Services Section
   =========================== */
.services {
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.service-card {
    background-color: var(--bg-white);
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    color: var(--bg-white);
    font-size: 2rem;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.service-description {
    color: var(--text-light);
    line-height: 1.8;
}

.service-note {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.service-note i {
    color: #f59e0b;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.service-note p {
    color: var(--text-dark);
    line-height: 1.6;
}

/* ===========================
   Why Us Section
   =========================== */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.why-card {
    text-align: center;
    padding: 40px 30px;
    background-color: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.why-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.why-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-light);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 3rem;
}

.why-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-dark);
    line-height: 1.4;
}

.why-description {
    color: var(--text-light);
    line-height: 1.8;
}

.why-cta {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 16px;
    color: var(--bg-white);
}

.why-message {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.why-submessage {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* ===========================
   Contact Section
   =========================== */
.contact {
    background-color: var(--bg-light);
}

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

.contact-card {
    background-color: var(--bg-white);
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.contact-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    border-radius: 50%;
    color: var(--bg-white);
    font-size: 2rem;
}

.contact-icon-kakao {
    background-color: var(--kakao-yellow);
    color: #3c1e1e;
}

.contact-icon-daangn {
    background-color: #ff6b35;
}

.contact-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.contact-info {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 25px;
    font-weight: 500;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background-color: var(--bg-white);
    color: var(--text-dark);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-brand .brand-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.footer-info p,
.footer-contact p {
    margin-bottom: 10px;
    line-height: 1.8;
    color: var(--text-dark);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact a {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-contact a:hover {
    color: var(--primary-dark);
}

.footer-bottom {
    text-align: center;
    padding: 30px 0;
    margin-top: 30px;
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
}

/* ===========================
   Floating CTA Button
   =========================== */
.floating-cta {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    opacity: 1;
    visibility: visible;
    transition: var(--transition-base);
}

.floating-cta.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.floating-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--bg-white);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    transition: var(--transition-base);
    animation: pulse 2s infinite;
}

.floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.5);
    animation: none;
}

.floating-btn i {
    font-size: 1.25rem;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(37, 99, 235, 0.6);
    }
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 992px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        flex-direction: column;
        gap: 0;
        padding: 20px 0;
        box-shadow: var(--shadow-lg);
        transform: translateX(100%);
        transition: var(--transition-base);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-link {
        padding: 15px 30px;
        width: 100%;
        display: block;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

@media (max-width: 768px) {
    section {
        padding: var(--section-padding-mobile);
    }
    
    .hero {
        padding: 140px 0 80px;
    }
    
    .hero-title {
        font-size: 1.875rem;
    }
    
    .hero-subtitle,
    .hero-message {
        font-size: 1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid,
    .why-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .floating-cta {
        bottom: 20px;
        right: 20px;
        left: 20px;
    }
    
    .floating-btn {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .service-card,
    .why-card,
    .contact-card {
        padding: 30px 20px;
    }
    
    .btn {
        padding: 14px 24px;
        font-size: 0.9375rem;
    }
    
    .floating-btn {
        font-size: 0.9375rem;
        padding: 14px 20px;
    }
}

/* ===========================
   Accessibility
   =========================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    .header,
    .floating-cta,
    .nav-toggle {
        display: none !important;
    }
    
    .hero {
        margin-top: 0;
    }
    
    * {
        box-shadow: none !important;
    }
}