/* Font Import: Pretendard for superior professionalism and trustworthiness */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.min.css');

/* Global Variables */
:root {
    --primary-color: #003366;
    /* Deep Navy based on typical corporate/legal colors */
    --secondary-color: #f4f4f4;
    --text-color: #333;
    --light-text: #666;
    --border-color: #ddd;
    --white: #ffffff;
    --max-width: 1500px;
    /* Increased from 1200px */
    --header-height: 90px;
    /* Slightly taller header for better balance */
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-size: 18px;
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
}

body {
    font-family: 'Pretendard Variable', Pretendard, sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background-color: var(--white);
    font-weight: 400;
    /* Default weight */
}

ul,
ol {
    list-style: none;
}

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

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

/* Layout Utilities */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 30px;
    /* Increased padding */
}

/* Header Styles */
#header-container {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    /* Subtle border instead of shadow */
    transition: all 0.3s ease;
    height: var(--header-height);
    overflow: visible;
    /* Allow dropdown to burst out */
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    position: relative;
}

.logo a {
    font-size: 26px;
    /* Slightly larger */
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.logo img {
    height: 45px;
    margin-right: 12px;
}

/* GNB & Mega Menu */
.nav-container {
    height: 100%;
}

.gnb {
    display: flex;
    gap: 0;
    height: 100%;
}

.gnb>li {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    /* For submenu positioning */
}

.gnb>li>a {
    font-size: 18px;
    font-weight: 500;
    /* Reduced from 600/700 for elegance */
    padding: 0 35px;
    /* Wider hit area */
    display: flex;
    align-items: center;
    color: #333;
    height: 100%;
    transition: color 0.2s;
    position: relative;
}

.gnb>li:hover>a {
    color: var(--primary-color);
    background: #f8f9fa;
    /* Subtle highlight on hover */
}

/* GNB & Full Dropdown Logic */
.nav-container {
    height: 100%;
}

/* Dropdown Background (The White Sheet) */
.dropdown-bg {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: 0;
    background: white;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    border-top: 1px solid #eee;
    /* Separator line */
    transition: height 0.3s ease;
    overflow: hidden;
    z-index: 990;
    /* Behind menu items, above page */
}

/* Reveal Background on GNB Hover */
#header-container:hover .dropdown-bg {
    height: 280px;
    /* Fixed height for submenu area */
}

/* Submenu Styling */
.mega-menu {
    position: absolute;
    top: var(--header-height);
    /* Starts exactly below header */
    left: 0;
    width: 100%;
    /* Match Parent width */
    height: 0;
    /* Hidden by default */
    overflow: hidden;
    /* Hide content */
    padding-top: 0;
    transition: all 0.3s ease;
    /* Animate with BG? No, just appear */
    z-index: 1001;
    /* Above background */
    display: block;
    /* Always strictly present but hidden by height */
    background: transparent;
    /* Transparent, relies on dropdown-bg */
    border: none;
    box-shadow: none;
    text-align: center;
}

/* Show Submenus on GNB Hover */
#header-container:hover .mega-menu {
    height: 280px;
    /* Expands with the background */
    padding-top: 20px;
    opacity: 1;
}

.mega-menu ul {
    width: 100%;
}

.mega-menu li {
    display: block;
    margin-bottom: 8px;
}

.mega-menu li a {
    display: block;
    padding: 5px 0;
    font-size: 15px;
    color: #666;
    transition: all 0.2s;
    font-weight: 400;
}

.mega-menu li a:hover {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: underline;
    background: none;
}

/* Full Menu Trigger (Grid Icon) */
#full-menu-trigger {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 8px;
}

#full-menu-trigger span {
    width: 6px;
    height: 6px;
    background-color: #333;
    border-radius: 1px;
    display: block;
}

#full-menu-trigger:hover span {
    background-color: var(--primary-color);
}


/* Full Screen Menu Overlay */
#full-menu-overlay {
    position: fixed;
    top: -100%;
    /* Hidden by default (slide down) */
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 2000;
    transition: top 0.4s ease-in-out;
    overflow-y: auto;
}

#full-menu-overlay.active {
    top: 0;
}

.full-menu-container {
    padding-top: 40px;
    padding-bottom: 60px;
}

.full-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    padding-bottom: 20px;
    border-bottom: 2px solid #333;
}

.full-menu-logo {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
}

#full-menu-close {
    font-size: 40px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    line-height: 1;
}

.full-menu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 40px;
}

.full-menu-col h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.full-menu-col ul li {
    margin-bottom: 15px;
}

.full-menu-col ul li a {
    font-size: 16px;
    color: #666;
    transition: color 0.2s;
}

.full-menu-col ul li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Footer Styles */
#footer-container {
    background: #1a1a1a;
    /* Darker, more premium background */
    color: #bbb;
    padding: 100px 0 60px;
    /* Increased height */
    margin-top: 150px;
    font-size: 16px;
    font-weight: 300;
    /* Lighter font weight */
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 60px;
    margin-bottom: 80px;
}

.footer-col h3 {
    color: #fff;
    font-size: 24px;
    font-weight: 500;
    margin-bottom: 20px;
}

.footer-col h4 {
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 25px;
}

.footer-col p {
    line-height: 1.8;
    margin-bottom: 10px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #888;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    padding-top: 40px;
    border-top: 1px solid #333;
    text-align: center;
    /* Center horizontally */
}

.copyright {
    font-size: 14px;
    color: #666;
    font-weight: 300;
}

/* Layout Utilities */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 50px;
    /* Increased from 30px */
}

/* Hero Section (Common) */
.hero {
    height: 600px;
    background-color: #ccc;
    /* Placeholder */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
    margin-top: var(--header-height);
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
}

/* Sub Layout Styles - UPSCALED */
.sub-banner {
    background-color: var(--primary-color);
    height: 400px;
    /* Increased from 300px */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-top: var(--header-height);
}

.sub-banner h2 {
    font-size: 48px;
    /* Balanced banner text (down from 64px) */
    font-weight: 700;
}

.sub-container {
    display: flex;
    max-width: var(--max-width);
    margin: 120px auto;
    /* Increased vertical space from 80px */
    padding: 0 50px;
    gap: 100px;
    /* Significantly increased gap from 60px */
}

.snb {
    width: 350px;
    /* Balanced with wider container (was 300px) */
    flex-shrink: 0;
}

.snb h3 {
    font-size: 28px;
    /* Refined SNB title (down from 34px) */
    margin-bottom: 30px;
    border-bottom: 4px solid #333;
    /* Thicker border */
    padding-bottom: 15px;
}

.snb ul li {
    border-bottom: 1px solid #ddd;
}

.snb ul li a {
    display: block;
    padding: 20px 15px;
    /* Spatter padding but lower font */
    font-size: 18px;
    transition: background 0.2s;
}

.snb ul li a:hover,
.snb ul li a.active {
    background: #f9f9f9;
    font-weight: 700;
    color: var(--primary-color);
}

.content-area {
    flex-grow: 1;
}

.content-title {
    font-size: 42px;
    /* Refined content title (down from 56px) */
    margin-bottom: 50px;
    padding-bottom: 25px;
    border-bottom: 3px solid #ddd;
    color: #333;
    font-weight: 700;
    /* Adjusted from 800 */
}

.content-body p,
.content-body li {
    font-size: 18px;
    /* Standardizing body text (down from 20px) */
    padding-bottom: 15px;
}

.content-body h4 {
    font-size: 28px;
    /* Subheadings refined (down from 36px) */
    margin-top: 50px;
    margin-bottom: 25px;
}

.content-body h5 {
    font-size: 22px;
}

/* --- Main Page Refinements (Upscaled) --- */

/* Hero Enhancement */
.hero {
    height: 90vh;
    /* Taller hero */
    min-height: 700px;
    background-attachment: fixed;
    /* Parallax feel */
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 51, 102, 0.8), rgba(0, 0, 0, 0.4));
    /* Refined Gradient */
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease-out;
}

.hero h2 {
    font-size: 4rem;
    /* Balanced headline (down from 5.5rem) */
    font-weight: 700;
    /* Adjusted from 800 */
    letter-spacing: -1.5px;
    margin-bottom: 30px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.hero p {
    font-size: 1.4rem;
    /* Down from 1.8rem */
    font-weight: 300;
    margin-bottom: 60px;
    opacity: 0.9;
}

.btn-cta {
    display: inline-block;
    padding: 20px 50px;
    /* Larger button */
    font-size: 1.2rem;
    background-color: var(--white);
    color: var(--primary-color);
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-cta:hover {
    background-color: transparent;
    border-color: var(--white);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Layout Sections */
.section {
    padding: 180px 0;
    /* Significantly increased for better spacing */
}

/* Service Section Enhancement */
.section-header {
    text-align: center;
    margin-bottom: 100px;
    /* Increased spacing */
    position: relative;
    padding: 0 20px;
}

.section-header h3 {
    font-size: 3.5rem;
    color: #1a1a1a;
    margin-bottom: 25px;
    font-weight: 700;
    /* Adjusted from 800 for elegance */
    letter-spacing: -2px;
    position: relative;
    display: block;
    text-transform: uppercase;
}

/* Elegant Split-line Accent */
.section-header h3::before,
.section-header h3::after {
    content: '';
    display: inline-block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    vertical-align: middle;
    margin: 0 25px;
    border-radius: 2px;
}

.section-header p {
    color: #555;
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: -0.5px;
    word-break: keep-all;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

.service-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 60px;
    flex-wrap: wrap;
    /* For responsiveness */
}

.service-card {
    background: white;
    width: 420px;
    height: 420px;
    padding: 40px;
    border-radius: 50%;
    border: 1px solid #eee;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    cursor: default;
    z-index: 1;
    animation: floatingCard 6s ease-in-out infinite;
    /* Continuous floating animation */
}

/* Base style for the card */
.service-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.service-card::before {
    display: none;
    /* Hide old bar */
}

/* Permanent Premium Animation: Rotating Border Glow */
.service-card::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), #00aaff, #eef7ff, var(--primary-color));
    z-index: -1;
    opacity: 0.3;
    /* visible by default */
    filter: blur(10px);
    animation: rotateGlow 5s linear infinite;
}

@keyframes floatingCard {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

@keyframes rotateGlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes rotateGlow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.service-card h4 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.service-card p {
    color: #666;
    line-height: 1.7;
    font-size: 1rem;
    word-break: keep-all;
    padding: 0 10%;
}

/* Practice Areas Enhancement - IMAGE CARDS */
.practice-areas {
    background: #f8f9fa;
}

.practice-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.practice-item {
    background: white;
    padding: 0;
    /* Remove padding for full-bleed image */
    text-align: center;
    border-radius: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    /* For image clipping */
    position: relative;
    height: 600px;
    /* Tall cards */
    display: flex;
    flex-direction: column;
}

.practice-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.practice-image {
    width: 100%;
    height: 70%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.practice-item:hover .practice-image {
    transform: scale(1.05);
}

.practice-info {
    padding: 30px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: white;
    z-index: 1;
    position: relative;
}

.practice-info h4 {
    font-size: 1.6rem;
    /* Refined (down from 2rem) */
    margin-bottom: 10px;
    font-weight: 700;
    color: #222;
}

.practice-info p {
    font-size: 1rem;
    color: #777;
    margin: 0;
}

/* Contact Section Enhancement */
.contact-map {
    background: white;
}

.contact-map .container {
    gap: 80px;
}

.contact-box {
    background: var(--primary-color);
    color: white;
    padding: 100px;
    /* Larger padding */
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 30px 60px rgba(0, 51, 102, 0.25);
}

.contact-box h3 {
    font-size: 3rem;
    /* Refined (down from 4rem) */
    margin-bottom: 30px;
}

.contact-box p {
    font-size: 1.3rem;
    /* Down from 1.6rem */
    margin-bottom: 50px;
    opacity: 0.9;
    line-height: 1.8;
    padding: 0 10%;
    /* Better text shaping at 1500px width */
}

.contact-btn {
    align-self: center;
    /* Centered button */
    padding: 22px 60px;
    background: white;
    color: var(--primary-color);
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 1.4rem;
}

.contact-btn:hover {
    background: #eee;
    transform: translateY(-3px);
}

.map-frame {
    border-radius: 20px;
    overflow: hidden;
    height: 100%;
    min-height: 600px;
    /* Much larger map frame */
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

/* Map Information Styling */
.map-info {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
    padding: 50px 40px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    width: 100%;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.04);
}

.map-info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.info-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: #f1f6fb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.info-icon svg {
    width: 20px;
    height: 20px;
}

.info-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.info-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 1.5px;
    opacity: 0.8;
}

.info-text p {
    font-size: 0.95rem;
    color: #333;
    line-height: 1.6;
    word-break: keep-all;
}

@media (max-width: 1200px) {
    .map-info {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .map-info {
        grid-template-columns: 1fr;
        padding: 40px 30px;
    }

    .map-info-item {
        border-bottom: 1px solid #f0f0f0;
        padding-bottom: 25px;
    }

    .map-info-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}

/* Responsive Design Media Queries */

/* 1200px Breakpoint (Small Desktop) */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }

    .hero h2 {
        font-size: 3.5rem;
    }
}

/* 1024px Breakpoint (Tablet Landscape / Small Laptop) */
@media (max-width: 1024px) {

    /* Hide Desktop Nav, enable Mobile Nav (Full Screen Menu) */
    .nav-container {
        display: none;
    }

    .dropdown-bg {
        display: none !important;
    }

    .sub-container {
        flex-direction: column;
        gap: 60px;
        padding: 0 30px;
        margin: 60px auto;
    }

    .snb {
        width: 100%;
    }

    .snb ul {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .snb ul li {
        border-bottom: none;
    }

    .snb ul li a {
        padding: 10px 20px;
        background: #f4f4f4;
        border-radius: 4px;
        font-size: 16px;
    }

    .service-grid {
        justify-content: center;
    }

    .service-card {
        width: 340px;
        height: 340px;
        padding: 30px;
    }

    .practice-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .footer-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* 768px Breakpoint (Tablet Portrait) */
@media (max-width: 768px) {
    * {
        font-size: 16px;
        /* Reduced base font size */
    }

    .section {
        padding: 60px 0;
        /* Drastically reduced for mobile */
    }

    .hero {
        height: auto;
        min-height: 450px;
        padding: 80px 0;
    }

    .hero h2 {
        font-size: 2.8rem;
    }

    .section-header {
        margin-bottom: 50px;
    }

    .section-header h3 {
        font-size: 2.2rem;
    }

    .section-header h3::before,
    .section-header h3::after {
        display: none;
        /* Hide accent lines on small screens */
    }

    .section-header p {
        font-size: 1.1rem;
        line-height: 1.5;
    }

    .service-card {
        width: 90vw;
        height: 90vw;
        max-width: 320px;
        max-height: 320px;
        padding: 40px;
    }

    .service-card h4 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }

    .service-card p {
        font-size: 0.95rem;
    }

    .practice-grid {
        grid-template-columns: 1fr;
    }

    .practice-item {
        height: 400px;
    }

    .member-grid {
        grid-template-columns: 1fr !important;
    }

    .greeting-container {
        flex-direction: column;
        gap: 30px !important;
    }

    .contact-box {
        padding: 40px 20px;
    }

    .contact-box h3 {
        font-size: 1.8rem;
        /* Reduced from 2.2rem */
        word-break: keep-all;
    }

    .contact-box p {
        font-size: 1.1rem;
        padding: 0;
        word-break: keep-all;
    }

    .contact-btn {
        padding: 15px 40px;
        font-size: 1.1rem;
        white-space: nowrap;
        /* Prevent button text breaking */
    }

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

/* 480px Breakpoint (Mobile) */
@media (max-width: 480px) {
    .header-inner {
        padding: 0 15px;
    }

    .logo a {
        font-size: 20px;
    }

    .hero h2 {
        font-size: 2.2rem;
    }

    .btn-cta {
        padding: 15px 40px;
        font-size: 1.1rem;
    }

    .contact-box h3 {
        font-size: 1.5rem;
        /* Even smaller for very narrow screens */
    }

    .contact-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .sub-banner {
        height: 200px;
    }

    .sub-banner h2 {
        font-size: 32px;
    }

    .content-title {
        font-size: 28px;
    }

    .full-menu-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations rewrite for mobile performance if needed */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}