/* Gallery Styles */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --background: #ffffff;
    --transition: all 0.3s ease;
}

main {
    margin-top: 70px;
}

.services-hero {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6)),
                url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 6rem 2rem;
}

.services-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.modal-content img {
    max-width: 100%;
    max-height: 80vh;
}

.services-hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Update nav-btn styles */
.nav-link.btn {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 500;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.nav-link.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e40af, #2563eb);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-link.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

.nav-link.btn:hover::before {
    opacity: 1;
}

.nav-link.btn span {
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .nav-link.btn {
        width: 200px;
        text-align: center;
        margin: 0.5rem auto;
    }
}


.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(600px, 1.5fr));
    gap: 2rem;
    padding: 6rem 2rem;
    max-width: 2200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/9; /* Adjusted aspect ratio for a larger appearance */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    max-width: 300px; /* Restricts the maximum width of the tiles */
    min-height: 400px; /* Ensures the tile has enough height */
    margin: 10px; /* Adds spacing between tiles */
}


.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}
.gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item .overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay {
    transform: translateY(0);
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    display: block;
    object-fit: contain;
}

.close {
    position: absolute;
    right: 25px;
    top: 10px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.modal-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
        padding: 15px;
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    padding: 2rem;
}

.modal.show {
    display: block;
    opacity: 1;
}

.modal-content {
    position: relative;
    margin: 0 auto;
    background: transparent;
    animation: modalIn 0.3s ease;
    text-align: center;
}

@keyframes modalIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-content img {
    max-width: none;
    height: auto;
    display: inline-block;
    margin-bottom: 2rem;
}

.modal-text {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.modal-text h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.modal-text p {
    color: var(--light-text);
    line-height: 1.6;
}

.close-modal {
    position: fixed;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 1200;
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

/* Zoom Controls */
.zoom-controls {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem;
    border-radius: 25px;
    z-index: 1200;
}

.zoom-btn {
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .services-hero {
        padding: 4rem 1rem;
    }

    .services-hero h1 {
        font-size: 2.5rem;
    }

    .gallery {
        padding: 2rem 1rem;
        gap: 1.5rem;
    }

    .modal {
        padding: 1rem;
    }

    .modal-content img {
        max-width: 100%;
    }
}