/* Variables */
:root {
    --primary-color: #0056b3; /* 퍼스널컬러 푸른색 */
    --text-color: #333333;
    --text-light: #666666;
    --bg-color: #ffffff;
    --bg-light: #f8f9fa;
    --border-color: #e2e8f0;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.text-center { text-align: center; }
.text-white { color: #ffffff !important; }
.bg-light { background-color: var(--bg-light); }
.bg-primary { background-color: var(--primary-color); }

/* Header */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    height: 80px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.gnb ul {
    display: flex;
    gap: 30px;
}

.gnb a {
    font-weight: 500;
    transition: color 0.3s ease;
}

.gnb a:hover {
    color: var(--primary-color);
}

/* Hero Section (Rolling Banner) */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    margin-top: 80px; /* 헤더 높이만큼 띄움 */
    overflow: hidden;
    background-color: var(--primary-color);
}

.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4); /* 이미지 위의 글씨가 잘 보이도록 어둡게 처리 */
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    width: 100%;
    padding: 0 20px;
}

.slide-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.slide-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    font-size: 2rem;
    padding: 15px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.slider-btn:hover { background: var(--primary-color); }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }

/* Grid Layout (Same Height Elements) */
.grid-layout {
    display: grid;
    gap: 30px;
}
.cols-3 { grid-template-columns: repeat(3, 1fr); }

.card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column; /* 카드의 높이를 일정하게 맞추기 위한 Flex 설정 */
    height: 100%; 
}

/* About Section */
.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
}
.about-text, .about-image { flex: 1; }
.about-text h4 { font-size: 1.5rem; margin-bottom: 20px; }
.about-text p { color: var(--text-light); }
.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Services Section */
.service-card {
    padding: 40px 30px;
    border-top: 4px solid var(--primary-color);
}
.service-card h4 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}
.service-card p {
    color: var(--text-light);
    flex-grow: 1; /* 남은 공간을 채워 동일한 높이 유지 */
}

/* Portfolio Section */
.portfolio-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}
.portfolio-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.portfolio-info h5 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}
.portfolio-info p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Footer */
#footer {
    background-color: #f8f9fa;
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

.copyright {
    text-align: center;
    color: var(--text-light);
    font-size: 0.85rem;
    width: 100%;
}

/* Scroll To Top Button */
#scrollTopBtn {
    display: none; /* JS로 제어 */
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: opacity 0.3s;
}

#scrollTopBtn:hover {
    background-color: #003d82;
}

/* Responsive Design */
@media (max-width: 992px) {
    .cols-3 { grid-template-columns: repeat(2, 1fr); }
    .about-container { flex-direction: column; }
    .slide-content h2 { font-size: 2.2rem; }
}

@media (max-width: 768px) {
    .cols-3 { grid-template-columns: 1fr; }
    .header-container { flex-direction: column; justify-content: center; gap: 10px; }
    .gnb ul { gap: 15px; font-size: 0.9rem; }
    #header { height: auto; padding: 15px 0; }
    .hero-section { margin-top: 100px; }
    .footer-info { flex-direction: column; align-items: center; gap: 8px; }
}