/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700;900&display=swap');

/* Custom styles beyond Tailwind */

:root {
    --primary-color: #2C3E50;
    --secondary-color: #E74C3C;
    --accent-color: #ECF0F1;
    --dark-color: #1a1a1a;
    --light-color: #ffffff;
    --gradient-primary: linear-gradient(135deg, #2C3E50 0%, #34495e 100%);
    --gradient-secondary: linear-gradient(135deg, #E74C3C 0%, #c0392b 100%);
    --gradient-accent: linear-gradient(135deg, rgba(236,240,241,0.1) 0%, rgba(255,255,255,0.8) 50%, rgba(236,240,241,0.1) 100%);
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --border-radius: 0.75rem;
    --border-radius-lg: 1.5rem;
}

/* Base styles */
* {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    background: var(--gradient-accent);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography enhancements */
h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
}

.text-gradient {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Navigation */
nav {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.nav-scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: var(--shadow-medium);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 100%;
}

/* Hero section with enhanced parallax effect */
.hero-section {
    background: none;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

.hero-section .parallax-bg {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?w=1920&h=1080&fit=crop&crop=center');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
    transform: translateZ(0);
    will-change: transform;
}

@media (max-width: 768px) {
    .hero-section .parallax-bg {
        background-attachment: scroll;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Enhanced card styles */
.service-card {
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-light);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-secondary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-heavy);
    border-color: rgba(231, 76, 60, 0.2);
}

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

.service-card .h-72 {
    position: relative;
}

.service-card .h-72::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(255,255,255,0.1) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.service-card:hover .h-72::after {
    opacity: 1;
}

/* Project cards enhancement */
.project-card {
    border-radius: var(--border-radius);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
}

/* Enhanced reference gallery */
.reference-gallery {
    position: relative;
}

.reference-main-image {
    transition: transform 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.reference-main-image img {
    transition: opacity 0.3s ease, transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reference-main-image:hover img {
    transform: scale(1.05);
}

.reference-thumbnails {
    position: relative;
    z-index: 1;
}

.reference-thumbnails > div {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
}

.reference-thumbnails > div::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-secondary);
    opacity: 0;
    transition: opacity 0.3s ease;
    mix-blend-mode: multiply;
}

.reference-thumbnails > div:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-light);
    border-color: var(--secondary-color);
}

.reference-thumbnails > div:hover::after {
    opacity: 0.2;
}

/* Enhanced Team Members */
.team-member {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.team-member::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    border-radius: var(--border-radius);
    opacity: 0;
    transition: opacity 0.4s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.team-member:hover::before {
    opacity: 1;
}

.team-member .rounded-full {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 4px solid transparent;
}

.team-member:hover .rounded-full {
    transform: scale(1.05);
    border-color: rgba(231, 76, 60, 0.3);
    box-shadow: var(--shadow-medium);
}

/* Enhanced buttons */
.btn-primary {
    position: relative;
    overflow: hidden;
    background: var(--gradient-secondary);
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-secondary {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    background: rgba(255,255,255,0.3);
    border-radius: 1px;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: var(--secondary-color);
    border-radius: 1px;
    animation: scrollDown 2s infinite;
}

@keyframes scrollDown {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(40px); opacity: 0; }
}

/* Enhanced animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
}

/* Enhanced form styles */
form input, form textarea {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: var(--border-radius);
    border: 2px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

form input:focus, form textarea:focus {
    border-color: var(--secondary-color);
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.1);
    transform: translateY(-2px);
}

/* Enhanced animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

/* Staggered animations for service cards */
.service-card, .team-member, .project-card {
    animation: fadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

.service-card:nth-child(1), .project-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2), .project-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3), .project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

.team-member:nth-child(1) { animation-delay: 0.1s; }
.team-member:nth-child(2) { animation-delay: 0.2s; }
.team-member:nth-child(3) { animation-delay: 0.3s; }
.team-member:nth-child(4) { animation-delay: 0.4s; }

/* Enhanced responsive design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 100vh;
    }
    
    .hero-section h1 {
        font-size: 3rem;
        line-height: 1.1;
    }
    
    .service-card:hover {
        transform: translateY(-4px) scale(1.01);
    }
    
    .section-title::after {
        width: 40px;
        height: 3px;
    }
}

@media (max-width: 640px) {
    .hero-section h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    .section-title::after {
        width: 30px;
        bottom: -6px;
    }
}

/* Large screen optimizations */
@media (min-width: 1280px) {
    .container {
        max-width: 1200px;
    }
}

/* Enhanced filter buttons */
.filter-btn {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-weight: 600;
    border: 2px solid transparent;
}

.filter-btn:hover:not(.active) {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.3);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--gradient-secondary);
    box-shadow: var(--shadow-light);
}

/* Office cards enhancement */
.office-image {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Enhanced modal styles */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.image-modal.modal-open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    transform: scale(0.8);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.image-modal.modal-open .modal-content {
    transform: scale(1);
}

.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    display: block;
    box-shadow: var(--shadow-heavy);
    border-radius: var(--border-radius);
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gradient-secondary);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.close-modal:hover {
    transform: scale(1.1);
    background: var(--primary-color);
}

/* ==========================================
   GALLERY GRID - Industrial Portfolio Style
   ========================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 12px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    background: var(--primary-color);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                filter 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Overlay effect */
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(44, 62, 80, 0.9) 0%,
        rgba(44, 62, 80, 0.4) 40%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

/* Zoom icon */
.gallery-icon {
    width: 56px;
    height: 56px;
    background: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transform: scale(0) rotate(-45deg);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 8px 32px rgba(231, 76, 60, 0.4);
}

.gallery-item:hover .gallery-icon {
    transform: scale(1) rotate(0deg);
}

/* Size variations for visual interest */
.gallery-item-tall {
    grid-row: span 2;
}

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

.gallery-item-full {
    grid-column: span 4;
}

/* 2x2 feature item */
.gallery-item-feature {
    grid-column: span 2;
    grid-row: span 2;
}

/* Red accent line on hover */
.gallery-item::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: var(--gradient-secondary);
    z-index: 10;
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover::before {
    width: 100%;
}

/* Staggered animation on load */
.gallery-item {
    animation: galleryFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

.gallery-item:nth-child(1) { animation-delay: 0.05s; }
.gallery-item:nth-child(2) { animation-delay: 0.1s; }
.gallery-item:nth-child(3) { animation-delay: 0.15s; }
.gallery-item:nth-child(4) { animation-delay: 0.2s; }
.gallery-item:nth-child(5) { animation-delay: 0.25s; }
.gallery-item:nth-child(6) { animation-delay: 0.3s; }
.gallery-item:nth-child(7) { animation-delay: 0.35s; }
.gallery-item:nth-child(8) { animation-delay: 0.4s; }
.gallery-item:nth-child(9) { animation-delay: 0.45s; }
.gallery-item:nth-child(10) { animation-delay: 0.5s; }

@keyframes galleryFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }

    .gallery-item-tall {
        grid-row: span 1;
    }

    .gallery-item-wide,
    .gallery-item-full,
    .gallery-item-feature {
        grid-column: span 2;
    }

    .gallery-item-feature {
        grid-row: span 2;
    }
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
        gap: 10px;
    }

    .gallery-item-tall,
    .gallery-item-wide,
    .gallery-item-full,
    .gallery-item-feature {
        grid-row: span 1;
        grid-column: span 1;
    }
}

/* ==========================================
   LIGHTBOX - Full Screen Image Viewer
   ========================================== */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 20, 0.97);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

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

.lightbox-content {
    max-width: 90vw;
    max-height: 85vh;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-lightbox.active .lightbox-content img {
    transform: scale(1);
    opacity: 1;
}

/* Close button */
.lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-close:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: rotate(90deg);
}

/* Navigation buttons */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox-prev {
    left: 24px;
}

.lightbox-next {
    right: 24px;
}

.lightbox-nav:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
}

/* Counter */
.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 20px;
    border-radius: 20px;
}

/* Mobile lightbox adjustments */
@media (max-width: 768px) {
    .lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .lightbox-prev {
        left: 12px;
    }

    .lightbox-next {
        right: 12px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 40px;
        height: 40px;
    }
} 