/* style.css */

/* 언어별 텍스트 기본 숨김 처리 */
html[lang="ko"] [data-lang="en"],
html[lang="en"] [data-lang="ko"] {
    display: none;
}

/* 언어 전환 버튼 스타일 */
.lang-button {
    background-color: var(--accent-primary);
    color: var(--bg-main);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    font-family: var(--body-font);
    font-size: 0.9rem;
    margin-left: 15px;
    transition: background-color 0.3s ease;
}

.lang-button:hover {
    background-color: #FFC14D;
    color: var(--bg-main);
}

/* 헤더 레이아웃 조정 */
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 반응형 헤더 조정 (중간 크기 화면) */
@media (max-width: 850px) {
     header .container {
        position: relative; /* 버튼 절대 위치 지정을 위함 */
     }
     .lang-button {
        position: absolute;
        top: 15px; /* 수직 위치 조정 */
        right: 15px; /* 오른쪽 정렬 */
     }
     nav {
         margin-right: 80px; /* 버튼 공간 확보 */
     }
}

/* 반응형 헤더 조정 (작은 크기 화면) */
@media (max-width: 768px) {
    header .container {
        flex-direction: column; /* 세로 정렬 */
        align-items: center;
        position: static; /* 절대 위치 해제 */
    }
    nav {
        margin-top: 10px;
        margin-right: 0; /* 마진 초기화 */
        width: 100%;
        justify-content: center;
    }
    nav ul {
        justify-content: center; /* 네비게이션 아이템 가운데 정렬 */
        flex-wrap: wrap; /* 작은 화면에서 줄바꿈 허용 */
    }
    .lang-button {
        position: static; /* 절대 위치 해제 */
        margin-top: 10px; /* 버튼 위 여백 추가 */
        margin-left: 0;
    }
}

/* --- 전역 스타일 및 변수 --- */
:root {
    /* Sophisticated Dark Theme */
    --bg-main: #1A1A2E; /* main background */
    --bg-main-rgb: 26,26,46; /* RGB for bg-main */
    --text-main: #F0F0F0; /* main text color */
    --accent-primary: #FFA500; /* primary accent, for CTAs, highlights */
    --accent-primary-rgb: 255,165,0; /* RGB for accent-primary */
    --bg-subtle: #2C2F48; /* subtle background, for cards or secondary elements */
    --text-secondary: #B0B0C0; /* secondary text, for less prominent info */
    --border-color: #404058; /* for borders, if needed */

    /* Existing variables updated to use new theme */
    --primary-color: var(--accent-primary); /* 활기찬 파랑 -> primary accent */
    --accent-color: var(--accent-primary);  /* 밝은 주황 -> primary accent */
    --text-color: var(--text-main);    /* 어두운 회색 / 검정 -> main text */
    --background-color: var(--bg-main); /* 흰색 -> main background */
    --light-gray-bg: var(--bg-subtle); /* 밝은 회색 -> subtle background */
    --dropdown-hover-bg: #3B3E5C; /* Slightly lighter than bg-subtle for dropdown hover */

    /* Font variables (unchanged) */
    --heading-font: 'Montserrat', sans-serif; /* 제목 폰트 */
    --body-font: 'Noto Sans KR', sans-serif; /* 본문 폰트 */
}

/* 기본 리셋 및 본문 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth; /* 부드러운 스크롤 */
}

body {
    font-family: var(--body-font);
    color: var(--text-main);
    line-height: 1.6; /* 줄 간격 */
    background-color: var(--bg-main);
    font-weight: 400; /* Noto Sans KR Regular */
}

/* 제목 스타일 */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--text-main);
    margin-bottom: 1rem;
    font-weight: 700; /* Montserrat Bold */
}
h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; margin-top: 2rem; } /* 섹션 제목 위 여백 */
h3 { font-size: 1.5rem; }

/* 단락 스타일 */
p {
    margin-bottom: 1rem;
}

/* 링크 스타일 */
a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--text-main);
}

/* 목록 스타일 */
ul {
    list-style: none;
    padding-left: 0;
}

/* 이미지 스타일 */
img {
    max-width: 100%; /* 이미지 최대 너비 제한 */
    height: auto; /* 높이 자동 조절 */
    display: block; /* 이미지 아래 추가 공간 제거 */
}

/* 구분선 스타일 */
hr {
    border: 0;
    height: 1px;
    background-color: var(--border-color); /* Updated for dark theme */
    margin: 2rem 0; /* 위아래 여백 */
}

/* 유틸리티 클래스 */
.container {
    width: 90%;
    max-width: 1100px; /* 최대 너비 제한 */
    margin: 0 auto; /* 가운데 정렬 */
    padding: 0 15px; /* 좌우 패딩 */
}
.section-padding {
    padding: 60px 0; /* 섹션 상하 패딩 */
}
.bg-light-gray {
    background-color: var(--light-gray-bg); /* 밝은 회색 배경 */
}

/* 헤더 및 네비게이션 */
header {
    background-color: var(--bg-subtle);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* 그림자 효과 - Adjusted for dark theme */
    position: sticky; /* 상단 고정 */
    top: 0;
    z-index: 1000; /* 다른 요소 위에 표시 */
    padding: 10px 0; /* 상하 패딩 */
}

/* 로고 스타일 */
.logo {
    display: flex;
    align-items: center;
}
.logo a {
    display: inline-block;
}
.logo img {
    max-height: 40px; /* 로고 최대 높이 */
    width: auto;
    vertical-align: middle; /* 수직 가운데 정렬 */
}

/* 네비게이션 목록 */
nav ul {
    display: flex;
}
nav ul li {
    margin-left: 25px; /* 항목 간 왼쪽 여백 */
    position: relative; /* 드롭다운 기준점 */
}
nav ul li a {
    color: var(--text-main);
    font-weight: 500; /* Noto Sans KR Medium */
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}
nav ul li a:hover {
    color: var(--accent-primary);
}
/* 네비게이션 호버 밑줄 효과 */
nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--accent-primary);
    transition: width 0.3s ease;
}
nav ul li a:hover::after {
    width: 100%;
}

/* 드롭다운 메뉴 */
.dropdown-content {
    display: none; /* 기본 숨김 */
    position: absolute;
    background-color: var(--bg-subtle); /* Updated to dark theme */
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4); /* Adjusted shadow for dark theme */
    z-index: 1;
    top: 100%; /* 부모 요소 아래 위치 */
    left: 0;
    padding: 10px 0;
    border-radius: 4px;
}
.dropdown-content li {
    margin-left: 0; /* 마진 초기화 */
}
.dropdown-content a {
    color: var(--text-main); /* Updated text color */
    padding: 10px 15px;
    display: block;
    white-space: nowrap; /* 줄바꿈 방지 */
    font-weight: 400; /* Regular */
}
.dropdown-content a:hover {
    background-color: var(--dropdown-hover-bg); /* Updated hover background */
    color: var(--accent-primary); /* Ensure hover text color is accent */
}
.dropdown-content a::after {
    display: none; /* 드롭다운 내 밑줄 제거 */
}
.dropdown:hover .dropdown-content {
    display: block; /* 호버 시 드롭다운 표시 */
}

/* Hero 섹션 스타일 */
.hero {
    text-align: center;
    min-height: 70vh; /* 최소 높이 */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden; /* 비디오 넘침 방지 */
    padding: 80px 0;
}

/* 배경 비디오 스타일 */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 영역 채우기 (잘릴 수 있음) */
    transform: translate(-50%, -50%); /* 정중앙 배치 */
    z-index: 1; /* 콘텐츠 뒤에 배치 */
}

/* 비디오 위 어두운 오버레이 (텍스트 가독성 향상) */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* 반투명 검정 - Increased darkness */
    z-index: 1; /* 비디오 위, 콘텐츠 아래 */
}

/* Hero 섹션 콘텐츠 스타일 */
.hero-content {
    position: relative;
    z-index: 2; /* 오버레이 위에 표시 */
    /* color: white;  Removed as child elements will define their colors */
}
.hero h1 {
    color: var(--text-main); /* 제목 흰색 -> main text */
    font-size: 3rem; /* Consider increasing if it looks diminished */
    margin-bottom: 0.5rem;
}
.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-secondary); /* 단락 흰색 -> secondary text */
}

/* CTA 버튼 스타일 */
.cta-button {
    display: inline-block;
    background-color: var(--accent-primary);
    color: var(--bg-main);
    padding: 12px 25px;
    border-radius: 25px; /* 둥근 모서리 */
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}
.cta-button:hover {
    background-color: #FFC14D; /* 호버 시 밝은 주황색 */
    color: var(--bg-main);
    transform: translateY(-2px); /* 약간 위로 이동하는 효과 */
}

/* About Us 섹션 */
.history-timeline {
    position: relative;
    padding: 20px 0;
}
.history-item {
    margin-bottom: 20px;
    padding: 15px;
    border-left: 3px solid var(--accent-primary); /* 타임라인 선 */
    background-color: var(--bg-subtle);
    border-radius: 4px;
}
.history-item h3 {
     margin-top: 0;
     color: var(--text-main); /* 제목 색상 조정 */
}
.history-item p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary); /* Explicitly set for history item paragraphs */
}

/* 스튜디오 슬라이더 스타일 */
.slider-container {
    position: relative;
    width: 100%;
    max-width: 800px; /* 슬라이더 최대 너비 */
    margin: 2rem auto 0; /* 가운데 정렬 및 상단 여백 */
    overflow: hidden; /* 컨테이너 밖 슬라이드 숨김 */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.slides {
    display: flex; /* 슬라이드 가로 정렬 */
    transition: transform 0.5s ease-in-out; /* 부드러운 전환 효과 */
    width: 100%;
}

.slide {
    min-width: 100%; /* 각 슬라이드가 컨테이너 너비 차지 */
    box-sizing: border-box;
}

.slide img {
    width: 100%;
    height: auto;
    max-height: 500px; /* 이미지 최대 높이 제한 */
    object-fit: cover; /* 이미지 비율 유지하며 영역 채우기 */
    display: block;
}

/* 슬라이더 네비게이션 버튼 */
.prev-btn,
.next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%); /* 수직 가운데 정렬 */
    width: auto;
    padding: 16px;
    color: var(--bg-main);
    font-weight: bold;
    font-size: 20px;
    background-color: var(--accent-primary); /* Updated background */
    border: none;
    border-radius: 0 3px 3px 0;
    user-select: none; /* 텍스트 선택 방지 */
    transition: background-color 0.3s ease;
}
.next-btn {
    right: 0;
    border-radius: 3px 0 0 3px; /* 반대쪽 모서리 둥글게 */
}
.prev-btn:hover,
.next-btn:hover {
    background-color: #FFC14D; /* 호버 시 밝은 주황색 */
    color: var(--bg-main);
}

/* 프로젝트 섹션 (신규 추가) */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 반응형 그리드 */
    gap: 20px; /* 그리드 간격 */
    margin-top: 1.5rem; /* 제목 아래 여백 */
}
.project-item { /* 플레이스홀더 스타일 */
    background-color: var(--bg-subtle); /* 배경색 변경 */
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3); /* More pronounced shadow */
}
/* Ensure h3 within project-item uses text-main */
.project-item h3 {
    color: var(--text-main);
}


/* 포트폴리오 섹션 */
.filter-buttons {
    margin-bottom: 30px;
    text-align: center;
}
.filter-btn {
    background-color: var(--bg-subtle);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 8px 15px;
    margin: 0 5px;
    cursor: pointer;
    border-radius: 20px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.filter-btn:hover,
.filter-btn.active { /* 활성화된 버튼 스타일 */
    background-color: var(--accent-primary);
    color: var(--bg-main);
    border-color: var(--accent-primary);
}
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* 반응형 그리드 */
    gap: 20px; /* 그리드 간격 */
}
.portfolio-item { /* 플레이스홀더 스타일 - This is for items that DONT have an image */
    background-color: var(--bg-subtle);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border-radius: 8px;
    text-align: center;
    padding: 10px;
    border: 1px dashed var(--border-color); /* Dashed border to indicate placeholder */
}

/* 서비스 섹션 */
#services ul {
    list-style: disc; /* 기본 불릿 */
    padding-left: 20px; /* 들여쓰기 */
    /* List marker color will be inherited from li's color */
}
#services li {
    margin-bottom: 10px; /* 항목 간 여백 */
    color: var(--text-main); /* Ensure list item text (and default marker) is visible */
}

/* 연락처 섹션 */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2열 그리드 */
    gap: 40px; /* 그리드 간격 */
}
.contact-info p {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}
.contact-info p strong {
    color: var(--text-main);
}
.map-placeholder { /* 지도 플레이스홀더 */
    background-color: var(--bg-subtle);
    min-height: 250px;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* 문의 양식 스타일 */
.contact-form label {
    display: block;
    margin-bottom: 8px; /* Updated margin */
    font-weight: 500;
    color: var(--text-main);
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px 15px; /* Updated padding */
    margin-bottom: 20px; /* Updated margin */
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--body-font); /* 폰트 상속 */
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5; /* Added line-height */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: var(--accent-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--accent-primary-rgb), 0.4); /* Enhanced box-shadow */
}
/* Placeholder styles */
.contact-form input[type="text"]::placeholder,
.contact-form input[type="email"]::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}
.contact-form input[type="text"]::-webkit-input-placeholder,
.contact-form input[type="email"]::-webkit-input-placeholder,
.contact-form textarea::-webkit-input-placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}
.contact-form input[type="text"]::-moz-placeholder, /* Firefox 19+ */
.contact-form input[type="email"]::-moz-placeholder,
.contact-form textarea::-moz-placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}
.contact-form input[type="text"]:-ms-input-placeholder, /* Internet Explorer 10-11 */
.contact-form input[type="email"]:-ms-input-placeholder,
.contact-form textarea:-ms-input-placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}
.contact-form input[type="text"]::-ms-input-placeholder, /* Microsoft Edge */
.contact-form input[type="email"]::-ms-input-placeholder,
.contact-form textarea::-ms-input-placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}
/*
.contact-form input[type="text"]:disabled,
.contact-form input[type="email"]:disabled,
.contact-form textarea:disabled {
    background-color: var(--bg-subtle);
    color: var(--text-secondary);
    opacity: 0.6;
    cursor: not-allowed;
    border-color: var(--border-color);
}
*/
.contact-form textarea {
    resize: vertical; /* 수직 크기 조절 허용 */
}
.contact-form button[type="submit"] {
    /* CTA 버튼 스타일 사용 - Verification: Should inherit from global .cta-button */
}

/* 푸터 스타일 */
footer {
    background-color: var(--bg-subtle); /* 어두운 배경 -> subtle background */
    color: var(--text-secondary); /* 밝은 텍스트 색상 -> secondary text */
    text-align: center;
    padding: 20px 0;
    margin-top: 40px; /* 위 여백 */
}
footer p {
    margin-bottom: 0;
    font-size: 0.9rem;
    color: var(--text-secondary); /* Ensure p specifically uses secondary text color */
}

/* 기본 반응형 조정 */
@media (max-width: 768px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    .section-padding { padding: 40px 0; } /* Reduced section padding for smaller screens */
    .hero { padding: 40px 0; min-height: 50vh; } /* Hero 섹션 높이/패딩 조정, consistent with section-padding */
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1rem; }
    .contact-grid { grid-template-columns: 1fr; gap: 20px; } /* 연락처 섹션 1열로 변경, reduced gap */
    .map-placeholder { min-height: 200px; }
    .prev-btn, .next-btn { font-size: 16px; padding: 10px; } /* 슬라이더 버튼 크기/패딩 조정 */
    .project-grid, .portfolio-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; } /* 그리드 최소 너비 및 간격 조정 */
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; } /* Hero 제목 크기 조정 */
    .hero p { font-size: 0.9rem; } /* Slightly smaller hero paragraph for very small screens */
    .project-grid, .portfolio-grid { grid-template-columns: 1fr; gap: 15px; } /* 포트폴리오/프로젝트 1열로 변경, consistent gap */
    nav ul li { margin: 10px 0; } /* 네비게이션 간격 조정 for stacked mobile menu (text is centered by parent) */
    .prev-btn, .next-btn { font-size: 14px; padding: 8px; } /* 슬라이더 버튼 크기 추가 조정 */
    nav ul { margin-left: 0; } /* 네비게이션 왼쪽 마진 제거 */
    /* nav ul li { margin-left: 10px; margin-right: 10px; } /* This line is redundant/conflicting if text is centered */
    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form textarea { padding: 10px; } /* Slightly reduce padding on very small screens for form inputs */
    .cta-button, .lang-button { padding: 10px 20px; font-size: 0.9rem; } /* Adjust CTA/lang button padding for small screens */
}

/* Bandi Gallery 섹션 */
.bandi-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center; /* 이미지들을 가운데 정렬 */
}

.bandi-gallery img {
    width: 200px;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.sensitive-cat-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center; /* 이미지들을 가운데 정렬 */
    margin-bottom: 20px; /* 갤러리와 동영상 사이 여백 */
}

.sensitive-cat-gallery img {
    width: 200px;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.sensitive-cat-video {
    display: flex;
    justify-content: center; /* 동영상을 가운데 정렬 */
}

.sensitive-cat-video video {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

/* Waddle friends 갤러리 */
.waddle-friends-gallery,
.yummy-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center; /* 이미지들을 가운데 정렬 */
    margin-bottom: 20px; /* 갤러리와 동영상 사이 여백 */
}

.waddle-friends-gallery img,
.yummy-gallery img {
    width: 200px;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

/* Waddle friends 및 Yummy 동영상 */
.waddle-friends-video,
.yummy-video {
    display: flex;
    justify-content: center; /* 동영상을 가운데 정렬 */
}

.waddle-friends-video video,
.yummy-video video {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.portfolio-image {
    width: 100%;
    height: auto;
    border: 3px solid var(--border-color); /* More pronounced border */
    border-radius: 5px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.35); /* Consistent shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-image:hover {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

/* --- Ideal Portfolio Card Structure (Requires HTML/JS change) ---
.portfolio-card {
    background-color: var(--bg-subtle);
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* If needed for image centering or text content */
    flex-direction: column; /* If text content is added below image */
    overflow: hidden; /* To contain image if it has different radius */
}

.portfolio-card img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px; /* Inner radius for the image */
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.5);
}

/* Example for text overlay on hover (would need an inner div for text)
.portfolio-card .overlay-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(var(--bg-main-rgb, 26,26,46), 0.85); /* Assuming --bg-main-rgb is defined */
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px; /* Match card radius */
}
.portfolio-card:hover .overlay-content {
    opacity: 1;
}
.portfolio-card .overlay-content h4 { margin-bottom: 5px; color: var(--accent-primary); }
.portfolio-card .overlay-content p { font-size: 0.9em; margin-bottom: 0; }
*/
/* ...existing code... */

/* Hamburger styles */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}
.hamburger span {
    display: block;
    height: 4px;
    margin: 5px 0;
    background: var(--text-main);
    border-radius: 2px;
    transition: 0.3s;
}

/* Responsive nav */
@media (max-width: 768px) {
    nav {
        position: fixed;
        top: 0;
        right: -100vw;
        width: 70vw;
        height: 100vh;
        background: var(--bg-subtle); /* Updated background for mobile nav */
        box-shadow: -2px 0 8px rgba(0,0,0,0.3); /* Adjusted shadow for dark theme */
        transition: right 0.3s;
        z-index: 1000;
        padding-top: 60px;
    }
    nav.open {
        right: 0;
    }
    nav ul {
        flex-direction: column;
        gap: 0;
    }
    nav ul li {
        margin: 20px 0;
        text-align: left;
    }
    .hamburger {
        display: flex;
    }
    .lang-button {
        width: auto; /* Allow button to size to content, or set specific width if needed */
        padding: 8px 15px; /* Ensure padding is consistent */
        margin: 15px auto; /* Centering the button if it's block */
        display: block; /* Make it block to center with auto margins */
        text-align: center;
    }
    .lang-menu-item {
        display: block;
    }
    .container {
        flex-wrap: wrap;
    }
}

/* Hide hamburger on desktop */
@media (min-width: 769px) { /* This media query seems to be for desktop nav layout */
    .hamburger {
        display: none;
    }
    nav {
        position: static;
        width: auto;
        height: auto;
        background: none;
        box-shadow: none;
        padding-top: 0;
        right: 0;
    }
    nav.open {
        right: 0;
    }
    .lang-menu-item {
        display: inline-block;
    }
}

/* ...existing code... */

/* Header container flex layout */
header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Hamburger styles */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent; /* Hamburger button itself is transparent */
    border: 1px solid var(--border-color); /* Optional: border for definition */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    cursor: pointer;
    z-index: 1001;
    margin-left: auto;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 3px;
    margin: 4px 0;
    background: var(--text-main); /* Hamburger icon lines */
    border-radius: 2px;
    transition: 0.3s;
}

/* Responsive nav */
@media (max-width: 768px) {
    nav {
        position: fixed;
        top: 0;
        right: -100vw;
        width: 70vw;
        height: 100vh;
        background: var(--bg-subtle); /* Updated background for mobile nav */
        box-shadow: -2px 0 8px rgba(0,0,0,0.3); /* Adjusted shadow for dark theme */
        transition: right 0.3s;
        z-index: 1000;
        padding-top: 60px;
        display: flex;
        flex-direction: column;
        align-items: flex-end; /* Right align menu items */
    }
    nav.open {
        right: 0;
    }
    nav ul {
        display: flex;
        flex-direction: column;
        align-items: flex-end; /* Right align menu items */
        width: 100%;
        gap: 0;
        padding-right: 24px;
    }
    nav ul li {
        margin: 20px 0;
        text-align: right;
        width: 100%;
    }
    .hamburger {
        display: flex;
    }
    .lang-button {
        width: 100%;
        margin: 20px 0 0 0;
    }
    .lang-menu-item {
        display: block;
    }
    .container {
        flex-wrap: wrap;
    }
}

/* Hide hamburger on desktop */
@media (min-width: 769px) {
    .hamburger {
        display: none;
    }
    nav {
        position: static;
        width: auto;
        height: auto;
        background: none;
        box-shadow: none;
        padding-top: 0;
        right: 0;
        display: block;
    }
    nav.open {
        right: 0;
    }
    nav ul {
        flex-direction: row;
        align-items: center;
        padding-right: 0;
    }
    nav ul li {
        margin: 0 12px;
        text-align: left;
        width: auto;
    }
    .lang-menu-item {
        display: inline-block;
    }
}

/* ...existing code... */
/* --- HEADER FLEX ALIGNMENT FIX --- */
header .container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
    height: 64px; /* Fixed height for header */
    padding: 0 20px;
}

/* Logo always vertically centered */
.logo {
    display: flex;
    align-items: center;
    height: 100%;
}
.logo img {
    height: 44px; /* Adjust as needed */
    width: auto;
    display: block;
}

/* Hamburger button always at right, same line as logo */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent; /* Hamburger button itself is transparent */
    border: 1px solid var(--border-color); /* Optional: border for definition */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    cursor: pointer;
    z-index: 1001;
    margin-left: 16px;
}

/* Show hamburger on mobile, keep it right of logo */
@media (max-width: 900px) {
    header .container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        height: 56px;
        padding: 0 12px;
    }
    /* nav {
        margin-left: auto; /* This line is redundant and has no effect due to subsequent nav rules for mobile */
    /* } */
    .hamburger {
        display: flex;
    }
    nav {
        position: fixed;
        top: 0;
        right: -100vw;
        width: 70vw;
        height: 100vh;
        background: var(--bg-subtle); /* Updated background for mobile nav */
        box-shadow: -2px 0 8px rgba(0,0,0,0.3); /* Adjusted shadow for dark theme */
        transition: right 0.3s;
        z-index: 1000;
        padding-top: 60px;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }
    nav.open {
        right: 0;
    }
    nav ul {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        width: 100%;
        gap: 0;
        padding-right: 24px;
    }
    nav ul li {
        margin: 20px 0;
        text-align: right;
        width: 100%;
    }
    .lang-button {
        width: 100%;
        margin: 20px 0 0 0;
    }
    .lang-menu-item {
        display: block;
    }
}

/* Desktop: nav inline, hamburger hidden */
@media (min-width: 901px) {
    .hamburger {
        display: none !important;
    }
    nav {
        position: static;
        width: auto;
        height: auto;
        background: none;
        box-shadow: none;
        padding-top: 0;
        right: 0;
        display: block;
        margin-left: 32px;
    }
    nav ul {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding-right: 0;
    }
    nav ul li {
        margin: 0 12px;
        text-align: left;
        width: auto;
    }
    .lang-menu-item {
        display: inline-block;
    }
}

/* Remove conflicting flex-direction: column from previous code */
@media (max-width: 768px) {
    header .container {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: 56px;
        padding: 0 8px;
    }
}

/* ...existing code... */
/* --- HEADER FLEX ALIGNMENT FIX --- */
header .container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
    height: 64px;
    padding: 0 20px;
}

/* Logo always vertically centered */
.logo {
    display: flex;
    align-items: center;
    height: 100%;
}
.logo img {
    height: 44px;
    width: auto;
    display: block;
}

/* Hamburger button always at right, same line as logo */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent; /* Hamburger button itself is transparent */
    border: 1px solid var(--border-color); /* Optional: border for definition */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    cursor: pointer;
    z-index: 1001;
    margin-left: 16px;
}

/* --- MOBILE: Center logo, hamburger right --- */
@media (max-width: 900px) {
    header .container {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        height: 56px;
        padding: 0 12px;
        position: relative;
    }
    .logo {
        grid-column: 2;
        justify-content: center;
    }
    .hamburger { /* Ensuring hamburger has correct display and background */
        display: flex;
        grid-column: 3;
        justify-self: end;
        background: transparent; /* Explicitly transparent */
        border: 1px solid var(--border-color); /* Consistent border */
    }
    nav {
        margin-left: 0;
        position: fixed;
        top: 0;
        right: -100vw;
        width: 70vw;
        height: 100vh;
        background: var(--bg-subtle); /* Updated background for mobile nav */
        box-shadow: -2px 0 8px rgba(0,0,0,0.3); /* Adjusted shadow for dark theme */
        transition: right 0.3s;
        z-index: 1000;
        padding-top: 60px;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
    }
    nav.open {
        right: 0;
    }
    nav ul {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        width: 100%;
        gap: 0;
        padding-right: 24px;
    }
    nav ul li {
        margin: 20px 0;
        text-align: right;
        width: 100%;
    }
    .lang-button {
        width: 100%;
        margin: 20px 0 0 0;
    }
    .lang-menu-item {
        display: block;
    }
}

/* Desktop: nav inline, hamburger hidden */
@media (min-width: 901px) {
    header .container {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        height: 64px;
        padding: 0 20px;
    }
    .logo {
        justify-content: flex-start;
    }
    .hamburger {
        display: none !important;
    }
    nav {
        position: static;
        width: auto;
        height: auto;
        background: none;
        box-shadow: none;
        padding-top: 0;
        right: 0;
        display: block;
        margin-left: 32px;
    }
    nav ul {
        display: flex;
        flex-direction: row;
        align-items: center;
        padding-right: 0;
    }
    nav ul li {
        margin: 0 12px;
        text-align: left;
        width: auto;
    }
    .lang-menu-item {
        display: inline-block;
    }
}

/* ...existing code... */
/* --- Always-visible Home Button --- */
.home-float-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 2000;
    background: var(--primary-color, #007BFF);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.home-float-btn:hover {
    background: var(--accent-color, #FFA500);
    box-shadow: 0 6px 24px rgba(0,0,0,0.22);
}
@media (max-width: 600px) {
    .home-float-btn {
        width: 44px;
        height: 44px;
        font-size: 1.4rem;
        right: 12px;
        bottom: 12px;
    }
}
/* ...existing code... */

/* --- Conceptual Portfolio Lightbox Styles --- */

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--bg-main-rgb, 26,26,46), 0.9); /* Dark overlay, using the RGB variable */
    display: none; /* Hidden by default, JS would show it */
    justify-content: center;
    align-items: center;
    z-index: 10000; /* Ensure it's on top */
    padding: 20px;
    box-sizing: border-box;
}

.lightbox-container {
    position: relative;
    background-color: var(--bg-subtle);
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.7);
    max-width: 90vw; /* Max width */
    max-height: 90vh; /* Max height */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-container img {
    max-width: 100%;
    max-height: calc(80vh - 80px); /* Adjust based on padding and caption height */
    display: block;
    border-radius: 4px;
    margin-bottom: 15px; /* Space for caption */
}

.lightbox-close {
    position: absolute;
    top: -15px; /* Position outside the container slightly */
    right: -15px;
    background-color: var(--accent-primary);
    color: var(--bg-main);
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 24px;
    line-height: 35px; /* Center the 'x' */
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: background-color 0.3s ease;
}
.lightbox-close:hover {
    background-color: #FFC14D; /* Lighter orange */
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(var(--accent-primary-rgb, 255,165,0), 0.8);
    color: var(--bg-main);
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 28px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10010; /* Above image container but below close if overlapping */
}
.lightbox-prev:hover,
.lightbox-next:hover {
    background-color: var(--accent-primary);
}

.lightbox-prev {
    left: -20px; /* Position outside container */
}

.lightbox-next {
    right: -20px; /* Position outside container */
}

.lightbox-caption {
    color: var(--text-main);
    text-align: center;
    font-size: 0.9em;
    max-width: 100%;
}

/* Responsive adjustments for smaller screens if lightbox buttons are too far out */
@media (max-width: 768px) {
    .lightbox-prev {
        left: 5px;
    }
    .lightbox-next {
        right: 5px;
    }
    .lightbox-container {
        padding: 15px;
    }
    .lightbox-container img {
        max-height: calc(80vh - 60px);
    }
    .lightbox-close {
        top: -10px;
        right: -10px;
        width: 30px;
        height: 30px;
        font-size: 20px;
        line-height: 30px;
    }
}

/* --- Main Section Fade-in Animation --- */
#about,
#projects,
#portfolio,
#services,
#contact {
    animation: fadeInSection 0.75s ease-out forwards;
}

@keyframes fadeInSection {
    from {
        opacity: 0;
        transform: translateY(20px); /* Optional: slight upward movement */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
