/* Custom styles for MG Architecture Office */

/* Import Noto Sans KR */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700&display=swap');

/* Global font setting */
* {
    font-family: 'Noto Sans KR', sans-serif;
}

:root {
    /* Black Tone System - 검정색 톤 체계 */
    --color-black-100: #000000; /* 순수 검정 - 강조용 */
    --color-black-90: #1a1a1a; /* 90% 검정 - 제목 */
    --color-black-80: #333333; /* 80% 검정 - 부제목 */
    --color-black-70: #4d4d4d; /* 70% 검정 - 본문 강조 */
    --color-black-60: #666666; /* 60% 검정 - 일반 본문 */
    --color-black-50: #808080; /* 50% 검정 - 보조 텍스트 */
    --color-black-40: #999999; /* 40% 검정 - 비활성 텍스트 */
    --color-black-30: #b3b3b3; /* 30% 검정 - 구분선 */
    --color-black-20: #cccccc; /* 20% 검정 - 배경 경계 */
    --color-black-10: #e6e6e6; /* 10% 검정 - 연한 배경 */
    --color-black-5: #f3f3f3; /* 5% 검정 - 매우 연한 배경 */
    --color-white: #ffffff; /* 순수 흰색 */

    /* Legacy color mappings for compatibility */
    --color-primary-navy: var(--color-black-90);
    --color-primary-warm-gray: var(--color-black-60);
    --color-primary-light-gray: var(--color-black-20);
    --color-secondary-soft-blue: var(--color-black-30);
    --color-primary-black: var(--color-black-100);
    --color-primary-gray: var(--color-black-50);
    --color-secondary-light-gray: var(--color-black-5);
    --color-secondary-medium-gray: var(--color-black-20);
    --color-secondary-dark-gray: var(--color-black-80);
    --color-neutral-light-gray: var(--color-black-5);
    --color-neutral-medium-gray: var(--color-black-20);
    --color-neutral-dark-gray: var(--color-black-90);

    /* Semantic Colors */
    --color-semantic-success: #10b981;
    --color-semantic-warning: #f59e0b;
    --color-semantic-error: #ef4444;
}

/* Text Colors */
.text-primary-black { color: var(--color-primary-black); }
.text-primary-gray { color: var(--color-primary-gray); }
.text-secondary-dark-gray { color: var(--color-secondary-dark-gray); }
.text-neutral-dark-gray { color: var(--color-neutral-dark-gray); }
.text-primary-navy { color: var(--color-primary-navy); }
.text-primary-warm-gray { color: var(--color-primary-warm-gray); }
.text-primary-light-gray { color: var(--color-primary-light-gray); }


/* Background Colors */
.bg-primary-black { background-color: var(--color-primary-black); }
.bg-primary-white { background-color: var(--color-primary-white); }
.bg-neutral-light-gray { background-color: var(--color-neutral-light-gray); }
.bg-neutral-medium-gray { background-color: var(--color-neutral-medium-gray); }
.bg-secondary-light-gray { background-color: var(--color-secondary-light-gray); }
.bg-primary-navy { background-color: var(--color-primary-navy); }

/* Border Colors */
.border-primary-black { border-color: var(--color-primary-black); }
.border-neutral-medium-gray { border-color: var(--color-neutral-medium-gray); }
.border-secondary-medium-gray { border-color: var(--color-secondary-medium-gray); }

/* Gradient */
.bg-gradient-primary { background: linear-gradient(135deg, var(--color-primary-navy), var(--color-secondary-soft-blue)); }

/* Navigation styles */
.nav-link {
    @apply relative px-3 py-2 text-sm font-medium transition-all duration-300;
    color: var(--color-black-60);
}

.nav-link:hover {
    color: var(--color-black-100);
    font-weight: 600;
}

.nav-link::after {
    @apply content-[''] absolute left-0 bottom-0 w-full h-0.5 bg-black transform scale-x-0 transition-transform duration-300;
}

.nav-link:hover::after {
    @apply scale-x-100;
}

.nav-link.active {
    color: var(--color-black-100);
    font-weight: 700;
}

.mobile-nav-link {
    @apply relative block px-3 py-2 text-base transition-all duration-300;
    color: var(--color-black-60);
    font-weight: 500;
    min-height: 44px;
    display: flex;
    align-items: center;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-link:hover {
    color: var(--color-black-100);
    font-weight: 600;
    background-color: var(--color-black-5);
}

.mobile-nav-link::after {
    @apply content-[''] absolute left-0 bottom-0 w-full h-0.5 bg-black transform scale-x-0 transition-transform duration-300;
}

.mobile-nav-link:hover::after {
    @apply scale-x-100;
}

/* Button styles */
.btn-primary {
    @apply inline-flex items-center px-8 py-3 border border-transparent text-base rounded-md transition-all duration-300;
    background-color: var(--color-black-100);
    color: var(--color-white);
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--color-black-80);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    @apply inline-flex items-center px-8 py-3 border text-base rounded-md transition-all duration-300;
    border-color: var(--color-black-30);
    color: var(--color-black-80);
    background-color: var(--color-white);
    font-weight: 500;
}

.btn-secondary:hover {
    border-color: var(--color-black-60);
    background-color: var(--color-black-5);
    color: var(--color-black-100);
    font-weight: 600;
}

.btn-outline {
    @apply inline-flex items-center px-6 py-3 border-2 text-base rounded-md transition-all duration-300;
    border-color: var(--color-black-100);
    color: var(--color-black-100);
    background-color: transparent;
    font-weight: 600;
}

.btn-outline:hover {
    background-color: var(--color-black-100);
    color: var(--color-white);
    transform: translateY(-1px);
}


/* Portfolio preview card styles */
.portfolio-preview-card {
    @apply bg-white rounded-lg shadow-sm hover:shadow-xl hover:scale-105 transition-all duration-300 overflow-hidden cursor-pointer;
    position: relative;
}

.portfolio-image {
    @apply w-full h-48 overflow-hidden;
}

.portfolio-preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.portfolio-preview-card:hover::before {
    opacity: 1;
}

.portfolio-preview-card::after {
    content: '자세히 보기';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 600;
    font-size: 1.1em;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.portfolio-preview-card:hover::after {
    opacity: 1;
}

/* Portfolio gallery styles */
.portfolio-grid {
    @apply grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8;
}

.portfolio-item {
    @apply relative bg-white rounded-lg shadow-sm hover:shadow-xl transition-all duration-300 overflow-hidden cursor-pointer transform hover:-translate-y-1;
}

.portfolio-item img {
    @apply w-full h-64 object-cover transition-transform duration-300;
}

.portfolio-item:hover img {
    @apply scale-110;
}

.portfolio-item::before {
    @apply content-[''] absolute inset-0 bg-black bg-opacity-0 transition-opacity duration-300;
}

.portfolio-item:hover::before {
    @apply bg-opacity-40;
}

.portfolio-category {
    @apply inline-block px-3 py-1 text-xs font-medium text-gray-600 bg-gray-100 rounded-full;
}

/* Filter buttons */
.filter-btn {
    @apply px-4 py-2 text-sm font-medium text-gray-600 bg-white border border-gray-300 rounded-md hover:bg-gray-50 transition-colors duration-200;
}

.filter-btn.active {
    @apply text-white bg-black border-black;
}

/* Modal styles */
.modal {
    @apply fixed inset-0 z-50 overflow-y-auto;
}

.modal-backdrop {
    @apply fixed inset-0 bg-black bg-opacity-50 transition-opacity;
}

.modal-content {
    @apply relative bg-white rounded-lg max-w-4xl mx-auto my-8 shadow-xl;
}

.modal-header {
    @apply px-6 py-4 border-b border-neutral-medium-gray;
}

.modal-body {
    @apply px-6 py-4;
}

.modal-footer {
    @apply px-6 py-4 border-t border-neutral-medium-gray flex justify-end;
}

/* Form styles */
.form-group {
    @apply mb-6;
}

.form-label {
    @apply block text-sm mb-2;
    color: var(--color-black-80);
    font-weight: 600;
}

.form-input {
    @apply w-full px-3 py-2 border rounded-md shadow-sm focus:outline-none focus:ring-2 transition-all duration-200;
    border-color: var(--color-black-20);
    color: var(--color-black-80);
    font-weight: 400;
}

.form-input:focus {
    border-color: var(--color-black-60);
    ring-color: var(--color-black-30);
}

.form-select {
    @apply w-full px-3 py-2 border border-neutral-medium-gray rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-secondary-soft-blue focus:border-secondary-soft-blue transition-colors duration-200;
}

.form-textarea {
    @apply w-full px-3 py-2 border border-neutral-medium-gray rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-secondary-soft-blue focus:border-secondary-soft-blue transition-colors duration-200 resize-vertical;
}

.form-error {
    @apply text-semantic-error text-sm mt-1;
}

.form-success {
    @apply text-[var(--color-semantic-success)] text-sm mt-1;
}

/* Alert styles */
.alert {
    @apply p-4 rounded-md mb-4;
}

.alert-success {
    @apply bg-[var(--color-semantic-success)]/[var(--color-semantic-success)] border border-[var(--color-semantic-success)]/[var(--color-semantic-success)] text-white;
}

.alert-error {
    @apply bg-[var(--color-semantic-error)]/[var(--color-semantic-error)] border border-[var(--color-semantic-error)]/[var(--color-semantic-error)] text-white;
}

/* Animation classes */
.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);
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .portfolio-grid {
        @apply grid-cols-1;
    }
    
    .service-card {
        @apply p-6;
    }
    
    /* Hide company name on mobile for better spacing */
    nav .flex-shrink-0 span {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    /* Adjust company name size on tablet */
    nav .flex-shrink-0 span {
        font-size: 1rem;
    }
}

/* Loading spinner */
.spinner {
    @apply inline-block w-4 h-4 border-2 border-[var(--color-neutral-medium-gray)] border-t-[var(--color-primary-navy)] rounded-full animate-spin;
}

/* Portfolio Filter Buttons */
.filter-btn {
    @apply px-6 py-2 rounded-full border transition-all duration-300 text-sm font-medium;
    @apply border-gray-300 text-gray-600 hover:border-gray-400 hover:text-gray-800;
}

.filter-btn.active {
    @apply bg-black text-white border-black;
}

/* Small outline button */
.btn-outline-sm {
    @apply inline-flex items-center px-3 py-1 border border-gray-300 text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50 transition-colors duration-200;
}

/* Portfolio item animations */
.portfolio-item {
    transition: all 0.3s ease;
}

.portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

/* FAQ Category Buttons */
.faq-category-btn {
    @apply px-6 py-2 rounded-full border transition-all duration-300 text-sm font-medium;
    @apply border-gray-300 text-gray-600 hover:border-gray-400 hover:text-gray-800;
}

.faq-category-btn.active {
    @apply bg-black text-white border-black;
}

/* Floating CTA Button */
.floating-cta {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: var(--color-black-100);
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.floating-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
    color: white;
}

@media (max-width: 768px) {
    .floating-cta {
        bottom: 20px;
        right: 20px;
        padding: 14px 20px;
        font-size: 14px;
    }
}

/* Page loader - DISABLED to prevent loading spinner issues */
.page-loader {
    display: none !important;
}

.page-loader.hidden {
    display: none !important;
}

.page-loader .spinner-large {
    display: none !important;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Background Image Effects */
.bg-pattern-section {
    position: relative;
    overflow: hidden;
}

.project-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Ensure content is above background */
.bg-pattern-section > *:not(.project-bg-overlay) {
    position: relative;
    z-index: 1;
}

/* Adjust image styling */
.project-bg-overlay img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0.12;
    filter: grayscale(100%);
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: var(--color-neutral-light-gray);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: var(--color-primary-gray);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-black);
    border-radius: 3px;
}

/* Enhanced Portfolio Section */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid #eee;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    border-radius: 8px;
}

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

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease-in-out;
}

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

.portfolio-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.portfolio-item:hover .overlay {
    opacity: 1;
}

.portfolio-item .overlay h3 {
    margin-bottom: 10px;
    font-size: 1.5em;
    font-weight: 600;
}

.portfolio-item .overlay p {
    font-size: 1em;
    color: #ccc;
}

/* Lightbox CSS */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto 15px;
    border-radius: 4px;
}

.lightbox-content .caption {
    color: #333;
    font-size: 1.1em;
    margin-top: 10px;
    font-weight: 500;
}

.lightbox-close {
    position: absolute;
    top: -10px;
    right: 10px;
    color: #fff;
    font-size: 2.5em;
    cursor: pointer;
    z-index: 1001;
    font-weight: 300;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #ccc;
}

/* Enhanced animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease-out forwards;
}

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

.stagger-animation {
    animation-delay: 0.1s;
}

.stagger-animation:nth-child(2) {
    animation-delay: 0.2s;
}

.stagger-animation:nth-child(3) {
    animation-delay: 0.3s;
}

.stagger-animation:nth-child(4) {
    animation-delay: 0.4s;
}

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

/* Enhanced mobile navigation */
@media (max-width: 768px) {
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .portfolio-item {
        margin: 0 10px;
    }
    
    .lightbox-content {
        max-width: 95%;
        padding: 15px;
    }
    
    .lightbox-content img {
        max-height: 60vh;
    }
}
/* Override Tailwind gray backgrounds to be darker */
.bg-gray-50 { background-color: #f5f5f5 !important; }
.bg-gray-100 { background-color: #e8e8e8 !important; }
.bg-gray-200 { background-color: #d1d1d1 !important; }

