/* Gallery Page Styles for Afridrop Solutions Limited */

.breadcrumb__link a {
    color: white;
}
.breadcrumb {
    display: inline-flex;
    align-items: center;
    margin-bottom: -85rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb i {
    margin: 0 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb span {
    color: white;
    font-weight: 500;
}

/* Gallery Hero Section */
.gallery-hero {
    background-image: url('../assets/Images/galleryhero.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 300px;
    width: 100%;
    padding: calc(var(--spacing-2xl) + 80px) 0 var(--spacing-3xl);
    color: var(--text-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-hero .page-hero__title {
    font-size: var(--font-size-5xl);
    font-weight: 800;
    margin-top: 12px;
    text-transform: capitalize;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: white;
}

.gallery-hero .page-hero__subtitle {
    font-size: var(--font-size-xl);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: white;
}

/* Gallery Filter */
.gallery-filter {
    padding: var(--spacing-xl) 0;
    background: linear-gradient(135deg, var(--background) 0%, var(--background-alt) 100%);
    border-bottom: 1px solid var(--border);
}

.gallery-filter__wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-lg);
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.gallery-filter__button {
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--border-radius-lg);
    font-weight: 600;
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gallery-filter__button:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.gallery-filter__button--active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.gallery-filter__button--active:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Gallery Grid */
.gallery {
    padding: var(--spacing-3xl) 0;
}

.gallery__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch;
}

@media (min-width: 640px) {
    .gallery__grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 24px;
        gap: 24px;
    }
}

@media (min-width: 1024px) {
    .gallery__grid {
        grid-template-columns: repeat(3, 1fr);
        padding: 32px;
        gap: 32px;
        max-width: 1400px;
    }

    .project-modal__content {
        padding: 3rem;
    }

    .project-modal__gallery {
        gap: 2.5rem;
    }

    .project-modal__details {
        grid-template-columns: 2fr 3fr;
        padding: 2.5rem;
    }
}

/* Gallery Cards */
.gallery-card {
    background-color: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: rgba(0, 0, 0, 0.06) 0px 2px 4px;
    transition: all 0.2s ease-in-out;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

.gallery-card__image-container {
    position: relative;
    padding-top: 66.67%; /* 3:2 aspect ratio */
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background-color: #f8f9fa;
}

.gallery-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    will-change: transform;
    background-color: #f8f9fa;
    transform-origin: center center;
}

.gallery-card:hover .gallery-card__image {
    transform: scale(1.06);
}

.gallery-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 159, 206, 0.85) 0%, rgba(0, 71, 122, 0.85) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-card:hover .gallery-card__overlay {
    opacity: 1;
}

.gallery-card__link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background-color: white;
    border-radius: 50%;
    color: var(--primary);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 3px solid white;
}

.gallery-card__link:hover {
    background-color: var(--primary);
    color: white;
    transform: scale(1.15);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.gallery-card__content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background-color: #ffffff;
}

.gallery-card__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-gray-900);
    margin: 0;
    line-height: 1.5;
}

.gallery-card__location {
    font-size: 0.875rem;
    color: var(--color-gray-600);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
}

/* Project Modal */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    overflow-y: auto;
    padding: 0;
}

.project-modal--active {
    opacity: 1;
    visibility: visible;
}

.project-modal__content {
    background-color: var(--color-white);
    border-radius: 0;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    position: relative;
    padding: 2rem;
    margin: 0;
    scroll-behavior: smooth;
}

.project-modal__close {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

.project-modal__close:hover {
    background: #fff;
    transform: scale(1.1);
}

.project-modal__header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 1rem 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    margin: -2rem -2rem 3rem -2rem;
}

.project-modal__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.project-modal__location {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.project-modal__gallery {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 2rem auto;
    max-width: 900px;
}


@media (min-width: 768px) {
    .project-modal__gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .gallery-card__image-container {
        padding-top: 66.67%;
    }

    .project-modal__content {
        padding: 2.5rem;
    }
}

.project-modal__image {
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
}

.project-modal__details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    padding: 2.5rem;
    margin: 2rem auto;
    max-width: 900px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

@media (min-width: 768px) {
    .project-modal__details {
        grid-template-columns: 1fr 2fr;
    }
}

.project-modal__info h3,
.project-modal__description h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 3px solid var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.project-modal__info {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.project-modal__description {
    padding: var(--spacing-xl);
}

.project-modal__specs {
    list-style: none;
    padding: 0;
    margin: 0;
    background: var(--background-alt);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-lg);
}

.project-modal__specs li {
    margin-bottom: var(--spacing-md);
    color: var(--text-medium);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-modal__specs li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.project-modal__specs li strong {
    color: var(--secondary);
    font-weight: 600;
    min-width: 80px;
    text-align: left;
}

.project-modal__description p {
    margin-bottom: var(--spacing-lg);
    color: var(--text-medium);
    line-height: 1.7;
    font-size: var(--font-size-base);
    text-align: justify;
}

.project-modal__description p:first-of-type {
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: var(--spacing-xl);
}

/* Call to Action Section */
.cta {
    background-image: linear-gradient(rgba(0, 71, 122, 0.9), rgba(0, 71, 122, 0.9)), url('../assets/Images/poolhoima.webp');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 4rem 1rem;
    margin-top: var(--spacing-3xl);
}

.cta__content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .cta {
        padding: 4rem 2rem;
    }

    .cta__title {
        font-size: 3rem;
    }

    .cta__text {
        font-size: 1.375rem;
        margin-bottom: 3rem;
    }

    .cta__buttons {
        gap: 2.5rem;
        margin-top: 1.5rem;
    }

    .cta__button {
        padding: 1.25rem 2.75rem;
        min-width: 200px;
    }
}

@media (min-width: 1024px) {
    .cta {
        padding: 5rem 2rem;
    }

    .cta__content {
        max-width: 900px;
    }

    .cta__title {
        font-size: 3.5rem;
        margin-bottom: 2rem;
    }
}

.cta__title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cta__text {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    color: white;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.cta__buttons {
    display: inline-flex;
    gap: 2.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.cta__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: var(--font-size-base);
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 180px;
    text-align: center;
    margin: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cta__button--primary {
    background-color: var(--primary);
    color: white;
    border: 2px solid var(--primary);
}

.cta__button--primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.cta__button--secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.cta__button--secondary:hover {
    background-color: white;
    color: var(--secondary);
    transform: translateY(-2px);
}

/* Removed duplicate .cta__buttons definition */

/* Responsive Adjustments */
@media (max-width: 639px) {
    .gallery-hero .page-hero__title {
        font-size: var(--font-size-4xl);
        padding-top: var(--spacing-xl);
    }
    
    .project-modal__header {
        margin: -2rem -1rem 2rem -1rem;
        padding: 1.5rem 1rem;
    }
    
    .project-modal__title {
        font-size: 2rem;
    }
    
    .project-modal__details {
        padding: 1.5rem;
        margin: 1rem auto;
    }
    
    .project-modal__info,
    .project-modal__description {
        padding: var(--spacing-lg);
    }
    
    .gallery-filter__wrapper {
        gap: var(--spacing-md);
    }
    
    .gallery-filter__button {
        min-width: 100px;
        padding: var(--spacing-sm) var(--spacing-lg);
        font-size: var(--font-size-sm);
    }
    
    .gallery__grid {
        gap: var(--spacing-xl);
        padding: 0 var(--spacing-md);
    }
    
    .project-modal__content {
        width: 100%;
        margin: 0;
        padding: var(--space-xl);
        border-radius: 0;
    }
    
    .project-modal__image {
        aspect-ratio: 4/3;
    }
}