/* --- Global & Typography --- */
body {
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #ffffff;
    line-height: 1.8;
    overflow-x: hidden; /* Hide horizontal scrollbar from animations */
    display: flex; /* Make body a flex container */
    flex-direction: column; /* Stack children vertically */
    min-height: 100vh; /* Ensure body takes at least full viewport height */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
}

main {
    padding-top: 70px; /* Offset for fixed header */
}

.content-section {
    padding: 6rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.content-section h2 {
    font-size: 2.8rem;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #a3856d;
}

/* --- Header --- */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    padding: 0 2rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

#header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

#header .logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
}

#header ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

#header ul li {
    margin-left: 2.5rem;
}

#header ul li a {
    font-weight: 400;
    font-size: 1rem;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

#header ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: #a3856d;
    transition: width 0.4s ease;
}

#header ul li a:hover::after,
#header ul li a.active::after {
    width: 100%;
}

#header ul li a:hover,
#header ul li a.active {
    color: #a3856d;
}

/* --- Footer --- */
#footer {
    background-color: #222;
    color: #ccc;
    padding: 3rem 2rem; /* Reduced padding */
    font-size: 0.85rem; /* Slightly smaller base font size */
    margin-top: auto; /* Push footer to the bottom */
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 2rem; /* Reduced gap */
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 2rem; /* Reduced padding */
}

.footer-col h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem; /* Smaller font size */
    color: #fff;
    margin-bottom: 0.8rem;
}

.footer-col h4 {
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 1rem; /* Smaller font size */
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem; /* Reduced margin */
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col p {
    line-height: 1.7; /* Slightly reduced line height */
    margin-bottom: 0.8rem; /* Reduced margin */
}

.footer-col ul li {
    margin-bottom: 0.6rem; /* Reduced margin */
}

#footer .social-links { 
    margin-top: 1rem;
    display: flex; /* Use flexbox for horizontal alignment */
    justify-content: center; /* Center the icons if needed */
    gap: 0.8rem; /* Increased space between buttons */
}

#footer .social-links a {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid #a3856d;
    border-radius: 20px;
    color: #a3856d;
    font-size: 0.8rem;
    transition: background-color 0.3s, color 0.3s, transform 0.3s;
    text-transform: uppercase;
    font-weight: 700;
    background-color: transparent;
}

#footer .social-links a:hover {
    background-color: #a3856d;
    transform: translateY(-2px);
    color: white;
}
.footer-bottom {
    border-top: 1px solid #444;
    text-align: center;
    padding: 1rem 0; /* Reduced padding */
}

.footer-bottom p {
    margin: 0;
    font-size: 0.75rem; /* Smaller font size */
    color: #aaa;
}


/* --- Home Page --- */
.parallax-section {
    height: 100vh;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
}
.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}
#home .hero-text { z-index: 1; }
#home h1 { font-size: 6rem; margin: 0; letter-spacing: 2px; }
#home p { font-size: 1.5rem; font-weight: 300; }

.intro-section { padding: 5rem 2rem; }

.cta-button {
    display: inline-block;
    background-color: #a3856d;
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-weight: 700;
    margin-top: 1rem;
    transition: background-color 0.3s, transform 0.3s;
}
.cta-button:hover { background-color: #8a6d58; transform: translateY(-3px); }


/* --- Generic Page Header --- */
.page-header {
    padding: 6rem 2rem;
    background-color: #f4f4f4;
    text-align: center;
}
.page-header h1 { font-size: 3.5rem; margin: 0; }
.page-header p { font-size: 1.2rem; color: #666; margin-top: 0.5rem; }


/* --- About Page --- */
.about-values-section, .about-services-section {
    padding: 6rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.about-values-section {
    background-color: #f9f9f9;
}

.about-services-section {
    background-color: #f4f4f4;
}

#about .ceo-message {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 3rem;
    margin-top: 4rem;
}
#about .ceo-message img {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}
#about .ceo-message p { font-size: 1rem; font-weight: 300; }

/* About Page Overrides for spacing */
.about-page .page-header,
.about-page .content-section,
.about-page .about-values-section,
.about-page .about-services-section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.about-page #about .ceo-message,
.about-page .values-grid,
.about-page .services-grid {
    margin-top: 3rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    text-align: left;
}
.value-item h3 { font-size: 1.5rem; color: #a3856d; }
.value-item p { font-size: 0.95rem; }

.services-grid h2 {
    text-align: center;
    margin-bottom: 20px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    text-align: center;
}

.service-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #eee;
    overflow: hidden;
    text-align: center;
    font-size: 13px;
    display: flex;
    flex-direction: column;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.service-item img {
    width: 100%;
    height: 180px; /* Increased height for better proportion */
    object-fit: cover;
}

.service-item-text-wrapper {
    padding: 1.5rem;
    background-color: white;
    flex-grow: 1; /* Ensure text wrapper fills space */
    border-top: 1px solid #eee; /* Add a separator line */
}

.service-item h3 {
    font-size: 1.1rem; /* Slightly larger font */
    margin: 0 0 0.5rem 0;
}

.service-item p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #666;
    padding: 0; /* Remove old padding */
    margin: 0;
}



/* --- Portfolio Page --- */

.gallery-link-wrapper {
    display: block;
    color: inherit;
    text-decoration: none;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1400px;
}
.gallery-item-large {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    background: #000;
    display: block; /* Ensure items are visible by default */
}
.gallery-item-large img {
    width: 100%;
    height: 250px; /* Set a fixed height for consistent block size */
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.gallery-item-large:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}
.gallery-item-large:hover img {
    transform: scale(1.05);
    opacity: 0.5;
}
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    color: white;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    box-sizing: border-box;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}
.gallery-item-large:hover .gallery-caption {
    transform: translateY(0);
}
.gallery-caption h3 { margin: 0; font-size: 1.6rem; }
.gallery-caption p { margin: 0.2rem 0 0; font-family: 'Noto Sans KR', sans-serif; opacity: 0.9; }

/* Pagination */
.pagination {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}
.page-link {
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    color: #333;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s, color 0.3s;
}
.page-link:hover {
    background-color: #f4f4f4;
}
.page-link.active {
    background-color: #a3856d;
    color: white;
    border-color: #a3856d;
}
.page-link.disabled {
    color: #aaa;
    pointer-events: none;
    background-color: #f9f9f9;
}


/* --- Location Page --- */
.contact-info {
    text-align: left;
    max-width: 600px;
    margin: 3rem auto 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.contact-info p { margin: 0.5rem 0; font-size: 1.1rem; }





/* --- Animations --- */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* --- Responsive --- */

/* Styles for devices larger than 768px (tablets and desktops) */
@media (min-width: 769px) {
    .nav-toggle {
        display: none; /* Hide hamburger on desktop */
    }
    .nav-links {
        display: block !important;
    }
}

/* Styles for devices up to 768px (tablets and phones) */
@media (max-width: 768px) {
    main {
        padding-top: 70px; /* Reset padding for mobile */
    }

    #header nav {
        justify-content: space-between;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%; /* Start off-screen */
        width: 80%;
        height: 100vh;
        background-color: #ffffff;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.4s ease-in-out;
        z-index: 1001; /* Above header */
    }

    .nav-links.nav-open {
        left: 0; /* Slide in */
    }

    .nav-links ul {
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
    }

    #header ul li {
        margin: 0;
    }

    #header ul li a {
        font-size: 1.5rem;
    }

    .nav-toggle {
        display: block;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 1002; /* Above everything */
        position: relative;
    }

    .nav-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background-color: #333;
        margin: 5px 0;
        transition: transform 0.3s, opacity 0.3s;
    }

    .nav-open .nav-toggle span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-open .nav-toggle span:nth-child(2) {
        opacity: 0;
    }

    .nav-open .nav-toggle span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    #home h1 { font-size: 3.5rem; }
    #home p { font-size: 1.2rem; }

    .content-section { padding: 4rem 1.5rem; }
    .content-section h2 { font-size: 2.2rem; }

    #about .ceo-message { flex-direction: column; gap: 2rem; }
    #about .ceo-message img { width: 200px; height: 200px; }
    
    .values-grid { grid-template-columns: 1fr; }

    .services-grid { grid-template-columns: repeat(2, 1fr); }
    
    .gallery-grid { grid-template-columns: 1fr; }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* --- Custom Cursor --- */
body, a, button {
    cursor: none;
}

.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease-in-out, transform 0.2s ease-in-out;
    z-index: 9999;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: #a3856d;
    transition: transform 0.2s ease-in-out;
}

.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid #a3856d;
    background-color: transparent;
    transition: transform 0.3s ease-in-out, width 0.3s, height 0.3s, border-color 0.3s;
}

.cursor-hover {
    transform: scale(1.5);
}

.link-hover .cursor-outline {
    width: 60px;
    height: 60px;
    border-color: #8a6d58;
}
