.pcard-media img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    background-color: #f3f4f6;
    display: block;
}

/* Compact card title should have fixed height so all cards equalize */
.project-card-compact { display: flex; flex-direction: column; }
.pcard-titlebar { min-height: 48px; display: flex; align-items: center; justify-content: center; }
.pcard-titlebar h3 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-thumbnails img {
    background-color: #f3f4f6;
}
/* Performance: font-display swap for @import webfonts if any */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: local('Inter');
}
/* CSS Variables for Theme Support */
:root {
    /* Light Theme */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #e9ecef;
    --text-primary: #333333;
    --text-secondary: #7f8c8d;
    --text-light: #bdc3c7;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --nav-bg-scrolled: rgba(255, 255, 255, 0.98);
    --card-bg: #ffffff;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --overlay-bg: rgba(0, 0, 0, 0.4);
    --form-border: #e9ecef;
    --placeholder-bg: #f8f9fa;
    --placeholder-border: #e9ecef;
    --transition-normal: 0.3s ease;

/* Global text wrapping rules */
p, div, span, h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}
    --nav-height: 80px;
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-primary: #0f0f0f;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #242424;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-light: #999999;
    --nav-bg: rgba(15, 15, 15, 0.95);
    --nav-bg-scrolled: rgba(15, 15, 15, 0.98);
    --card-bg: #1a1a1a;
    --border-color: rgba(255, 255, 255, 0.15);
    --shadow-light: rgba(0, 0, 0, 0.4);
    --shadow-medium: rgba(0, 0, 0, 0.6);
    --overlay-bg: rgba(0, 0, 0, 0.8);
    --form-border: #333333;
    --placeholder-bg: #242424;
    --placeholder-border: #333333;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Improved dark theme transitions */
* {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Theme transition for all interactive elements */
[data-theme="dark"] *:hover {
    transition: all 0.3s ease;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.navbar.scrolled {
    background: var(--nav-bg-scrolled);
    box-shadow: 0 2px 20px var(--shadow-light);
}

.nav-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 130px 0 190px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--nav-height);
}

/* Logo (theme-aware, backgroundless look) */
.logo-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    display: block;
    background: transparent;
    /* Light theme: beyaz arka planı görünmez yapmak için */
    mix-blend-mode: multiply;
    transition: transform 160ms ease, filter 160ms ease;
}

.nav-logo:hover .logo-img { transform: translateY(-1px) scale(1.04); }

/* Dark theme: koyu zeminde logo parlak kalsın */
[data-theme="dark"] .logo-img {
    mix-blend-mode: screen;
    filter: brightness(1.1) saturate(1.1) contrast(1.05);
}

/* Dark theme navbar improvements */
[data-theme="dark"] .navbar {
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .navbar.scrolled {
    box-shadow: 0 2px 25px rgba(0, 0, 0, 0.5);
}

/* Dark theme logo text colors */
[data-theme="dark"] .logo-title {
    color: #4a9eff;
}

[data-theme="dark"] .logo-subtitle {
    color: #9ca3af;
}

[data-theme="dark"] .brand-name {
    color: #4a9eff;
}

/* Dark theme logo hover effects */
[data-theme="dark"] .nav-logo:hover .logo-title {
    color: #60b2ff;
    text-shadow: 0 0 15px rgba(74, 158, 255, 0.7);
}

[data-theme="dark"] .nav-logo:hover .logo-img {
    filter: brightness(1.2) saturate(1.2) contrast(1.1) drop-shadow(0 0 15px rgba(74, 158, 255, 0.5));
}



.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    height: var(--nav-height);
    padding: 0;
    position: relative;
}

/* Ensure logo sits flush to the left edge of navbar */
.nav-logo { margin-left: 0; }
@media (max-width: 768px) { .nav-logo { margin-left: 0; } }

.logo-img {
    width: calc(var(--nav-height) - 16px);
    height: calc(var(--nav-height) - 16px);
    object-fit: contain;
    flex-shrink: 0;
    background: transparent;
    clip-path: none;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
}

.logo-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0B4687;
    line-height: 1.1;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    transition: color 0.3s ease;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: #7f8c8d;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Hover effects */
.nav-logo:hover .logo-img {
    transform: scale(1.06);
    filter: drop-shadow(0 0 12px rgba(52, 152, 219, 0.6));
}

/* legacy logo-text rule removed */

/* New brand name next to icon */
.brand-name {
    font-size: 1.6rem;
    font-weight: 800;
    color: #0B4687;
    line-height: 1;
    white-space: nowrap;
}

/* Background-based logo to crop icon precisely */
.logo-icon {
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    background-image: url('nivalis_ps.png');
    background-repeat: no-repeat;
    /* Zoom in so only the emblem (left) is visible */
    background-size: 220% auto;
    /* Focus left/top area where the emblem sits */
    background-position: 8% 18%;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.nav-logo:hover .logo-icon { transform: scale(1.05); }

@media (max-width: 768px) {
    .logo-icon { width: 68px; height: 68px; background-size: 230% auto; }
}

/* New clean logo mark (no clip-path hacks) */
.logo-mark {
    width: 88px;
    height: 56px;
    flex-shrink: 0;
    background-image: url('nivalis_ps.png');
    background-repeat: no-repeat;
    background-size: 100% auto; /* fill width, crop bottom by element height */
    background-position: top center; /* show emblem at top */
    transition: transform 0.2s ease;
}

.nav-logo:hover .logo-mark { transform: scale(1.03); }

@media (max-width: 768px) {
    .logo-mark { width: 68px; height: 44px; }
}

@media (max-width: 768px) {
    .brand-name { font-size: 1.3rem; }
}

.nav-logo:hover .logo-title {
    color: #3498db;
    text-shadow: 0 0 12px rgba(52, 152, 219, 0.65);
}

/* Shimmer sweep over logo on hover */
.nav-logo::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 300%;
    height: var(--nav-height);
    background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
    pointer-events: none;
    opacity: 0;
}

/* Dark theme logo shimmer */
[data-theme="dark"] .nav-logo::after {
    background: linear-gradient(120deg, transparent 30%, rgba(96,178,255,0.3) 50%, transparent 70%);
}

.nav-logo:hover::after {
    opacity: 1;
    animation: logoShine 1.1s ease;
}

/* Simple active state */
.nav-logo:active {
    transform: scale(0.98);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 1rem;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #3498db;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3498db;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Dark theme nav links */
[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .nav-link.active {
    color: #60b2ff;
    text-shadow: 0 0 8px rgba(96, 178, 255, 0.4);
}

[data-theme="dark"] .nav-link::after {
    background: #60b2ff;
    box-shadow: 0 0 10px rgba(96, 178, 255, 0.6);
}

/* Brand text (clean logo replacement) */
.nav-brand { display: none; }

/* remove previous brand image/text split */

/* Accessible hidden text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* remove sprite-based brand */

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

/* Dark theme hamburger */
[data-theme="dark"] .hamburger:hover .bar {
    background: #60b2ff;
    box-shadow: 0 0 8px rgba(96, 178, 255, 0.4);
}

/* Navigation Controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.theme-toggle:hover {
    background: var(--bg-secondary);
    border-color: #3498db;
    color: #3498db;
    transform: scale(1.05);
}

/* Dark theme toggle styles */
[data-theme="dark"] .theme-toggle:hover {
    background: var(--bg-tertiary);
    border-color: #60b2ff;
    color: #60b2ff;
    box-shadow: 0 0 15px rgba(96, 178, 255, 0.3);
}

.language-selector {
    position: relative;
}

.language-toggle {
    background: none;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 15px 15px;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 80px;
}

.language-toggle:hover {
    background: var(--bg-secondary);
    border-color: #3498db;
    color: #3498db;
}

/* Dark theme language selector */
[data-theme="dark"] .language-toggle:hover {
    background: var(--bg-tertiary);
    border-color: #60b2ff;
    color: #60b2ff;
    box-shadow: 0 0 12px rgba(96, 178, 255, 0.25);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px var(--shadow-light);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    min-width: 180px;
    list-style: none;
    padding: 8px 0;
    margin-top: 5px;
}

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

.language-dropdown li {
    margin: 0;
}

.language-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.language-dropdown a:hover {
    background: var(--bg-secondary);
    color: #3498db;
}

/* Dark theme language dropdown */
[data-theme="dark"] .language-dropdown {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .language-dropdown a:hover {
    background: var(--bg-tertiary);
    color: #60b2ff;
}

.language-dropdown img {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Navigation Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .nav-link i {
    margin-left: 5px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--nav-bg);
    min-width: 200px;
    box-shadow: 0 5px 15px var(--shadow-light);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    padding: 10px 0;
    margin: 5px 0 0 0;
}

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

.nav-dropdown-link {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.nav-dropdown-link:hover {
    background: var(--bg-secondary);
    color: #3498db;
    padding-left: 25px;
}

/* Dark theme navigation dropdown */
[data-theme="dark"] .nav-dropdown-menu {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .nav-dropdown-link:hover {
    background: var(--bg-tertiary);
    color: #60b2ff;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: none;
    will-change: transform, opacity;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

/* Dark theme slide overlay */
[data-theme="dark"] .slide-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.slide-text {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 0 20px;
}

.slide-text h2 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    animation: slideUp 1s ease-out;
}

.slide-text p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    animation: slideUp 1s ease-out 0.2s both;
}

.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: slideUp 1s ease-out 0.4s both;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.3);
}

/* Dark theme button styles */
[data-theme="dark"] .btn-primary {
    background: #4a9eff;
    box-shadow: 0 5px 15px rgba(74, 158, 255, 0.2);
}

[data-theme="dark"] .btn-primary:hover {
    background: #60b2ff;
    box-shadow: 0 10px 30px rgba(96, 178, 255, 0.4);
    transform: translateY(-2px);
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 50px;
    z-index: 3;
}

.prev-btn,
.next-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.prev-btn:hover,
.next-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Dark theme slider controls */
[data-theme="dark"] .prev-btn,
[data-theme="dark"] .next-btn {
    background: rgba(74, 158, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .prev-btn:hover,
[data-theme="dark"] .next-btn:hover {
    background: rgba(96, 178, 255, 0.3);
    box-shadow: 0 0 20px rgba(96, 178, 255, 0.4);
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

/* Dark theme slider dots */
[data-theme="dark"] .dot {
    background: rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .dot.active {
    background: #60b2ff;
    box-shadow: 0 0 15px rgba(96, 178, 255, 0.6);
}

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #80a2c4;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: #7f8c8d;
    max-width: 600px;
    margin: 0 auto;
}

/* Dark theme section headers */
[data-theme="dark"] .section-header h2 {
    color: #60b2ff;
    text-shadow: 0 0 10px rgba(96, 178, 255, 0.3);
}

[data-theme="dark"] .section-header p {
    color: var(--text-secondary);
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.project-filters {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 2px solid var(--form-border);
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-2px);
}

/* Dark theme filter buttons */
[data-theme="dark"] .filter-btn:hover,
[data-theme="dark"] .filter-btn.active {
    background: #4a9eff;
    border-color: #4a9eff;
    box-shadow: 0 5px 15px rgba(74, 158, 255, 0.3);
}

.filter-btn:hover,
.filter-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-2px);
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 25px var(--shadow-light);
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
    height: 450px;
    display: flex;
    flex-direction: column;
}

.project-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow-medium);
}

/* Dark theme project cards */
[data-theme="dark"] .project-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .project-card:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border-color: rgba(74, 158, 255, 0.3);
}

.project-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(52, 152, 219, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 5px;
}

/* Dark theme project overlay */
[data-theme="dark"] .project-overlay {
    background: rgba(74, 158, 255, 0.9);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.view-project-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.view-project-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
}

/* Dark theme view project button */
[data-theme="dark"] .view-project-btn {
    background: #60b2ff;
}

[data-theme="dark"] .view-project-btn:hover {
    background: #4a9eff;
    box-shadow: 0 5px 15px rgba(96, 178, 255, 0.4);
}

.project-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2c3e50;
    line-height: 1.3;
}

.project-info p {
    color: #7f8c8d;
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

/* Dark theme project info */
[data-theme="dark"] .project-info h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .project-info p {
    color: var(--text-secondary);
}

.project-info .project-description {
    height: auto;
    min-height: 4.5em; /* 3 satır için */
    overflow: hidden;
}

.project-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.project-type,
.project-status {
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
}

.project-type {
    background: #e3f2fd;
    color: #1976d2;
}

.project-card[data-category="kooperatif"] .project-type {
    background: #fff3e0;
    color: #f57c00;
}

.project-status {
    background: #e8f5e8;
    color: #388e3c;
}

/* Services Section */
.services {
    padding: 80px 0;
}

.services .container {
    max-width: 1800px;
    padding: 0 20px;
}

.services .section-header {
    margin-bottom: 40px;
}

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

.service-category {
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 5px 25px var(--shadow-light);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.service-category:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px var(--shadow-medium);
}

/* Dark theme service categories */
[data-theme="dark"] .service-category {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .service-category:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    border-color: rgba(74, 158, 255, 0.3);
}

.service-header {
    text-align: center;
    padding: 35px 15px 25px;
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.6rem;
    color: white;
    transition: all 0.3s ease;
}

.service-category:hover .service-icon {
    transform: scale(1.1);
}

/* Dark theme service icon */
[data-theme="dark"] .service-icon {
    background: linear-gradient(135deg, #4a9eff, #3b82f6);
    box-shadow: 0 5px 15px rgba(74, 158, 255, 0.3);
}

[data-theme="dark"] .service-category:hover .service-icon {
    box-shadow: 0 8px 25px rgba(74, 158, 255, 0.5);
}

.service-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: #2c3e50;
}

.service-header p {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 0;
    font-size: 1.1rem;
}

/* Dark theme service header */
[data-theme="dark"] .service-header h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .service-header p {
    color: var(--text-secondary);
}

.service-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    flex: 1;
}

.service-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    cursor: pointer;
}

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

.service-image:hover img {
    transform: scale(1.1);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(52, 152, 219, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Dark theme image overlay */
[data-theme="dark"] .image-overlay {
    background: rgba(74, 158, 255, 0.8);
}

.service-image:hover .image-overlay {
    opacity: 1;
}

.image-overlay span {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    padding: 10px;
}

.placeholder-service-image {
    background: var(--placeholder-bg) !important;
    border: 2px dashed var(--placeholder-border) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.placeholder-service-image .placeholder-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.placeholder-service-image .placeholder-content i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.placeholder-service-image:hover {
    border-color: #3498db;
    background: #e3f2fd !important;
}

.placeholder-service-image:hover .placeholder-content {
    color: #3498db;
}

/* Multiple images gallery styles */
.view-all-images-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.view-all-images-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.gallery-thumbs img {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.gallery-thumbs img:hover {
    opacity: 1 !important;
}

/* Image modal styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
}

.image-modal-content {
    position: relative;
    background-color: #fff;
    margin: 2% auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    border-radius: 10px;
    max-height: 90vh;
    overflow-y: auto;
}

.image-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.image-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
}

.image-modal-close:hover {
    color: #000;
}

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

.image-grid-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

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

.image-grid-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.image-grid-item .image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 15px;
    font-size: 0.9rem;
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--bg-secondary);
}

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

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    white-space: normal;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 5px;
}

.stat p {
    color: var(--text-secondary);
    font-weight: 500;
}

.about-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
}

/* Contact Section */
.contact {
    padding: 100px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

/* Dark theme contact items */
[data-theme="dark"] .contact-item i {
    background: linear-gradient(135deg, #4a9eff, #3b82f6);
    box-shadow: 0 5px 15px rgba(74, 158, 255, 0.3);
}

[data-theme="dark"] .contact-item h4 {
    color: var(--text-primary);
}

.contact-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--form-border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--card-bg);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Dark theme form inputs */
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
    border-color: #4a9eff;
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.1);
}

[data-theme="dark"] .form-group input::placeholder,
[data-theme="dark"] .form-group textarea::placeholder {
    color: var(--text-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Cooperative Section */
.cooperative {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.coop-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.coop-feature {
    text-align: center;
    padding: 40px 20px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 5px 25px var(--shadow-light);
    transition: all 0.3s ease;
}

.coop-feature:hover {
    transform: translateY(-10px);
}

/* Dark theme coop features */
[data-theme="dark"] .coop-feature {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .coop-feature:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    border-color: rgba(74, 158, 255, 0.3);
}

.coop-feature i {
    font-size: 3rem;
    color: #3498db;
    margin-bottom: 20px;
}

.coop-feature h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
}

.coop-feature p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
}

/* Dark theme footer */
[data-theme="dark"] .footer {
    background: #0a0a0a;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.footer-logo-img {
    width: 55px;
    height: 55px;
    object-fit: contain;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #fbbf24;
}

/* Dark theme footer headings */
[data-theme="dark"] .footer-section h3,
[data-theme="dark"] .footer-section h4 {
    color: #60b2ff;
    text-shadow: 0 0 8px rgba(96, 178, 255, 0.3);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:visited { color: #cbd5e1; }

.footer-section ul li a:hover { color: #6366f1; }

/* Dark theme footer links */
[data-theme="dark"] .footer-section ul li a:hover { color: #8b5cf6; }

/* Ensure bright links also in dark theme base (not only on hover) */
[data-theme="dark"] .footer-section ul li a {
    color: #ffffff;
}

.footer-section p {
    color: var(--text-light);
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
    filter: none !important;
    opacity: 1 !important;
}

/* Dark theme social links */
[data-theme="dark"] .social-links a { border: none; filter: none !important; }

/* Sosyal medya renkleri */
.social-youtube:hover {
    background: #FF0000;
    transform: translateY(-3px);
}

.social-sahibinden:hover {
    background: #FF6600;
    transform: translateY(-3px);
}

.social-linkedin:hover {
    background: #0077B5;
    transform: translateY(-3px);
}

.social-instagram:hover {
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
    transform: translateY(-3px);
}

/* Nivalis logo butonu */
.social-nivalis {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid #ffffff30;
}

.social-nivalis:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.social-logo { width: 24px; height: 24px; object-fit: contain; filter: none !important; }

/* Make only the Nivalis logo white on its lacivert button */
.social-links a[data-social="nivalis"] .social-logo {
    filter: brightness(0) invert(1) !important;
}

/* Letter badge for Sahibinden like on reference site */
.social-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-weight: 800;
    color: #000;
}

/* Genel hover efekti */
.social-links a:hover { transform: translateY(-2px) scale(1.06); box-shadow: 0 12px 28px rgba(0,0,0,0.25); }

/* Font awesome icon boyutları */
.social-links a i { font-size: 18px; color: #ffffff; filter: none !important; }

/* Sosyal medya platform renkleri */
.social-links a[data-social="sahibinden"] { background: #f59e0b !important; color: #111827 !important; font-weight: 700; }

.social-links a[data-social="youtube"] { background: #FF0000 !important; }

.social-links a[data-social="linkedin"] { background: #0A66C2 !important; }

.social-links a[data-social="instagram"] { background: #E1306C !important; }

.social-links a[data-social="nivalis"] { background: #0B4687 !important; }

/* Hover efektleri */
.social-links a[data-social="sahibinden"]:hover {
    background: #FFE55C !important;
    transform: translateY(-3px);
}

.social-links a[data-social="youtube"]:hover {
    background: #CC0000 !important;
    transform: translateY(-3px);
}

.social-links a[data-social="linkedin"]:hover {
    background: #005885 !important;
    transform: translateY(-3px);
}

.social-links a[data-social="instagram"]:hover {
    background: linear-gradient(45deg, #e6683c 0%, #dc2743 25%, #cc2366 50%, #bc1888 75%, #8a2387 100%) !important;
    transform: translateY(-3px);
}

.social-links a[data-social="nivalis"]:hover {
    background: #8A2BE2 !important;
    transform: translateY(-3px);
}

.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid #334155; color: #cbd5e1; }

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Logo shimmer animation */
@keyframes logoShine {
    0% { transform: translateX(0); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateX(50%); opacity: 0; }
}

/* Mobile responsiveness for logo */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 20px;
        justify-content: space-between;
    }
    
    .nav-logo {
        gap: 10px;
        flex-shrink: 0;
        margin-left: 0 !important;
    }
    
    .logo-img {
        width: 50px;
        height: 50px;
    }
    
    .logo-title {
        font-size: 1.1rem;
    }
    
    .logo-subtitle {
        font-size: 0.6rem;
        letter-spacing: 0.8px;
    }
    
    .nav-controls {
        gap: 10px;
        flex-shrink: 0;
    }
    
    .language-toggle {
        padding: 6px 12px;
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    .theme-toggle {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .language-dropdown {
        right: 0;
        min-width: 160px;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        width: 100%;
        display: flex;
        flex-direction: column;
        background: var(--nav-bg);
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px var(--shadow-light);
        padding: calc(var(--nav-height) + 10px) 0 24px;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    /* Dark theme mobile nav menu */
    [data-theme="dark"] .nav-menu {
        background: var(--bg-secondary);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    /* Mobile dropdown */
    .nav-dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        box-shadow: none;
        background: var(--bg-secondary);
        margin: 0;
        padding: 0;
        border-radius: 0;
    }
    
    .nav-dropdown-link {
        padding: 10px 30px;
        border-left: 3px solid transparent;
    }
    
    .nav-dropdown-link:hover {
        border-left-color: #3498db;
        padding-left: 30px;
    }

    /* Dark theme mobile dropdown */
    [data-theme="dark"] .nav-dropdown-menu {
        background: var(--bg-tertiary);
    }

    [data-theme="dark"] .nav-dropdown-link:hover {
        border-left-color: #60b2ff;
        background: rgba(96, 178, 255, 0.1);
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .slide-text h2 {
        font-size: 2.5rem;
    }

    .slider-controls {
        padding: 0 20px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .project-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 15px;
    }

    .project-card {
        height: 380px;
    }

    .project-image {
        height: 200px;
    }

    .project-info {
        padding: 15px;
    }

    .project-info h3 {
        font-size: 1.1rem;
    }

    .project-info p {
        font-size: 0.9rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .stats {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-filters {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Footer social links mobile optimization */
    .social-links {
        justify-content: center;
        gap: 10px;
        margin-top: 15px;
    }
    
    .social-links a {
        width: 40px;
        height: 40px;
    }
    
    .social-links a i {
        font-size: 16px;
    }
    
    .social-logo {
        width: 24px;
        height: 24px;
    }
}

/* Mobile menu footer (inside full-screen hamburger menu) */
.mobile-menu-footer {
    display: none;
    margin-top: auto;
    padding: 16px 20px 8px;
    border-top: 1px solid var(--border-color);
}
.mobile-menu-footer .social-links { justify-content: center; gap: 12px; }
.mobile-menu-copy { margin-top: 10px; font-size: 0.85rem; color: var(--text-secondary); }

@media (max-width: 768px) {
    .mobile-menu-footer { display: block; }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-logo {
        gap: 8px;
    }
    
    .logo-img {
        width: 45px;
        height: 45px;
    }
    
    .logo-title {
        font-size: 1rem;
    }
    
    .logo-subtitle {
        font-size: 0.55rem;
        letter-spacing: 0.5px;
    }
    
    .slide-text h2 {
        font-size: 2rem;
    }

    .slide-text p {
        font-size: 1rem;
    }

    .btn-primary {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .project-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .project-card {
        height: 320px;
    }

    .project-image {
        height: 160px;
    }

    .project-info {
        padding: 12px;
    }

    .project-info h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .project-info p {
        font-size: 0.85rem;
        margin-bottom: 8px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .view-project-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .project-type,
    .project-status {
        font-size: 0.75rem;
        padding: 4px 8px;
    }

    .services-grid,
    .coop-features {
        grid-template-columns: 1fr;
    }

    .service-images {
        grid-template-columns: 1fr;
    }

    .service-image {
        height: 160px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
    
    .service-header {
        padding: 25px 15px 20px;
    }
    
    .service-header h3 {
        font-size: 1.3rem;
    }
    
    .service-category {
        min-height: 400px;
    }

    .container {
        padding: 0 15px;
    }
}

/* Tablet responsive design */
@media (max-width: 1200px) {
    .services .container {
        max-width: 1500px;
        padding: 0 15px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 900px) {
    .services .container {
        max-width: 100%;
        padding: 0 12px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* About Page Specific Styles */
.about-hero {
    background: #1a237e;
    padding: 150px 0 100px;
    text-align: center;
    color: white;
}

.about-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.about-hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.about-detailed {
    padding: 100px 0;
    background: var(--bg-primary);
}

.about-detailed .about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.about-detailed .about-content.about-content-text-only {
    display: block;
    grid-template-columns: none;
    gap: 0;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.about-detailed .about-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 15px 40px var(--shadow-medium);
}

.about-detailed .about-text h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 700;
}

.about-content-text-only .about-text h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 40px;
}

.about-detailed .about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    white-space: normal;
}

.stats-section {
    background: #f8f9fa;
    padding: 80px 0;
}

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

.stat-item {
    background: white;
    padding: 40px 20px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 500;
}

.values-section {
    padding: 100px 0;
    background: var(--bg-primary);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.value-item {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 25px var(--shadow-light);
    text-align: center;
    transition: transform 0.3s ease;
}

.value-item:hover {
    transform: translateY(-5px);
}

.value-icon {
    width: 80px;
    height: 80px;
    background: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 2rem;
    color: white;
}

.value-item h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.value-item p {
    color: var(--text-primary);
    line-height: 1.6;
}

/* About page responsive */
@media (max-width: 768px) {
    .about-hero h1 {
        font-size: 2.5rem;
    }
    
    .about-hero p {
        font-size: 1.1rem;
    }
    
    .about-detailed .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-detailed .about-content.about-content-text-only {
        display: block;
        grid-template-columns: none;
        gap: 0;
        text-align: center;
    }
    
    .about-content-text-only .about-text h2 {
        font-size: 2.2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-detailed .about-text h2 {
        font-size: 2rem;
    }
}

/* Loading and Transition Effects */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Category Pages Styles */
.page-header { display: none !important; }

.page-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.page-overlay { display: none !important; }

.page-title {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.page-title h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.page-title p {
    font-size: 1.25rem;
    margin-bottom: 20px;
    opacity: 0.9;
}

.breadcrumb {
    font-size: 1rem;
    opacity: 0.8;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 1;
}

.category-projects {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.category-project-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.project-detail-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-light);
    display: flex;
    flex-direction: column;
    gap: 0;
    transition: all 0.3s ease;
}

/* Compact card for 4-in-row grid */
.project-card-compact {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 18px var(--shadow-light);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.project-card-compact:hover { transform: translateY(-4px); box-shadow: 0 12px 28px var(--shadow-medium); }
.pcard-titlebar { background: #fff; padding: 10px 12px; text-align: center; border-bottom: 1px solid var(--border-color); }
.pcard-titlebar h3 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.pcard-media { position: relative; width: 100%; aspect-ratio: 4/3; overflow: hidden; }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* removed overlay title; now title sits above media */

@media (max-width: 1200px) { .category-project-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .category-project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .category-project-grid { grid-template-columns: 1fr; } }

.project-detail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-medium);
}

.project-gallery {
    position: relative;
    width: 100%;
}

.project-main-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    padding: 40px;
}

.project-left-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.project-right-section {
    display: flex;
    flex-direction: column;
    gap: 25px;
    min-width: 0; /* Allow flex item to shrink */
    overflow: hidden; /* Prevent content overflow */
}

/* Visual separators for sections */
.project-left-section .main-image { border: 1px solid var(--border-color); border-radius: 8px; }
.project-left-section .thumbs-carousel { border: 1px dashed var(--border-color); border-radius: 8px; padding: 8px; }
.project-left-section .project-videos { border: 1px dashed var(--border-color); border-radius: 8px; padding: 8px; }

.main-image {
    height: 300px;
    overflow: hidden;
}

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

/* Fullscreen button on main image */
.main-image { position: relative; }
.fullscreen-btn {
    position: absolute;
    right: 10px;
    bottom: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
}
.fullscreen-btn:hover { background: rgba(0,0,0,0.8); transform: scale(1.05); }

.project-detail-card:hover .main-image img {
    transform: scale(1.05);
}

/* Thumbnails carousel */
.thumbs-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}
.thumbs-track {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
}
.thumbs-track img.thumb {
    width: 72px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0.75;
    border: 2px solid transparent;
    transition: var(--transition-normal);
}
.thumbs-track img.thumb:hover { opacity: 1; transform: scale(1.03); }
.thumbs-track img.thumb.active { opacity: 1; border-color: #3498db; }
.thumb-nav {
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
}
.thumb-nav:hover { background: rgba(0,0,0,0.7); }

.placeholder-thumb {
    width: 100%;
    height: 100%;
    background: var(--placeholder-bg);
    border: 2px dashed var(--placeholder-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
}

.placeholder-thumb i {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.placeholder-thumb:hover {
    border-color: #3498db;
    color: #3498db;
    background: #e3f2fd;
}

.project-details {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: fit-content;
    min-width: 0;
    overflow: hidden;
    word-wrap: break-word;
}

.project-details h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #7698b9;
    margin-bottom: 15px;
}

.project-details p {
    color: #7f8c8d;
    line-height: 1.8;
    margin-bottom: 25px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    overflow: hidden;
}

.project-features {
    margin-bottom: 25px;
}

.project-features h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #819fbd;
    margin-bottom: 15px;
}

.project-features ul {
    list-style: none;
    padding: 0;
}

.project-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #555;
}

.project-features li i {
    color: #27ae60;
    font-size: 0.9rem;
}

/* Project intro text styling */
.project-intro {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.05));
    border-left: 4px solid #34dbdb;
    border-radius: 6px;
    padding: 15px 20px;
    margin: 15px 0;
    font-size: 1.05em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.project-intro p {
    margin: 0;
    color: #7d94ac;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
    max-width: 100%;
    overflow: hidden;
}

/* Project videos styling */
.project-videos {
    margin: 25px 0px;
}

.project-left-section .project-videos {
    margin-top: 25px;
}

/* Remove video heading spacing in new design */
.project-videos h4 { display: none; }

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.video-item {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.video-item iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.video-thumbnail:hover {
    background: #e9ecef;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #e74c3c;
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-play-button:hover {
    background: white;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 800px;
    aspect-ratio: 16/9;
}

.video-modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-close:hover {
    color: #ccc;
}

/* Image Zoom Modal */
.image-zoom-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10001;
    justify-content: center;
    align-items: center;
}

.zoom-modal-content {
    position: relative;
    width: 90%;
    height: 90%;
    display: flex;
    flex-direction: column;
}

.zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10002;
}

.zoom-btn, .zoom-close {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.zoom-btn:hover, .zoom-close:hover {
    background: white;
    transform: scale(1.1);
}

.zoom-close {
    background: rgba(255, 59, 48, 0.9);
    color: white;
}

.zoom-close:hover {
    background: rgba(255, 59, 48, 1);
}

.zoom-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: grab;
}

.zoom-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

/* Responsive zoom controls */
@media (max-width: 768px) {
    .zoom-controls {
        top: 10px;
        right: 10px;
        gap: 5px;
    }
    
    .zoom-btn, .zoom-close {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
}

.project-info {
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    color: #555;
}

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

.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-content .btn-primary {
    background: white;
    color: #3498db;
}

.cta-content .btn-primary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* Projects Page Styles */
.projects-page {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.load-more-section {
    text-align: center;
    margin-top: 60px;
}

.load-more-btn {
    margin-bottom: 20px;
}

.project-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Enhanced About Section for longer content */
.about-content {
    display: block;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text {
    margin-bottom: 40px;
}

.about-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 30px;
}

.about-text-content {
    display: grid;
    gap: 20px;
    text-align: left;
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.about-content-text-only .about-text-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    gap: 30px;
    font-size: 1.2rem;
}

.about-text-content p {
    margin: 0;
    padding: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    white-space: normal;
}

.about-image {
    margin-top: 40px;
}

.about-image img {
    width: 100%;
    max-width: 600px;
    border-radius: 15px;
    box-shadow: 0 10px 30px var(--shadow-light);
}

/* Responsive for category pages */
@media (max-width: 768px) {
    .page-title h1 {
        font-size: 2rem;
    }
    
    .page-title p {
        font-size: 1rem;
    }
    
    .project-main-content {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 20px;
    }
    
    .gallery-thumbs {
        height: 80px;
    }
    
    .main-image {
        height: 250px;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .about-text h2 {
        font-size: 2rem;
    }
    
    .about-text-content {
        font-size: 1rem;
    }
    
    .footer-logo {
        gap: 8px;
    }
    
    .footer-logo-img {
        width: 40px;
        height: 40px;
    }
}

/* RTL Support for Arabic */
[dir="rtl"] {
    direction: rtl;
}

[dir="rtl"] .nav-menu {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav-controls {
    flex-direction: row-reverse;
}

[dir="rtl"] .language-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .language-dropdown a {
    flex-direction: row-reverse;
}

[dir="rtl"] .contact-form {
    text-align: right;
}

[dir="rtl"] .form-group input,
[dir="rtl"] .form-group textarea {
    text-align: right;
}

[dir="rtl"] .footer-content {
    text-align: right;
}

[dir="rtl"] .contact-item {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .slide-text {
    text-align: right;
}

@media (max-width: 768px) {
    [dir="rtl"] .nav-controls {
        gap: 10px;
        flex-direction: row-reverse;
    }
    
    [dir="rtl"] .language-dropdown {
        left: 0;
        right: auto;
    }
}

/* Image Gallery Modal */
.image-gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    overflow: auto; /* allow page-level scroll if needed */
}

.image-gallery-content { display: none; }

/* New compact project modal */
.pm-container {
    position: relative;
    width: min(1100px, 92vw);
    max-height: 92vh;
    background: var(--card-bg);
    border-radius: 14px;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
}
.pm-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--bg-secondary); border-bottom: 1px solid var(--border-color); }
.pm-header h3 { margin: 0; font-size: 1.2rem; color: var(--text-primary); }
.pm-body { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; padding: 16px; max-height: calc(92vh - 56px); overflow: hidden; }
.pm-media { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pm-carousel { position: relative; background: var(--bg-primary); height: 440px; display: flex; align-items: center; justify-content: center; overflow: hidden; border-radius: 8px; }
.pm-slide { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.pm-slide img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.pm-video { position: relative; width: 100%; height: 100%; }
.pm-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }
.pm-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.6); color: #fff; border: 0; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.pm-nav.prev { left: 10px; }
.pm-nav.next { right: 10px; }
.pm-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 6px 2px; }
.pm-thumb { position: relative; width: 80px; height: 60px; border-radius: 6px; overflow: hidden; cursor: pointer; border: 2px solid transparent; }
.pm-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-thumb.active { border-color: #3498db; }
.pm-thumb.video .pm-play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(0,0,0,0.25); }
.pm-details { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 8px; padding: 12px; overflow: auto; }
.pm-details-title { font-weight: 800; font-size: 1rem; margin: 0 0 8px; color: var(--text-primary); }
.pm-details p { color: var(--text-primary); margin: 0 0 12px; font-size: .95rem; line-height: 1.5; }
.pm-contact { display: inline-block; margin-top: 8px; }

@media (max-width: 900px) { .pm-body { grid-template-columns: 1fr; max-height: calc(92vh - 56px); } }

/* Ensure inner body can scroll independently */
.image-gallery-content .gallery-main { overflow: hidden; }
.image-gallery-content .gallery-thumbnails { overflow-x: auto; }

.gallery-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition-normal);
}

.gallery-close-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.gallery-header {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.gallery-header h3 {
    color: var(--text-primary);
    margin: 0;
    font-size: 1.5rem;
}

.gallery-main {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    max-height: 55vh;
    background: var(--bg-primary);
}

.gallery-main-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow: auto; /* scroll if image taller */
}

.gallery-main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 5px;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition-normal);
    z-index: 10001;
}

.gallery-nav-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.gallery-nav-btn.prev {
    left: 20px;
}

.gallery-nav-btn.next {
    right: 20px;
}

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    padding: 12px 16px 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    overflow-x: auto;
    max-height: 110px;
}

.gallery-thumbnails img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition-normal);
    border: 2px solid transparent;
}

.gallery-thumbnails img:hover {
    opacity: 1;
}

.gallery-thumbnails img.active {
    opacity: 1;
    border-color: #3498db;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    aspect-ratio: 16/9;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: var(--transition-normal);
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.video-modal iframe {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

/* Project video styles */
.project-videos {
    margin-top: 20px;
}

.project-videos h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.video-item {
    position: relative;
}

.video-thumbnail {
    position: relative;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-normal);
}

.video-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--shadow-medium);
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.video-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    color: #e74c3c;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: var(--transition-normal);
}

.video-thumbnail:hover .video-play-button {
    background: #e74c3c;
    color: white;
}

/* Responsive Design for Modals */
@media (max-width: 768px) {
    .image-gallery-content {
        max-width: 95vw;
        max-height: 95vh;
    }
    
    .gallery-main {
        min-height: 300px;
        max-height: 50vh;
    }
    
    .gallery-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .gallery-nav-btn.prev {
        left: 10px;
    }
    
    .gallery-nav-btn.next {
        right: 10px;
    }
    
    .gallery-thumbnails {
        padding: 15px 10px;
    }
    
    .gallery-thumbnails img {
        width: 60px;
        height: 45px;
    }
    
    .video-modal-content {
        max-width: 95vw;
        max-height: 80vh;
    }
    
    .video-modal-close {
        top: -40px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* No Projects Message */
.no-projects-message {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 60px 20px;
    text-align: center;
}

.no-projects-content {
    max-width: 500px;
    background: var(--card-bg);
    padding: 60px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-light);
    border: 2px solid var(--border-color);
}

.no-projects-content i {
    font-size: 4rem;
    color: #3498db;
    margin-bottom: 20px;
    opacity: 0.8;
}

.no-projects-content h3 {
    color: var(--text-primary);
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.no-projects-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.no-projects-content .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    text-decoration: none;
    transition: var(--transition-normal);
}

.no-projects-content .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

@media (max-width: 768px) {
    .no-projects-content {
        padding: 40px 20px;
        margin: 0 10px;
    }
    
    .no-projects-content i {
        font-size: 3rem;
    }
    
    .no-projects-content h3 {
        font-size: 1.5rem;
    }
    
    .no-projects-content p {
        font-size: 1rem;
    }
}
