/* ========================================
   모바일 우선 반응형 디자인
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    /* 법무사 전문성을 나타내는 색상 */
    --primary-color: #1a3a52;      /* 진한 네이비 - 신뢰성 */
    --secondary-color: #2c5aa0;    /* 파란색 - 전문성 */
    --accent-color: #d4af37;       /* 금색 - 고급스러움 */
    --text-dark: #2c3e50;          /* 다크 그레이 */
    --text-light: #7f8c8d;         /* 라이트 그레이 */
    --bg-light: #f8f9fa;           /* 라이트 배경 */
    --bg-white: #ffffff;
    --border-color: #ecf0f1;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', 'Noto Sans CJK KR', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ========================================
   헤더 스타일
   ======================================== */

.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 8px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    text-decoration: none;
    color: white;
}

.logo-badge {
    height: 80px;
    width: auto;
    display: inline-block;
    object-fit: contain;
}

.logo-name {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 12px;
    font-weight: 300;
    opacity: 0.9;
    margin-top: 2px;
}

.phone-icon {
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
}

.phone-icon:active {
    transform: scale(0.95);
}

/* ========================================
   헤더 CTA 버튼
   ======================================== */

.btn-header-cta {
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    white-space: nowrap;
}

.btn-header-cta:active {
    transform: translateY(2px);
    box-shadow: 0 1px 4px rgba(212, 175, 55, 0.2);
}

@media (hover: hover) {
    .btn-header-cta:hover {
        background-color: #f0c44e;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
    }
}

/* ========================================
   히어로 섹션
   ======================================== */

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 히어로 배경 이미지 */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* 히어로 오버레이 */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 58, 82, 0.7) 0%, rgba(44, 90, 160, 0.7) 100%);
    z-index: 2;
}

/* 히어로 컨테이너 */
.hero .container {
    position: relative;
    z-index: 3;
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.3;
}

/* ========================================
   움직이는 제목 (애니메이션)
   ======================================== */

@keyframes floatTitleAnimation {
    0% {
        transform: translateY(0);
        opacity: 0.9;
    }
    50% {
        transform: translateY(-8px);
        opacity: 1;
    }
    100% {
        transform: translateY(0);
        opacity: 0.9;
    }
}

.animated-title {
    animation: floatTitleAnimation 3s ease-in-out infinite;
    display: inline-block;
}

.hero-subtitle {
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 32px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ========================================
   버튼 스타일
   ======================================== */

.btn {
    display: inline-block;
    padding: 14px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:active {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(2px);
}

.btn-submit {
    width: 100%;
    padding: 16px;
    font-size: 16px;
}

/* ========================================
   섹션 공통 스타일
   ======================================== */

section {
    padding: 48px 0;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    color: var(--primary-color);
    text-align: center;
    position: relative;
    padding-bottom: 16px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    border-radius: 2px;
}

/* ========================================
   서비스 섹션
   ======================================== */

.services {
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.service-card {
    background: white;
    padding: 28px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:active {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.service-card h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.service-card p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
}

/* ========================================
   특징 섹션
   ======================================== */

.features {
    background: white;
}

.features-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.feature-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background-color: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    transition: all 0.3s ease;
}

.feature-item:active {
    background-color: #f0f3f7;
    transform: translateX(4px);
}

.feature-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-color);
    flex-shrink: 0;
}

.feature-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.feature-content p {
    font-size: 15px;
    color: var(--text-light);
}

/* ========================================
   자격증 섹션
   ======================================== */

.credentials {
    background: linear-gradient(135deg, #f8f9fa 0%, #ecf0f1 100%);
}

.credential-box {
    background: white;
    padding: 32px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border-top: 4px solid var(--secondary-color);
}

.credential-box h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.credential-box p {
    font-size: 15px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.credential-box strong {
    color: var(--secondary-color);
}

.credential-text {
    font-size: 16px;
    font-style: italic;
    color: var(--text-light);
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* ========================================
   연락처 섹션
   ======================================== */

.contact-section {
    background: white;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

.contact-info {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 28px 24px;
    border-radius: 12px;
}

.contact-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.info-label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 16px;
}

.info-item a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 18px;
    font-weight: 600;
}

.contact-note {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 15px;
    opacity: 0.95;
}

/* ========================================
   폼 스타일
   ======================================== */

.contact-form-wrapper {
    background: var(--bg-light);
    padding: 28px 24px;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-size: 15px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    color: var(--text-dark);
    background-color: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232c5aa0' d='M1 4l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ========================================
   푸터
   ======================================== */

.footer {
    background: var(--primary-color);
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent-color);
}

.footer-section p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 14px;
    opacity: 0.8;
}

/* ========================================
   태블릿 이상 (768px)
   ======================================== */

@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }

    .header-content {
        gap: 24px;
    }

    .hero {
        padding: 80px 0 60px;
    }

    .hero-title {
        font-size: 42px;
    }

    .hero-subtitle {
        font-size: 20px;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .btn {
        min-width: 200px;
    }

    section {
        padding: 64px 0;
    }

    .section-title {
        font-size: 36px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .features-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
        padding: 0 24px;
    }

    .contact-content {
        grid-template-columns: 1fr 1fr;
    }

    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   데스크톱 (1024px)
   ======================================== */

@media (min-width: 1024px) {
    .container {
        padding: 0 32px;
    }

    .hero {
        padding: 100px 0 80px;
    }

    .hero-title {
        font-size: 48px;
    }

    .hero-subtitle {
        font-size: 22px;
    }

    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
    }

    .features-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .section-title {
        font-size: 40px;
    }

    .btn {
        padding: 16px 32px;
        font-size: 18px;
    }
}

/* ========================================
   동작 및 애니메이션
   ======================================== */

@media (hover: hover) {
    .service-card {
        cursor: pointer;
    }

    .service-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--shadow-lg);
    }

    .btn-primary:hover {
        background-color: #e6a932;
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    .btn-secondary:hover {
        background-color: rgba(255, 255, 255, 0.3);
        transform: translateY(-2px);
    }

    .phone-icon:hover {
        transform: scale(1.1);
    }

    .feature-item:hover {
        background-color: #f0f3f7;
        transform: translateX(8px);
    }

    .info-item a:hover {
        opacity: 0.8;
        text-decoration: underline;
    }
}

/* ========================================
   인쇄 스타일
   ======================================== */

@media print {
    .hero-buttons,
    .contact-form-wrapper {
        display: none;
    }

    .header {
        position: static;
    }
}
