/* ===================================
   RB Designer Portfolio - Luxurious Theme
   =================================== */

/* ===== CSS VARIABLES ===== */
:root {
    --primary: #0a0a0a;
    --secondary: #1a1a1a;
    --accent: #d4af37;
    --accent-light: #f4d878;
    --white: #ffffff;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --gradient-gold: linear-gradient(135deg, #d4af37, #f4d878, #d4af37);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 30px rgba(212, 175, 55, 0.3);
    --bg-overlay: rgba(10, 10, 10, 0.95);
    --card-bg: #1a1a1a;
    --border-color: rgba(212, 175, 55, 0.1);
    --nav-bg: rgba(10, 10, 10, 0.95);
}

/* Light Theme */
[data-theme="light"] {
    --primary: #ffffff;
    --secondary: #f8f8f8;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --bg-overlay: rgba(255, 255, 255, 0.95);
    --card-bg: #ffffff;
    --border-color: rgba(212, 175, 55, 0.3);
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 30px rgba(212, 175, 55, 0.2);
    --nav-bg: rgba(255, 255, 255, 0.95);
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Tajawal', sans-serif;
    background: var(--primary);
    color: var(--text-primary);
    line-height: 1.8;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

/* ===== PARTICLES CANVAS ===== */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    pointer-events: none;
}

/* ===== CONTROL BUTTONS ===== */
.control-buttons {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    display: flex;
    gap: 10px;
}

[dir="ltr"] .control-buttons {
    left: auto;
    right: 20px;
}

.control-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: var(--secondary);
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.control-btn:hover {
    background: var(--accent);
    color: var(--primary);
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.theme-toggle {
    font-size: 1.2rem;
}

/* ===== ANIMATED BACKGROUND ===== */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: var(--primary);
    overflow: hidden;
    pointer-events: none;
}

.bg-icon {
    position: absolute;
    font-size: 3rem;
    opacity: 0;
    color: var(--accent);
    animation: floatIcon 25s infinite ease-in-out;
}

@keyframes floatIcon {
    0%, 100% {
        opacity: 0;
        transform: translateY(100vh) rotate(0deg);
    }
    10% {
        opacity: 0.03;
    }
    50% {
        opacity: 0.05;
    }
    90% {
        opacity: 0.03;
    }
    95% {
        opacity: 0;
        transform: translateY(-100vh) rotate(360deg);
    }
}

/* ===== GRADIENT OVERLAY ===== */
.gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(212, 175, 55, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    pointer-events: none;
}

/* ===== CURSOR GLOW ===== */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    padding: 1rem 0;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.logo-text {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.2rem;
}

.logo-dot {
    width: 10px;
    height: 10px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 3rem;
}

[dir="rtl"] .nav-links {
    gap: 3rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

[dir="ltr"] .nav-link::after {
    right: auto;
    left: 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 28px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 6rem 5% 4rem;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    animation: fadeInUp 1s ease forwards;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s forwards;
    opacity: 0;
}

.badge-line {
    width: 60px;
    height: 1px;
    background: var(--accent);
}

.badge-text {
    font-size: 0.9rem;
    letter-spacing: 0.3rem;
    text-transform: uppercase;
    color: var(--accent);
}

.hero-title {
    font-size: clamp(4rem, 12vw, 10rem);
    font-weight: 900;
    line-height: 1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease 0.4s forwards;
    opacity: 0;
}

.hero-title .title-line {
    display: block;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title .title-line:last-child {
    font-size: 0.6em;
    opacity: 0.7;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    animation: fadeInUp 1s ease 0.8s forwards;
    opacity: 0;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 1s forwards;
    opacity: 0;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.4s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--gradient-gold);
    color: #0a0a0a;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #0a0a0a;
    transform: translateY(-3px);
}

.btn-secondary {
    background: var(--accent);
    color: #0a0a0a;
}

.btn-secondary:hover {
    background: var(--accent-light);
    transform: translateY(-3px);
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    animation: fadeInUp 1s ease 1.2s forwards;
    opacity: 0;
}

.scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, var(--accent), transparent);
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

.scroll-text {
    font-size: 0.75rem;
    letter-spacing: 0.2rem;
    text-transform: uppercase;
    color: var(--text-secondary);
}

/* ===== SECTION STYLES ===== */
.section-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
}

.section-number {
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 80px;
    height: 3px;
    background: var(--gradient-gold);
}

[dir="ltr"] .section-title::after {
    right: auto;
    left: 0;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: 8rem 0;
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 5rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.image-placeholder i {
    font-size: 5rem;
    color: var(--accent);
    opacity: 0.5;
}

.image-border {
    position: absolute;
    top: 15px;
    right: -15px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.5;
}

[dir="ltr"] .image-border {
    right: auto;
    left: -15px;
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-gold);
    padding: 1rem 2rem;
    border-radius: 60px;
    text-align: center;
    box-shadow: var(--shadow-glow);
}

.exp-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 900;
    color: #0a0a0a;
    line-height: 1;
}

.exp-text {
    font-size: 0.85rem;
    color: #0a0a0a;
    font-weight: 600;
}

.about-content {
    padding: 2rem 0;
}

.about-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-role {
    font-size: 1.2rem;
    color: var(--accent);
    margin-bottom: 2rem;
    font-weight: 500;
}

.about-text p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 2;
}

.skills-showcase {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.5rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.skill-tag:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.skill-tag i {
    color: var(--accent);
    font-size: 1.1rem;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio {
    padding: 8rem 0;
    background: var(--secondary);
    position: relative;
}

.portfolio::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.portfolio-intro {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
    max-width: 600px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.portfolio-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s ease;
}

.portfolio-item:hover {
    transform: translateY(-10px);
}

.portfolio-item.large {
    grid-column: span 2;
    grid-row: span 2;
    aspect-ratio: auto;
}

.portfolio-item.wide {
    grid-column: span 2;
}

.item-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .item-bg {
    transform: scale(1.1);
}

.bg-1 { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); }
.bg-2 { background: linear-gradient(135deg, #2d132c 0%, #801336 100%); }
.bg-3 { background: linear-gradient(135deg, #0f3460 0%, #16213e 100%); }
.bg-4 { background: linear-gradient(135deg, #1b1b2f 0%, #162447 100%); }
.bg-5 { background: linear-gradient(135deg, #2c003e 0%, #512b58 100%); }
.bg-6 { background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%); }

.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.9) 100%);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.item-category {
    display: inline-block;
    background: var(--accent);
    color: #0a0a0a;
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    width: fit-content;
}

.item-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.item-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.item-link {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 45px;
    height: 45px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0a0a0a;
    font-size: 1rem;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.4s ease 0.1s;
}

[dir="ltr"] .item-link {
    left: auto;
    right: 1.5rem;
}

.portfolio-item:hover .item-link {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-cta {
    text-align: center;
    margin-top: 3rem;
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: 8rem 0;
    position: relative;
}

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

.service-card {
    background: var(--secondary);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-gold);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
}

.service-icon i {
    font-size: 2rem;
    color: var(--accent);
}

.service-card:hover .service-icon {
    background: var(--accent);
    transform: scale(1.1) rotate(10deg);
}

.service-card:hover .service-icon i {
    color: #0a0a0a;
}

.service-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 8rem 0;
    background: var(--secondary);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.contact-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 2;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-primary);
}

.contact-item i {
    width: 45px;
    height: 45px;
    background: rgba(212, 175, 55, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    padding: 2rem;
    background: var(--primary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: all 0.4s ease;
    min-width: 120px;
}

.social-link i {
    font-size: 2.5rem;
    color: var(--text-primary);
    transition: all 0.4s ease;
}

.social-link span {
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: color 0.4s ease;
}

.social-link:hover {
    transform: translateY(-10px);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.social-link:hover i {
    transform: scale(1.2);
}

.social-link[data-social="facebook"]:hover i { color: #1877F2; }
.social-link[data-social="instagram"]:hover i {
    background: linear-gradient(45deg, #F09433, #E6683C, #DC2743, #CC2366, #BC1888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.social-link[data-social="behance"]:hover i { color: #1769ff; }
.social-link[data-social="pinterest"]:hover i { color: #E60023; }
.social-link[data-social="tiktok"]:hover i { color: var(--white); }

/* ===== FOOTER ===== */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

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

.footer-brand {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
}

.footer-social a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    color: var(--accent);
    transform: translateY(-3px);
}

/* ===== PROJECT SECTION ===== */
.project-section {
    background: var(--primary);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    margin-bottom: 3rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.project-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.project-category {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1rem;
}

.project-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

.project-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.btn-sm {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* ===== GALLERY ===== */
.gallery-main {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 1rem;
    background: var(--secondary);
}

.gallery-main:hover .gallery-overlay {
    opacity: 1;
}

.gallery-main:hover .main-image {
    transform: scale(1.03);
}

.main-image {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-icon {
    width: 70px;
    height: 70px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.gallery-icon i {
    font-size: 1.8rem;
    color: #0a0a0a;
}

.gallery-count {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
}

/* ===== THUMBNAILS ===== */
.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.thumb-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    aspect-ratio: 4/3;
}

.thumb-item:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.thumb-item.active {
    border-color: var(--accent);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(212, 175, 55, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.thumb-overlay i {
    font-size: 1.5rem;
    color: #0a0a0a;
}

/* ===== GALLERY MODAL ===== */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.gallery-modal.active {
    display: flex;
}

.gallery-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.gallery-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 45px;
    height: 45px;
    background: var(--accent);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

[dir="ltr"] .gallery-close {
    right: 0;
    left: auto;
}

.gallery-close:hover {
    background: var(--accent-light);
    transform: rotate(90deg);
}

.gallery-close i {
    font-size: 1.2rem;
    color: #0a0a0a;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-nav:hover {
    background: var(--accent);
}

.gallery-nav:hover i {
    color: #0a0a0a;
}

.gallery-nav.prev {
    right: -70px;
}

.gallery-nav.next {
    left: -70px;
}

[dir="ltr"] .gallery-nav.prev {
    right: auto;
    left: -70px;
}

[dir="ltr"] .gallery-nav.next {
    left: auto;
    right: -70px;
}

.gallery-nav i {
    font-size: 1.2rem;
    color: var(--white);
}

.gallery-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 300px;
}

.gallery-full-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 12px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.gallery-counter {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    padding: 1rem 0;
}

.gallery-counter span {
    color: var(--accent);
    font-weight: 700;
}

.gallery-thumbnails {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    padding: 1rem 0;
    overflow-x: auto;
}

.modal-thumb {
    width: 70px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.5;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.modal-thumb:hover {
    opacity: 0.8;
}

.modal-thumb.active {
    border-color: var(--accent);
    opacity: 1;
}

.modal-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }

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

    .portfolio-item.large,
    .portfolio-item.wide {
        grid-column: span 1;
    }

    .contact-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-details {
        align-items: center;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-top: 1px solid var(--border-color);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: clamp(3rem, 15vw, 5rem);
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .section-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

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

    .social-links {
        gap: 1rem;
    }

    .social-link {
        padding: 1.5rem;
        min-width: 100px;
    }

    .social-link i {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.5rem;
    }

    .gallery-nav.prev {
        right: 10px;
    }

    .gallery-nav.next {
        left: 10px;
    }

    [dir="ltr"] .gallery-nav.prev {
        right: 10px;
        left: auto;
    }

    [dir="ltr"] .gallery-nav.next {
        left: 10px;
        right: auto;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
    }

    .modal-thumb {
        width: 50px;
        height: 35px;
    }

    .gallery-thumbnails {
        gap: 0.5rem;
    }

    .control-buttons {
        top: 15px;
        left: 15px;
        gap: 8px;
    }

    [dir="ltr"] .control-buttons {
        left: auto;
        right: 15px;
    }

    .control-btn {
        width: 40px;
        height: 40px;
    }
}
