:root {
    --primary-color: #FF6B35;
    --secondary-color: #F7931E;
    --dark-bg: #1a1a1a;
    --light-bg: #f8f9fa;
    --text-dark: #333;
    --text-light: #555; /* #666에서 #555로 변경 - 더 어둡게 */
    --text-white: #fff;
    --footer-text: #e0e0e0; /* footer 텍스트용 더 밝은 색상 */
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 10px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    padding: 0.8rem 0;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    transform: translateZ(0);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 25px -5px rgba(255, 107, 53, 0.4);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    height: 100vh;
    padding-top: 80px;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FF4500 100%);
    color: var(--text-white);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="1000" height="1000" fill="url(%23grid)"/></svg>');
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    from { transform: translate(0, 0); }
    to { transform: translate(50px, 50px); }
}

.hero-content {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    padding-left: 2rem;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    font-weight: 900;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: slideInLeft 1s ease 0.3s forwards;
    word-break: keep-all;
}

.hero .subtitle {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
    opacity: 0;
    animation: slideInLeft 1s ease 0.6s forwards;
    word-break: keep-all;
}

.hero .subtitle-2 {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    font-weight: 300;
    opacity: 0;
    animation: slideInLeft 1s ease 0.8s forwards;
    word-break: keep-all;
    line-height: 1.5;
}

.hero .subtitle-2 strong {
    font-weight: 600;
    color: #FFE4D6;
}

.hero-visual {
    position: relative;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
}

.floating-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
    animation: float 6s ease-in-out infinite;
    border: 2px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

.floating-element:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.floating-element:nth-child(2) { top: 20%; right: 5%; animation-delay: 2s; }
.floating-element:nth-child(3) { bottom: 20%; left: 20%; animation-delay: 4s; }
.floating-element:nth-child(4) { bottom: 10%; right: 10%; animation-delay: 1s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    opacity: 0;
    animation: slideInLeft 1s ease 1.1s forwards;
}

.cta-primary, .cta-secondary {
    padding: 1.2rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-primary {
    background: var(--text-white);
    color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cta-secondary {
    background: transparent;
    color: var(--text-white);
    border: 3px solid var(--text-white); /* 더 굵은 테두리로 대비 개선 */
}

.cta-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cta-secondary:hover {
    background: var(--text-white);
    color: var(--primary-color);
    transform: translateY(-5px);
}

/* Section Default Styles */
section {
    padding: 6rem 0;
    overflow: hidden;
}

section:not(.hero) {
    padding-top: 120px;
}

/* Stats Section */
.stats {
    background: var(--dark-bg);
    color: var(--text-white);
    padding-top: 120px;
    padding-bottom: 4rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 107, 53, 0.1);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Section Header Styles */
.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.5rem;
    color: var(--text-light);
    font-weight: 400; /* 300에서 400으로 변경 */
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.service-card {
    background: var(--text-white);
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--text-white);
    flex-shrink: 0;
}

.service-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
    color: var(--text-light);
}

.service-features {
    list-style: none;
    margin-top: auto;
    padding-top: 1rem;
}

.service-features li {
    padding: 0.4rem 0;
    position: relative;
    padding-left: 2rem;
    color: var(--text-light);
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Portfolio Preview */
.portfolio-preview {
    background: var(--dark-bg);
    color: var(--text-white);
}

.portfolio-preview .section-title { 
    color: var(--text-white); 
}

.portfolio-preview .section-subtitle { 
    color: #e0e0e0; /* #ccc에서 더 밝게 변경 */
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.portfolio-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    /* 고정된 높이 비율 설정 */
    aspect-ratio: 4 / 3;
    min-height: 300px;
}

.portfolio-item:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px -5px rgba(255, 107, 53, 0.5);
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.portfolio-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-placeholder img {
    transform: scale(1.1);
}

.portfolio-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-content {
    transform: translateY(0);
}

.portfolio-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: white;
    font-weight: 600;
}

.portfolio-content p {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #e0e0e0; /* #ddd에서 더 밝게 변경 */
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.about-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.achievement-sections {
    margin-top: 3rem;
    text-align: left;
}

.achievement-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 15px;
    border-left: 4px solid var(--primary-color);
}

.achievement-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.achievement-list {
    list-style: none;
}

.achievement-list li {
    padding: 0.6rem 0;
    position: relative;
    padding-left: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-light);
}

.achievement-list li:last-child { 
    border-bottom: none; 
}

.achievement-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* FAQ Section */
.faq-categories {
    display: grid;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.faq-category {
    background: var(--text-white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.faq-category-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid rgba(255, 107, 53, 0.1);
}

.faq-category-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.faq-category-title {
    color: var(--text-dark);
}

.faq-questions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-question {
    width: 100%;
    padding: 1.5rem 2rem;
    background: none;
    border: 1px solid #ddd; /* #eee에서 더 어둡게 변경 */
    border-radius: 12px;
    text-align: left;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.faq-question:hover {
    background: rgba(255, 107, 53, 0.05);
    border-color: rgba(255, 107, 53, 0.5);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 2rem;
}

.faq-answer.active {
    max-height: 500px;
    padding: 1.5rem 2rem;
}

.faq-answer p {
    border-top: 1px solid #ddd; /* #eee에서 더 어둡게 변경 */
    padding-top: 1.5rem;
    color: var(--text-light);
}

/* Contact Section */
.contact {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FF4500 100%);
    color: var(--text-white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.contact-text h2 {
    font-size: 3.5rem;
}

.contact-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
}

.contact-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    background: var(--text-white);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon.kakao {
    background: #FFEB00;
    padding: 12px; /* 패딩 늘려서 이미지 크기 조절 */
}

.contact-icon.kakao img {
    width: 24px; /* 고정 크기로 설정 */
    height: 24px; /* 고정 크기로 설정 */
    object-fit: contain;
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 25px;
}

.contact-form h3 {
    color: var(--text-white);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-white);
    font-weight: 500;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    color: var(--text-dark);
    background: rgba(255, 255, 255, 0.9);
}

.form-group textarea {
    min-height: 120px;
}

.form-group input.invalid {
    border: 2px solid #ffdddd;
}

.privacy-group {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-top: 1.5rem;
}

.privacy-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 5px;
}

.privacy-text {
    color: var(--text-white);
    line-height: 1.4;
}

.privacy-link {
    text-decoration: underline;
    cursor: pointer;
    color: #FFE4D6; /* 더 밝은 색상으로 대비 개선 */
}

.submit-btn {
    width: 100%;
    padding: 1.2rem;
    background: var(--text-white);
    color: var(--primary-color);
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1rem;
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    color: #666;
}

/* Footer */
footer {
    background: var(--dark-bg);
    color: var(--footer-text); /* 더 밝은 색상 사용 */
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--text-white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-section p {
    color: var(--footer-text);
    line-height: 1.5;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
}

.footer-bottom p {
    color: var(--footer-text);
}

.btn-link-style {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: var(--footer-text);
    cursor: pointer;
    border-bottom: 1px dashed var(--footer-text);
    transition: color 0.3s ease;
}

.btn-link-style:hover {
    color: var(--primary-color);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    overflow-y: auto; /* 모달 자체에 스크롤 추가 */
    padding: 20px 0; /* 상하 여백 추가 */
}

.modal-content {
    background-color: #fefefe;
    margin: 0 auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 700px;
    border-radius: 10px;
    position: relative;
    max-height: 90vh; /* 최대 높이 설정 */
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px 20px 15px 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0; /* 헤더 크기 고정 */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: var(--text-dark);
    margin: 0;
    font-size: 1.5rem;
}

.modal-body {
    color: var(--text-dark);
    padding: 20px;
    overflow-y: auto; /* 본문에 스크롤 추가 */
    flex: 1; /* 남은 공간 모두 사용 */
}

.modal-body h3 {
    color: var(--text-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.modal-body p, .modal-body li {
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.modal-body ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.close {
    color: #666; /* #aaa에서 더 어둡게 변경 */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
}

.close:hover {
    color: var(--text-dark);
}

/* Contact info styles */
.contact-info-hidden {
    display: none;
}

.contact-info-visible {
    display: block;
}

.contact-reveal-btn {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.contact-reveal-btn:hover {
    background: var(--text-white);
}

/* Privacy table styles */
.privacy-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.privacy-table th,
.privacy-table td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: left;
}

.privacy-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: var(--text-dark);
}

.privacy-table td {
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 992px) {
    .nav-links { 
        display: none; 
    }
    
    .stats-grid { 
        grid-template-columns: repeat(2, 1fr); 
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .portfolio-item {
        min-height: 250px;
    }
    
    .services-grid, .contact-content, .footer-content { 
        grid-template-columns: 1fr; 
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal {
        padding: 10px 0;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .close {
        font-size: 24px;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .portfolio-item {
        min-height: 200px;
    }
    
    .portfolio-content {
        padding: 1rem;
    }
    
    .portfolio-content h3 {
        font-size: 1.1rem;
    }
    
    .portfolio-content p {
        font-size: 0.85rem;
    }
}