/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Oswald', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo a {
    display: block;
}

.logo img {
    height: 40px;
    width: auto;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav li {
    position: relative;
}

.nav a {
    color: #333;
    text-decoration: none;
    font-weight: 400;
    font-size: 1rem;
    padding: 15px 20px;
    display: block;
    transition: all 0.3s ease;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.nav a:hover {
    color: #fff;
    background-color: #ff6b35;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 53, 0.3);
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 180px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid #eee;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
    margin: 0;
    display: block;
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border-radius: 0;
    transform: none;
    box-shadow: none;
}

.dropdown-menu a:hover {
    background-color: #ff6b35;
    color: #fff;
    transform: none;
    box-shadow: none;
}

.nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.nav a:hover::before {
    left: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s ease;
}

.mobile-menu-btn:hover {
    color: #ff6b35;
}

/* Main Content */
main {
    margin-top: 80px;
}

/* Hero Section */
.hero {
    background: #fff;
    padding: 80px 0;
    text-align: center;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 400;
    color: #333;
    margin-bottom: 40px;
    line-height: 1.4;
}

.hero-title .highlight {
    color: #ff6b35;
    font-weight: 700;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.phone-btn {
    background: #fff;
    color: #ff6b35;
    padding: 15px 30px;
    text-decoration: none;
    border: 2px solid #ff6b35;
    border-radius: 5px;
    font-weight: 400;
    transition: all 0.3s ease;
    display: inline-block;
}

.phone-btn:hover {
    background: #ff6b35;
    color: #fff;
}

.kakao-btn {
    background: #fee500;
    color: #3c1e1e;
    padding: 15px 30px;
    text-decoration: none;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 3px 10px rgba(254, 229, 0, 0.3);
}

.kakao-btn:hover {
    background: #fdd835;
    color: #3c1e1e;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(254, 229, 0, 0.4);
}

/* Services Section */
.services {
    padding: 60px 0;
    background: #fff;
}

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

.service-item {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-item:hover {
    background: #ff6b35;
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
}

.service-item:hover h3 {
    color: #fff;
}

.service-item:hover p {
    color: #fff;
}

.service-icon {
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.service-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.service-item:hover .service-icon img {
    filter: brightness(0) invert(1);
    transform: scale(1.1);
}

.service-item h3 {
    font-size: 1.2rem;
    font-weight: 400;
    color: #333;
    margin-bottom: 15px;
}

.service-item p {
    color: #666;
    line-height: 1.6;
    font-size: 0.9rem;
}

/* K.Will Message Section */
.kwill-message {
    padding: 60px 0;
    background: #f8f9fa;
}

.kwill-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.kwill-video h3,
.kwill-signature h3 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 400;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kwill-video .youtube-item {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.kwill-video .youtube-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.kwill-video .youtube-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

.signature-image {
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.signature-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.signature-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Recent Work Section */
.recent-work {
    padding: 60px 0;
    background: #fff;
}

.recent-work h2 {
    text-align: center;
    font-size: 2rem;
    color: #333;
    margin-bottom: 40px;
    font-weight: 400;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.work-item {
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.work-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.work-image {
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
}

.work-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.work-item h3 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.3;
}

.work-item p {
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
    line-height: 1.4;
}

/* YouTube Section */
.youtube-section {
    padding: 40px 0;
    background: #fff;
}

.youtube-section h2 {
    text-align: center;
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 30px;
    font-weight: 400;
}

.youtube-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.youtube-item {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.youtube-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

/* Footer */
.footer {
    background: #333;
    color: #fff;
    padding: 40px 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo a {
    display: block;
}

.footer-logo img {
    height: 30px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-info p {
    margin-bottom: 5px;
    color: #ccc;
}

.footer-info a {
    color: #ff6b35;
    text-decoration: none;
}

.footer-info a:hover {
    text-decoration: underline;
}

.footer-kakao-link {
    background: #fee500;
    color: #3c1e1e !important;
    padding: 2px 6px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.3s ease;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(254, 229, 0, 0.2);
}

.footer-kakao-link:hover {
    background: #fdd835;
    color: #3c1e1e !important;
    transform: scale(1.02);
    box-shadow: 0 2px 5px rgba(254, 229, 0, 0.3);
    text-decoration: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 1000;
    }
    
    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }
    
    .nav li {
        border-bottom: 1px solid #eee;
    }
    
    .nav li:last-child {
        border-bottom: none;
    }
    
    .nav a {
        padding: 15px 20px;
        font-size: 1rem;
        border-radius: 0;
        text-align: left;
    }
    
    .nav a:hover {
        background-color: #ff6b35;
        color: #fff;
        transform: none;
        box-shadow: none;
    }
    
    /* Mobile Dropdown Styles */
    .nav.active .dropdown-menu {
        position: static;
        opacity: 0;
        visibility: hidden;
        transform: none;
        box-shadow: none;
        border: none;
        background: #f8f9fa;
        margin-top: 10px;
        border-radius: 8px;
        padding: 10px 0;
        display: none;
        flex-direction: column;
        transition: all 0.3s ease;
    }
    
    .nav.active .dropdown-menu a {
        padding: 10px 30px;
        font-size: 0.9rem;
        color: #666;
    }
    
    .nav.active .dropdown-menu a:hover {
        background-color: #ff6b35;
        color: #fff;
    }
    
    .nav.active .dropdown-menu.active a {
        padding: 10px 30px !important;
        font-size: 0.9rem !important;
        color: #666 !important;
        display: block !important;
        width: 100% !important;
        text-decoration: none !important;
        border-bottom: 1px solid #e9ecef !important;
    }
    
    .nav.active .dropdown-menu.active a:last-child {
        border-bottom: none !important;
    }
    
    .nav.active .dropdown-menu.active a:hover {
        background-color: #ff6b35 !important;
        color: #fff !important;
    }
    
    .nav.active .dropdown-toggle {
        cursor: pointer;
        user-select: none;
    }
    
    .nav.active .dropdown-arrow {
        display: inline-block;
        transition: transform 0.3s ease;
    }
    
    .nav.active .dropdown.active .dropdown-arrow {
        transform: rotate(180deg);
    }
    
    /* Mobile dropdown toggle */
    .nav.active .dropdown-menu.active {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        position: static !important;
        background: #f8f9fa !important;
        margin-top: 10px !important;
        border-radius: 8px !important;
        padding: 10px 0 !important;
        box-shadow: none !important;
        border: none !important;
        max-height: none !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
    }
    
    /* Additional mobile dropdown styles for better visibility */
    .nav.active .dropdown.active .dropdown-menu {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: static !important;
        background: #f8f9fa !important;
        margin-top: 10px !important;
        border-radius: 8px !important;
        padding: 10px 0 !important;
        box-shadow: none !important;
        border: none !important;
        max-height: none !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        transform: none !important;
    }
    
    /* Force mobile dropdown visibility with highest specificity */
    .nav.active .dropdown.active .dropdown-menu.active {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: static !important;
        background: #f8f9fa !important;
        margin-top: 10px !important;
        border-radius: 8px !important;
        padding: 10px 0 !important;
        box-shadow: none !important;
        border: none !important;
        max-height: none !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        transform: none !important;
    }
    
    /* Ultra high specificity for mobile dropdowns */
    body .nav.active .dropdown.active .dropdown-menu.active {
        display: flex !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: static !important;
        background: #f8f9fa !important;
        margin-top: 10px !important;
        border-radius: 8px !important;
        padding: 10px 0 !important;
        box-shadow: none !important;
        border: none !important;
        max-height: none !important;
        overflow: visible !important;
        height: auto !important;
        min-height: auto !important;
        transform: none !important;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .phone-btn, .kakao-btn {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    .services {
        padding: 40px 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-item {
        padding: 20px 15px;
    }
    
    .service-item:hover {
        transform: none;
    }
    
    .service-icon img {
        width: 50px;
        height: 50px;
    }
    
    .kwill-message {
        padding: 40px 0;
    }
    
    .kwill-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .kwill-video h3,
    .kwill-signature h3 {
        font-size: 1.1rem;
        margin-bottom: 15px;
        min-height: 50px;
    }
    
    .signature-image {
        padding: 20px;
        min-height: 250px;
    }
    
    .kwill-video .youtube-item:hover,
    .signature-image:hover {
        transform: none;
    }
    
    .recent-work {
        padding: 40px 0;
    }
    
    .recent-work h2 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    
    .work-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 10px;
    }
    
    .work-item {
        padding: 15px;
        margin-bottom: 0;
    }
    
    .work-item:hover {
        transform: translateY(-3px);
    }
    
    .work-image {
        margin-bottom: 15px;
    }
    
    .work-image img {
        height: 180px;
    }
    
    .work-item h3 {
        font-size: 1rem;
        margin-bottom: 6px;
    }
    
    .work-item p {
        font-size: 0.85rem;
    }
}

/* Tablet styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .work-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .work-item {
        padding: 18px;
    }
    
    .work-image img {
        height: 200px;
    }
    
    .work-item h3 {
        font-size: 1.05rem;
    }
    
    .work-item p {
        font-size: 0.9rem;
    }
    
    .youtube-section {
        padding: 40px 0;
    }
    
    .youtube-section h2 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    
    .youtube-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 100%;
        padding: 0 10px;
    }
    
    .youtube-item {
        border-radius: 8px;
    }
    
    .youtube-item:hover {
        transform: none;
    }
    
    .footer {
        padding: 30px 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer-info p {
        font-size: 0.8rem;
    }
    
    .footer-kakao-link {
        padding: 1px 4px;
        font-size: 0.8em;
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .services, .kwill-message, .recent-work, .youtube-section {
        padding: 60px 0;
    }
    
    .handwritten-note {
        padding: 30px 20px;
        font-size: 1rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation for images */
.work-image img {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Hover effects */
.service-item, .work-item {
    cursor: pointer;
}

/* Focus styles for accessibility */
a:focus, button:focus {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
}

/* Mobile Menu Styles */
.mobile-menu-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.mobile-menu-btn:hover {
    background-color: #f0f0f0;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    flex-direction: column;
    padding: 20px;
    z-index: 1000;
}

.mobile-menu.mobile-open {
    display: flex;
}

.mobile-menu li {
    margin: 10px 0;
}

.mobile-menu a {
    display: block;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.mobile-menu a:last-child {
    border-bottom: none;
}
