/* ===================================
   Projects Page Styles
   =================================== */

/* Hero Section */
.projects-hero {
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--color-black) 100%);
    padding: 180px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.projects-hero::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: radial-gradient(
        circle 500px,
        rgba(234, 37, 42, 0.3) 0%, 
        rgba(234, 37, 42, 0.15) 25%, 
        rgba(234, 37, 42, 0.05) 50%,
        transparent 70%
    );
    background-size: 100% 100%;
    animation: lensFlare 12s ease-in-out infinite;
    z-index: 1;
    opacity: 0.8;
}

@keyframes lensFlare {
    0% { 
        background-position: 20% 50%;
    }
    25% {
        background-position: 80% 30%;
    }
    50% { 
        background-position: 70% 70%;
    }
    75% {
        background-position: 30% 60%;
    }
    100% { 
        background-position: 20% 50%;
    }
}

/* Powerful Moving Sun Effect - Below the gradient */
.projects-hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2000px;
    height: 2000px;
    margin: -1000px 0 0 -1000px;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 200, 200, 0.5) 4%,
        rgba(234, 37, 42, 0.4) 8%, 
        rgba(234, 37, 42, 0.3) 12%, 
        rgba(234, 37, 42, 0.2) 18%,
        rgba(234, 37, 42, 0.12) 25%,
        rgba(234, 37, 42, 0.06) 35%,
        rgba(234, 37, 42, 0.03) 45%,
        rgba(234, 37, 42, 0.015) 55%,
        rgba(234, 37, 42, 0.005) 65%,
        transparent 75%
    );
    animation: powerfulSun 18s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes powerfulSun {
    0% { 
        transform: translate(-15%, 0%);
        opacity: 0.5;
    }
    25% {
        transform: translate(15%, -10%);
        opacity: 0.8;
    }
    50% { 
        transform: translate(15%, 10%);
        opacity: 1;
    }
    75% {
        transform: translate(-15%, 10%);
        opacity: 0.8;
    }
    100% { 
        transform: translate(-15%, 0%);
        opacity: 0.5;
    }
}

/* Lens Flare Reflections */
.lens-flare-reflections {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.flare {
    position: absolute;
    border-radius: 50%;
    animation: flareMove 18s ease-in-out infinite;
}

/* Flare 1 - Hexagonal aperture reflection */
.flare-1 {
    width: 140px;
    height: 140px;
    top: 50%;
    left: 50%;
    margin: -70px 0 0 -70px;
    background: 
        radial-gradient(circle, rgba(234, 37, 42, 0.06) 0%, transparent 70%),
        conic-gradient(from 0deg, 
            rgba(255, 100, 120, 0.08) 0deg 60deg,
            transparent 60deg 120deg,
            rgba(255, 100, 120, 0.08) 120deg 180deg,
            transparent 180deg 240deg,
            rgba(255, 100, 120, 0.08) 240deg 300deg,
            transparent 300deg 360deg);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    filter: blur(2px);
}

/* Flare 2 - Rainbow chromatic aberration */
.flare-2 {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 50%;
    margin: -50px 0 0 -50px;
    background: 
        radial-gradient(circle at 45% 45%, rgba(255, 100, 100, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(100, 255, 100, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 55% 55%, rgba(100, 100, 255, 0.08) 0%, transparent 50%);
    filter: blur(3px);
    animation-name: flareMove2;
}

/* Flare 3 - Bright starburst */
.flare-3 {
    width: 80px;
    height: 80px;
    top: 50%;
    left: 50%;
    margin: -40px 0 0 -40px;
    background: 
        radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 200, 200, 0.1) 20%, transparent 50%),
        linear-gradient(0deg, transparent 45%, rgba(255, 255, 255, 0.12) 50%, transparent 55%),
        linear-gradient(90deg, transparent 45%, rgba(255, 255, 255, 0.12) 50%, transparent 55%),
        linear-gradient(45deg, transparent 45%, rgba(255, 255, 255, 0.08) 50%, transparent 55%),
        linear-gradient(135deg, transparent 45%, rgba(255, 255, 255, 0.08) 50%, transparent 55%);
    filter: blur(1px);
    animation-name: flareMove3;
}

/* Flare 4 - Soft glow with ring */
.flare-4 {
    width: 60px;
    height: 60px;
    top: 50%;
    left: 50%;
    margin: -30px 0 0 -30px;
    background: 
        radial-gradient(circle, rgba(255, 200, 200, 0.12) 0%, rgba(234, 37, 42, 0.08) 30%, transparent 40%),
        radial-gradient(circle, transparent 35%, rgba(255, 150, 150, 0.1) 40%, transparent 50%);
    filter: blur(2px);
    animation-name: flareMove4;
}

/* Main flare - FAR opposite to sun */
@keyframes flareMove {
    0% { 
        transform: translate(250%, 0%);
        opacity: 0.4;
    }
    25% {
        transform: translate(-250%, 150%);
        opacity: 0.7;
    }
    50% { 
        transform: translate(-250%, -150%);
        opacity: 0.9;
    }
    75% {
        transform: translate(250%, -150%);
        opacity: 0.7;
    }
    100% { 
        transform: translate(250%, 0%);
        opacity: 0.4;
    }
}

/* Flare 2 - Middle distance opposite */
@keyframes flareMove2 {
    0% { 
        transform: translate(180%, 0%);
        opacity: 0.3;
    }
    25% {
        transform: translate(-180%, 110%);
        opacity: 0.6;
    }
    50% { 
        transform: translate(-180%, -110%);
        opacity: 0.8;
    }
    75% {
        transform: translate(180%, -110%);
        opacity: 0.6;
    }
    100% { 
        transform: translate(180%, 0%);
        opacity: 0.3;
    }
}

/* Flare 3 - Closer opposite */
@keyframes flareMove3 {
    0% { 
        transform: translate(130%, 0%);
        opacity: 0.5;
    }
    25% {
        transform: translate(-130%, 80%);
        opacity: 0.8;
    }
    50% { 
        transform: translate(-130%, -80%);
        opacity: 1;
    }
    75% {
        transform: translate(130%, -80%);
        opacity: 0.8;
    }
    100% { 
        transform: translate(130%, 0%);
        opacity: 0.5;
    }
}

/* Flare 4 - Near center opposite */
@keyframes flareMove4 {
    0% { 
        transform: translate(90%, 0%);
        opacity: 0.4;
    }
    25% {
        transform: translate(-90%, 55%);
        opacity: 0.7;
    }
    50% { 
        transform: translate(-90%, -55%);
        opacity: 0.9;
    }
    75% {
        transform: translate(90%, -55%);
        opacity: 0.7;
    }
    100% { 
        transform: translate(90%, 0%);
        opacity: 0.4;
    }
}

.hero-content-center {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.projects-hero .section-label {
    display: inline-block;
    background: rgba(234, 37, 42, 0.2);
    color: var(--color-red);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.projects-hero-title {
    font-size: 56px;
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: 20px;
    line-height: 1.2;
}

.projects-hero-title span {
    color: var(--color-red);
}

.projects-hero-subtitle {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    line-height: 1.6;
}

.breadcrumbs-simple {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.breadcrumbs-simple .current {
    color: var(--color-red);
    font-weight: 600;
}

/* Filter Section */
.projects-filter {
    padding: 40px 0;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.filter-wrapper {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 12px 28px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.filter-btn:hover {
    border-color: var(--color-red);
    color: var(--color-red);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--color-red);
    border-color: var(--color-red);
    color: white;
}

/* Projects Grid Section */
.projects-grid-section {
    padding: 80px 0;
    background-color: var(--bg-primary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    position: relative;
    width: 100%;
    grid-auto-flow: row;
}

.project-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease, 
                border-color 0.3s ease;
    opacity: 1;
    transform: translateY(0) scale(1);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    cursor: pointer;
    position: relative;
    width: 100%;
    min-width: 0;
}

.project-item.lazy-hidden {
    opacity: 0;
    transform: translateY(30px);
}

/* Loading Spinner */
.projects-loader {
    display: none;
    text-align: center;
    padding: 40px 0;
    margin: 40px 0;
}

.projects-loader.active {
    display: block;
}

.projects-loader-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--color-red);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.projects-loader-text {
    margin-top: 15px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom Tooltip */
.project-item::before {
    content: 'Click for details';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--color-red);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(234, 37, 42, 0.3);
    margin-bottom: 8px;
}

.project-item::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--color-red);
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 100;
    margin-bottom: 2px;
}

.project-item:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

.project-item:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

.project-item.hide {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 1, 1), 
                transform 0.25s cubic-bezier(0.4, 0, 1, 1);
}

.project-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--color-red);
}

[data-theme="dark"] .project-item:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Project Image */
.project-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(234, 37, 42, 0.05) 0%, rgba(234, 37, 42, 0.1) 100%);
}

.image-placeholder svg {
    width: 80px;
    height: 80px;
    stroke: var(--text-secondary);
    opacity: 0.3;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.project-category {
    display: inline-block;
    background: var(--color-red);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Project Content */
.project-content {
    padding: 25px;
}

.project-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.3;
}

.project-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.project-meta {
    display: flex;
    gap: 20px;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.meta-item svg {
    width: 16px;
    height: 16px;
    stroke: var(--color-red);
}

/* CTA Section */
.projects-cta {
    background: linear-gradient(135deg, var(--color-red) 0%, #c71f24 100%);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.projects-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.projects-cta::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cta-content-center {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.projects-cta h2 {
    font-size: 48px;
    font-weight: 800;
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
}

.projects-cta h2 span {
    color: rgba(255, 255, 255, 0.9);
}

.projects-cta p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-white {
    background-color: white;
    color: var(--color-red);
    border: 2px solid white;
}

.btn-white:hover {
    background-color: transparent;
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background-color: white;
    color: var(--color-red);
}

/* Project Modal */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile */
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.project-modal.active {
    display: flex;
    opacity: 1;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: var(--bg-primary);
    border-radius: 20px;
    overflow: hidden;
    z-index: 10001;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: var(--color-red);
    backdrop-filter: blur(10px);
    border: 2px solid var(--color-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10002;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #c71f24;
    border-color: #c71f24;
    transform: rotate(90deg) scale(1.1);
}

.modal-close svg {
    width: 20px;
    height: 20px;
    stroke: white;
}

.modal-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    max-height: 90vh;
}

/* Modal Carousel */
.modal-carousel {
    position: relative;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s ease;
}

.modal-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

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

.modal-carousel-slide .image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(234, 37, 42, 0.05) 0%, rgba(234, 37, 42, 0.1) 100%);
}

.modal-carousel-slide .image-placeholder svg {
    width: 100px;
    height: 100px;
    stroke: var(--text-secondary);
    opacity: 0.3;
}

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

.modal-carousel-btn:hover {
    background: var(--color-red);
    transform: translateY(-50%) scale(1.1);
}

.modal-carousel-btn svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-black);
}

.modal-carousel-btn:hover svg {
    stroke: white;
}

.modal-carousel-btn.prev {
    left: 20px;
}

.modal-carousel-btn.next {
    right: 20px;
}

.modal-carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

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

.modal-carousel-dot.active {
    background: var(--color-red);
    width: 24px;
    border-radius: 4px;
}

/* Modal Details */
.modal-details {
    padding: 40px;
    overflow-y: auto;
    background: var(--bg-primary);
    max-height: 90vh;
}

/* Hide scroll indicator on desktop */
.modal-scroll-indicator {
    display: none;
}

.modal-details::-webkit-scrollbar {
    width: 8px;
}

.modal-details::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.modal-details::-webkit-scrollbar-thumb {
    background: var(--color-red);
    border-radius: 4px;
}

.modal-details::-webkit-scrollbar-thumb:hover {
    background: #c71f24;
}

.modal-header {
    margin-bottom: 25px;
}

.modal-category {
    display: inline-block;
    background: rgba(234, 37, 42, 0.1);
    color: var(--color-red);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
}

.modal-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin: 0;
}

.modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.modal-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.modal-meta-item svg {
    width: 18px;
    height: 18px;
    stroke: var(--color-red);
}

.modal-description {
    margin-bottom: 30px;
}

.modal-description h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.modal-description p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.modal-highlights {
    margin-bottom: 30px;
}

.modal-highlights h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.modal-highlights ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-highlights li {
    font-size: 15px;
    color: var(--text-secondary);
    padding: 8px 0 8px 30px;
    position: relative;
}

.modal-highlights li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-red);
    font-weight: 700;
    font-size: 18px;
}

.modal-services {
    margin-bottom: 30px;
}

.modal-services h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.modal-services-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-service-tag {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.modal-service-tag:hover {
    border-color: var(--color-red);
    color: var(--color-red);
}

.modal-cta {
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

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

/* Tablet Responsive */
@media (max-width: 1024px) {
    .projects-hero-title {
        font-size: 48px;
    }

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

    .projects-filter {
        top: 70px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .projects-hero {
        padding: 120px 0 80px;
    }

    .projects-hero-title {
        font-size: 36px;
    }

    .projects-hero-subtitle {
        font-size: 18px;
    }

    .projects-filter {
        padding: 25px 0;
    }

    .filter-wrapper {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .projects-grid-section {
        padding: 50px 0;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .project-image {
        height: 220px;
    }

    .project-content {
        padding: 20px;
    }

    .project-title {
        font-size: 20px;
    }

    .projects-cta {
        padding: 60px 0;
    }

    .projects-cta h2 {
        font-size: 32px;
    }

    .projects-cta p {
        font-size: 18px;
    }

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

    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
        position: relative;
        margin: 20px auto;
    }

    .modal-content {
        grid-template-columns: 1fr;
        max-height: 95vh;
        overflow-y: auto;
        scroll-behavior: smooth;
    }

    .modal-content::-webkit-scrollbar {
        width: 4px;
    }

    .modal-content::-webkit-scrollbar-track {
        background: transparent;
    }

    .modal-content::-webkit-scrollbar-thumb {
        background: var(--color-red);
        border-radius: 2px;
    }

    /* Scroll Indicator Gradient - Mobile Only */
    .modal-container::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 100px;
        background: linear-gradient(to top, 
            var(--bg-primary) 0%, 
            rgba(var(--bg-primary-rgb), 0.9) 40%,
            transparent 100%);
        pointer-events: none;
        z-index: 10;
        opacity: 1;
        transition: opacity 0.3s ease;
    }

    .modal-container.scrolled-bottom::after {
        opacity: 0;
    }

    /* Scroll Indicator Button - Mobile Only */
    .modal-scroll-indicator {
        display: flex;
        position: absolute;
        bottom: 25px;
        left: 50%;
        transform: translateX(-50%);
        background: var(--color-red);
        color: white;
        border: none;
        border-radius: 50%;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 11;
        opacity: 1;
        transition: all 0.3s ease;
        box-shadow: 0 4px 20px rgba(234, 37, 42, 0.4);
        animation: scrollBounce 2s ease-in-out infinite;
    }

    .modal-scroll-indicator:hover {
        background: #c71f24;
        transform: translateX(-50%) scale(1.1);
        box-shadow: 0 6px 25px rgba(234, 37, 42, 0.5);
        animation: none;
    }
    
    .modal-scroll-indicator:active {
        transform: translateX(-50%) scale(0.95);
        background: #a01a1e;
    }

    .modal-container.scrolled-bottom .modal-scroll-indicator {
        opacity: 0;
        pointer-events: none;
    }

    .scroll-arrow {
        width: 22px;
        height: 22px;
        stroke: white;
        stroke-width: 2.5;
        animation: arrowBounce 2s ease-in-out infinite;
    }

    @keyframes scrollBounce {
        0%, 100% {
            transform: translateX(-50%) translateY(0);
            opacity: 1;
        }
        50% {
            transform: translateX(-50%) translateY(10px);
            opacity: 0.7;
        }
    }

    @keyframes arrowBounce {
        0%, 100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(4px);
        }
    }

    .modal-carousel {
        height: 300px;
        flex-shrink: 0;
    }

    .modal-details {
        padding: 30px 25px 100px;
        overflow-y: visible;
        max-height: none;
    }

    .modal-title {
        font-size: 26px;
    }

    .modal-meta {
        flex-direction: column;
        gap: 12px;
    }

    .modal-carousel-btn {
        width: 40px;
        height: 40px;
    }

    .modal-carousel-btn.prev {
        left: 10px;
    }

    .modal-carousel-btn.next {
        right: 10px;
    }

    .modal-close {
        position: absolute;
        top: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        z-index: 10003;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
        background: rgba(234, 37, 42, 0.95);
        backdrop-filter: blur(10px);
    }
    
    .project-modal {
        padding: 0;
        align-items: flex-start;
        overflow-y: scroll;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    /* Prevent background scrolling when modal is open */
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }
    
    .modal-container {
        width: 100%;
        max-width: 100%;
        max-height: none;
        min-height: 100vh;
        min-height: 100dvh;
        margin: 0;
        border-radius: 0;
        overflow: visible;
    }
    
    .modal-content {
        max-height: none;
        overflow: visible;
    }
}

@media (max-width: 480px) {
    .projects-hero {
        padding: 100px 0 60px;
    }

    .projects-hero-title {
        font-size: 28px;
    }

    .projects-hero-subtitle {
        font-size: 16px;
    }

    .filter-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-btn {
        width: 100%;
    }

    .project-image {
        height: 200px;
    }

    .project-content {
        padding: 18px;
    }

    .project-title {
        font-size: 18px;
    }

    .project-description {
        font-size: 14px;
    }

    .project-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .projects-cta h2 {
        font-size: 26px;
    }

    .projects-cta p {
        font-size: 16px;
    }

    .modal-container {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-content {
        max-height: 100vh;
    }

    .modal-carousel {
        height: 250px;
    }

    .modal-details {
        padding: 25px 20px;
    }

    .modal-title {
        font-size: 22px;
    }

    .modal-description h3,
    .modal-highlights h3,
    .modal-services h3 {
        font-size: 16px;
    }
}

