/* ============================================
   PROJECTS PAGE SIDEBAR + CARDS
   Used in resources/views/project.blade.php
   ============================================ */

/* ---- Mobile filter button ---- */
.mobile-filter-btn-wrap {
    display: block;
    margin-bottom: 1.5rem;
}

.mobile-filter-btn-wrap button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: 1.5px solid #0B3228;
    border-radius: 999px;
    background: white;
    font-size: 0.875rem;
    cursor: pointer;
    color: #0B3228;
    font-family: inherit;
}

/* ---- Mobile filter overlay ---- */
#mobile-filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 200;
}

#mobile-filter-overlay.open {
    display: block;
}

/* ---- Mobile filter slide-out sidebar ---- */
#mobile-filter-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 201;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    padding: 2rem 1.5rem;
    overflow-y: auto;
}

#mobile-filter-sidebar.open {
    transform: translateX(0);
}

.mobile-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #c2eddf;
}

.mobile-filter-header h3 {
    font-weight: bold;
    font-size: 1rem;
}

.mobile-filter-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #0B3228;
    line-height: 1;
}

.mobile-filter-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
}

.mobile-filter-item p {
    text-align: left;
}

.mobile-filter-item.active p {
    font-weight: bold;
    color: #1F6B5A;
}

/* Hide mobile filter elements on desktop */
@media (min-width: 768px) {
    .mobile-filter-btn-wrap,
    #mobile-filter-overlay,
    #mobile-filter-sidebar {
        display: none !important;
    }
}

/* About Us: extra gap between filter label and cards (profile images overflow 75px above cards) */
.team-filter-label {
    margin-bottom: 5rem;
}

/* About Us: center team cards on mobile (single-column) */
@media (max-width: 639px) {
    .team-grid {
        justify-items: center;
    }
}

/* Mobile: center content, shorter cards */
@media (max-width: 767px) {
    .projects-section {
        width: 100%;
        max-width: 100%;
        padding-left: 5%;
        padding-right: 5%;
        box-sizing: border-box;
    }

    .project-layout,
    .project-layout > div {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .project-card-img-wrap {
        height: 200px;
    }

    .project-card-img-wrap img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* ---- Desktop sidebar: hidden on mobile, shown as column on md+ ---- */
.project-sidebar {
    display: none;
    border-right: 1px solid #e5e7eb;
}

@media (min-width: 768px) {
    .project-sidebar {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        width: auto;
        flex-shrink: 0;
        padding-right: 2rem;
    }
}

.project-sidebar .project-tab,
.project-sidebar .project-tab p {
    text-align: left !important;
    width: 100%;
}

/* Sidebar heading: line extends to meet the vertical right border */
.project-sidebar h3 {
    position: relative;
    width: 100%;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.project-sidebar h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: -2rem;
    height: 1px;
    background-color: #c2eddf;
}

/* Filter items: left align, no border */
.project-sidebar .project-tab {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    text-align: left;
}

.project-sidebar .project-tab p,
.project-sidebar h3 {
    white-space: nowrap;
}

.project-sidebar .project-tab p {
    text-align: left;
    display: inline-block;
    position: relative;
}

/* Pre-reserve bold width so hover doesn't push anything */
.project-sidebar .project-tab p::after {
    content: attr(data-text);
    font-weight: bold;
    display: block;
    height: 0;
    overflow: hidden;
    visibility: hidden;
    pointer-events: none;
}

.project-sidebar .project-tab:hover p {
    font-weight: bold;
    color: #1F6B5A;
}

/* Project card title: normal weight, font shrinks on smaller screens */
.project-card-title {
    font-size: 1rem;
    font-weight: normal;
    max-width: 80%;
}

@media (max-width: 1280px) {
    .project-card-title { font-size: 0.9rem; }
}

@media (max-width: 900px) {
    .project-card-title { font-size: 0.8rem; }
}

/* Layout: sidebar stretches to match grid height so the vertical line goes all the way down */
.project-layout {
    align-items: stretch;
}

/* Card: reset link styles, teal border, light green background, rounded corners */
.project-card,
.project-card:hover,
.project-card:visited,
.project-card:active {
    background-color: #ddf5ee;
    text-decoration: none !important;
    color: inherit !important;
    border-radius: 8px;
    overflow: hidden;
    border: 1.5px solid #0B3228;
}

.project-card h3,
.project-card p,
.project-card span {
    text-decoration: none !important;
    color: inherit !important;
}

/* Image wrapper fills available space above the title box */
.project-card-img-wrap {
    height: 300px;
    flex-shrink: 0;
}

/* Card bottom bar: light mint, fits content with equal padding */
.project-card-bottom {
    background-color: #ddf5ee;
    border-top: 1.5px solid #0B3228;
    flex-shrink: 0;
}

/* Hover: grayscale image + green overlay */
.project-card-img-wrap img {
    transition: filter 0.3s ease;
}

.project-card:hover .project-card-img-wrap img {
    filter: grayscale(100%);
}

.project-card-overlay {
    position: absolute;
    inset: 0;
    background-color: #1F6B5A;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* ============================================
   PROCESS MATRIX IMAGE
   Used in resources/views/index.blade.php
   ============================================ */

/* Mobile: slight padding on both sides */
.process-matrix-img {
    width: 80%;
}

/* Desktop (lg: 1024px+): more padding, roughly half width */
@media (min-width: 1024px) {
    .process-matrix-img {
        width: 70%;
    }
}

/* ============================================
   SWIPER / CAROUSEL STYLES
   Styles for project sliders and client logos
   ============================================ */

/* Main swiper container - enables grab cursor for dragging */
.swiper {
    cursor: grab !important;
}

/* Change cursor to grabbing when actively dragging */
.swiper:active {
    cursor: grabbing !important;
}

/* Center content within swiper slides */
.swiper-slide {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Ensure project cards are centered on mobile */
@media (max-width: 1023px) {
    .swiper-slide > div {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Client logo slide - transparent background */
.swiper-slide2 {
    background: transparent;
}

/* Custom navigation buttons positioning (prev/next arrows) */
.custom-navigation {
    position: absolute;
    top: 50%;
    right: 0px;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
    z-index: 100;
}

/* Pagination dots positioning */
.swiper-pagination {
    bottom: 20px !important;
}

/* Active pagination bullet color */
.swiper-pagination-bullet-active {
    background-color: #07F29C;
}

/* Pagination bullet size */
.swiper-pagination-bullet {
    width: 15px;
    height: 15px;
}

/* ============================================
   TEXT LAYOUT & READABILITY
   Responsive max-widths and centering for better reading experience
   ============================================ */

/* Center all headlines and paragraphs except in hero section and project detail page */
h1:not(.hero-section h1):not(.hero-section *):not(.project-view *),
p:not(.hero-section p):not(.hero-section *):not(.project-view *) {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Base max-width - prevents text from stretching too wide */
h1 {
    max-width: 90%;
    font-weight: 700;
    color: #0b3228;
}

p {
    max-width: 90%;
}

/* Mobile and Tablet - add padding to prevent text hitting edges */
@media (max-width: 1023px) {
    h1:not(.hero-section h1):not(.hero-section *),
    p:not(.hero-section p):not(.hero-section *) {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Desktop - comfortable reading width on standard monitors */
@media (min-width: 1024px) {
    h1 {
        max-width: 900px;
    }
    
    p {
        max-width: 800px;
    }
}

/* Large screens - slightly wider for bigger displays */
@media (min-width: 1536px) {
    h1 {
        max-width: 1100px;
    }
    
    p {
        max-width: 950px;
    }
}

/* Ultra-large screens (4K etc) - maximum comfortable width */
@media (min-width: 2560px) {
    h1 {
        max-width: 1400px;
    }
    
    p {
        max-width: 1200px;
    }
}

/* ============================================
   CLIENT LOGO GRID
   Grid utilities not yet in compiled Tailwind
   ============================================ */

.inline-grid {
    display: inline-grid;
}

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

.mt-20 {
    margin-top: 5rem; /* Tailwind mt-20 */
}

.clients-section {
    margin-bottom: 5vh;
}

.logo-grid {
    gap: 5rem; /* Tailwind gap-20 equivalent */
}

@media (min-width: 768px) {
    .md\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .md\:gap-x-16 {
        column-gap: 4rem;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ============================================
   SERVICES PAGE — MOBILE ACCORDION
   Divider line between accordion header and expanded content (service.blade.php)
   ============================================ */

.accordion-body-divider {
    border-top: 1px solid #0b3228;
}
