/* Custom Variables */
/* Custom Variables */
:root {
    --primary-color: #0093b2;
    /* Teal/Cyan from Logo */
    --primary-dark: #007791;
    --secondary-color: #F2E8CF;
    /* Cream/Beige */
    --text-dark: #212529;
    --text-muted: #6c757d;
    --font-playfair: 'Playfair Display', serif;
    --font-roboto: 'Roboto', sans-serif;
}

body {
    font-family: var(--font-roboto);
    color: var(--text-dark);
    line-height: 1.6;
}

/* --- Top Header --- */
.top-header {
    background-color: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.header-info-item .icon-wrapper {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.header-info-item:hover .icon-wrapper {
    transform: scale(1.1);
}

/* --- New Navbar --- */
#mainNav {
    background-color: var(--primary-color) !important;
    padding-top: 0;
    padding-bottom: 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#mainNav .nav-link {
    font-size: 0.9rem;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
    position: relative;
    opacity: 0.9;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
}


body {
    font-family: var(--font-roboto);
    color: var(--dark-color);
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-playfair {
    font-family: var(--font-playfair);
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 70vh;
    /* Reduced height as we have a big header now */
    min-height: 500px;
    background: url('img/hero.jpg') no-repeat center center scroll;
    background-size: cover;
    margin-bottom: 0;
}

/* Fallback if no hero image is present yet - dark wood texture or plain color */
.hero-section {
    background-color: #333;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Darker overlay with vignette effect */
    background: radial-gradient(circle, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
}

.hero-section h1,
.hero-section p {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Animations */
.animate-fade-up {
    animation: fadeUp 1s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

.delay-200 {
    animation-delay: 0.2s;
}

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

/* Buttons */
.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    border-radius: 50px;
    /* Rounded / Pill */
    padding: 12px 30px;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    color: #fff;
}

/* Divider */
.divider {
    height: 3px;
    width: 60px;
    background-color: var(--primary-color);
}

/* Portfolio Item */
.portfolio-item {
    transition: transform 0.3s ease;
    cursor: pointer;
}

.portfolio-img-wrapper {
    height: 300px;
    /* Fixed height for consistency */
    overflow: hidden;
}

.portfolio-img-wrapper img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-img-wrapper img {
    transform: scale(1.05);
    /* Slight zoom on hover */
}

/* Lightbox Enhancements */
.modal-backdrop.show {
    opacity: 0.9;
    /* Darker backdrop for better focus */
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    background-size: 1.5rem;
}

/* Contact Cards */
.contact-card {
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: var(--primary-color) !important;
}

/* Scroll Up Button */
#scrollUpBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    display: none;
    align-items: center;
    justify-content: center;
    border: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    background-color: var(--primary-color);
    color: white;
}

#scrollUpBtn:hover {
    background-color: #6d4620;
    transform: translateY(-3px);
}

#scrollUpBtn.show {
    display: flex;
    opacity: 1;
}

/* Filter Buttons */
#portfolio-filters .btn {
    border-width: 2px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    border-color: var(--primary-color);
    color: var(--primary-color);
    border-radius: 50px;
    /* Modern pill shape or use 6px for slightly rounded */
    padding: 0.5rem 1.5rem;
    /* Ensure enough padding */
}

#portfolio-filters .btn:hover,
#portfolio-filters .btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.text-warning {
    color: var(--primary-color) !important;
    /* Override standard warning color with our wood tone */
}

/* Utilities */
.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.object-fit-cover {
    object-fit: cover;
}

/* Navbar Styles */
#mainNav {
    background-color: rgb(33 37 41 / 35%);
    /* Transparent dark as requested */
    backdrop-filter: blur(10px);
    /* Glassmorphism effect */
    padding-top: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease-in-out;
}

#mainNav .navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
    font-weight: 700;
}

#mainNav .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: var(--secondary-color) !important;
}

/* Admin Preview Button */
.btn-admin-preview {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-admin-preview:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    color: #fff !important;
}

/* Footer & Other tweaks */
.footer {
    background-color: var(--primary-color);
}

.contact-icons a {
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.contact-icons a:hover {
    opacity: 0.8;
    transform: translateY(-3px);
}

/* --- Stats Section --- */
.stat-item {
    transition: transform 0.3s ease;
}

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

.stat-item:last-child {
    border-right: none !important;
}

.stat-prefix {
    font-size: 0.9rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .stat-item {
        border-right: none !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 2rem;
    }
}

.letter-spacing-2 {
    letter-spacing: 2px;
}

/* --- Contact Form Section --- */
#contact-form-section {
    background-color: var(--light-bg);
    position: relative;
}

#contact-form-section .form-control {
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

#contact-form-section .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 147, 178, 0.25);
}

/* Footer Fixes */
.footer h4 {
    color: var(--secondary-color) !important;
    /* Cream color for headings */
}

@media (max-width: 768px) {

    /* Hero Section Mobile Adjustments */
    .hero-section {
        height: auto;
        min-height: 600px;
        padding-top: 100px;
        /* Account for fixed header */
        padding-bottom: 50px;
    }

    .hero-section h1.display-3 {
        font-size: 2.2rem;
    }

    .hero-section p.lead {
        font-size: 1rem;
    }

    /* Center Portfolio Filters */
    #portfolio-filters .col-auto {
        text-align: center;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    #portfolio-filters .btn {
        margin-bottom: 0;
        /* Handled by gap */
        width: auto;
        /* Natural width */
        max-width: none;
        flex: 0 1 auto;
        /* Allow shrinking if needed but natural grow */
    }
}

/* --- Project Card Styles --- */
.project-card {
    position: relative;
    z-index: 1;
    margin: 10px;
    /* Space for stack effect */
}

/* Stack Effect (Pseudo-elements) */
.project-stack-effect {
    position: relative;
    z-index: 10;
    transition: transform 0.3s ease;
    background: #fff;
    /* Ensure image has background if transparent */
}

/* Create the appearance of cards underneath */
.project-card::before,
.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f8f9fa;
    /* Light gray for cards below */
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    z-index: 1;
    /* Below main image */
    transition: all 0.3s ease;
    border-radius: var(--bs-border-radius);
}

.project-card::before {
    transform: rotate(4deg) translate(4px, 4px);
    z-index: 2;
    background-color: #e9ecef;
}

.project-card::after {
    transform: rotate(8deg) translate(8px, 8px);
    z-index: 1;
    background-color: #dee2e6;
}

/* Hover Effect for Stack */
.project-card:hover .project-stack-effect {
    transform: translateY(-5px);
}

.project-card:hover::before {
    transform: rotate(6deg) translate(6px, 6px);
}

.project-card:hover::after {
    transform: rotate(12deg) translate(12px, 12px);
}

/* Overlay & Badge */
.project-overlay {
    transition: opacity 0.3s ease;
}

.hover-opacity-100:hover {
    opacity: 1 !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* Hide permanent text badge as requested */
.project-badge {
    display: none;
}

/* --- Project Modal Customization --- */
/* Transparent background */
#projectModal .modal-content {
    background-color: rgba(0, 0, 0, 0) !important;
    /* Semi-transparent dark */
    backdrop-filter: blur(5px);
}

#projectModal .modal-header {
    border-bottom: none;
    justify-content: center;
    /* Helper, but title needs w-100 */
}

#projectModalTitle {
    width: 100%;
    text-align: center;
}

/* Image container transparent */
#projectModal .bg-black {
    background-color: transparent !important;
}

/* Details section transparent */
#projectModal .bg-white {
    background-color: transparent !important;
    color: #fff !important;
}

#projectDescription {
    color: #f8f9fa !important;
    text-align: center;
}

/* Thumbnails Centered */
#projectThumbnails {
    justify-content: center;
}

/* Modal Gallery Scrollbar */
#projectThumbnails::-webkit-scrollbar {
    height: 8px;
}

#projectThumbnails::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

#projectThumbnails::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
}

#projectThumbnails::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* --- Gallery Transition Animations --- */
.gallery-image-wrapper {
    width: 100%;
    height: 65vh;
    /* Fixed height container to prevent jumping */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#projectMainImage {
    transition: opacity 0.3s ease-in-out;
    opacity: 1;
}

.fade-out {
    opacity: 0 !important;
}

/* --- Mobile Gallery Optimizations --- */
@media (max-width: 768px) {
    #projectModal .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }

    #projectModal .modal-content {
        height: 100%;
        border-radius: 0;
        backdrop-filter: blur(10px);
        /* Stronger blur on mobile */
        background-color: rgba(0, 0, 0, 0) !important;
    }

    #projectModal .modal-body {
        display: flex;
        flex-direction: column;
        justify-content: center;
        height: 100%;
    }

    .gallery-image-wrapper {
        height: 50vh;
        /* Smaller height on mobile */
    }

    #projectMainImage {
        max-height: 50vh !important;
    }

    /* Thumbnails larger on mobile for touch */
    #projectThumbnails img {
        height: 60px !important;
        width: 60px !important;
        transition: transform 0.3s ease, opacity 0.3s ease, filter 0.3s ease;
    }

    #projectThumbnails img.active-thumb {
        transform: scale(1.1);
        z-index: 10;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    }

    /* Adjust nav buttons positions */
    #projectModal .btn-link {
        background: rgba(0, 0, 0, 0.3);
        border-radius: 50%;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
    }

    #projectModal .bi-chevron-left,
    #projectModal .bi-chevron-right {
        font-size: 1.5rem;
        /* Smaller icons */
    }
}

/* Thumbnail Styles - Global override to remove bootstrap borders */
#projectThumbnails .img-thumbnail {
    padding: 0;
    border: none;
    background-color: transparent;
    border-radius: 4px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

#projectThumbnails .img-thumbnail:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

#projectThumbnails .img-thumbnail.active-thumb {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    border: none !important;
    /* Explicitly remove border as requested */
}

/* Fade in animation for new items */
@keyframes fadeInThumb {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 0.6;
        transform: translateY(0);
    }
}

@keyframes fadeInThumbActive {
    from {
        opacity: 0;
        transform: translateY(5px) scale(1.05);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1.05);
    }
}

.thumb-enter {
    animation: fadeInThumb 0.4s ease forwards;
}

.thumb-enter.active-thumb {
    animation: fadeInThumbActive 0.4s ease forwards;
}