@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background-color: #0c4c7d;
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: block;
    color: white;
    text-align: center;
    padding: 10px 18px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 6px;
    font-size: 0.95rem;
}

.nav-link:hover {
    background-color: #1a6da8;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.nav-link.active {
    background-color: #1a6da8;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.whatsapp-btn {
    background-color: #25D366;
    color: white !important;
    border-radius: 50px;
    padding: 10px 22px !important;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

.whatsapp-btn:hover {
    background-color: #128C7E;
    transform: translateY(-4px);
    box-shadow: 0 5px 12px rgba(0,0,0,0.4);
}

.title {
    text-align: center;
    padding: 2rem 0;
}

.title h1 {
    color: #0c4c7d;
    font-size: 2.5rem;
    margin: 0;
}

main {
    flex: 1;
}

.gallery-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 40px auto;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.gallery-section h2 {
    text-align: center;
    color: #0c4c7d;
    margin-bottom: 30px;
    font-size: 2.2em;
    font-weight: 700;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 0px;
    max-width: 100%;
    margin: 0 auto;
}

.instagram-single {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    aspect-ratio: 3/4;
    position: relative;
    background: white;
    transition: transform 0.3s, box-shadow 0.3s;
}

.instagram-single:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.instagram-single img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.instagram-carousel-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    aspect-ratio: 3/4;
    position: relative;
    background: white;
    transition: transform 0.3s, box-shadow 0.3s;
}

.instagram-carousel-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.instagram-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-content-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    color: #333;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-prev {
    left: 15px;
}

.carousel-next {
    right: 15px;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 10;
}

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

.carousel-indicator.active {
    background: white;
    transform: scale(1.2);
}

.admin-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #0c4c7d;
    color: white;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 1000;
}

.admin-btn:hover {
    background-color: #1a6da8;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.clinic-photos-section h3 {
    color: #1a6da8;
    margin-top: 30px;
    margin-bottom: 20px;
    font-size: 1.6em;
    font-weight: 600;
    border-bottom: 1px dashed #f0f0f0;
    padding-bottom: 10px;
}

.clinic-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.photos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.photos-container img {
    width: 100%;
    object-fit: contain;
    height: 200px;
    background-color: #eee;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.photos-container img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.events-photos-section .photos-container {
    grid-template-columns: repeat(auto-fill, minmax(250px, auto));
}

.events-photos-section .photos-container > div {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.photo-caption {
    text-align: center;
    font-size: 0.9em;
    color: #555;
    margin-top: 5px;
    line-height: 1.2;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.lightbox.active {
    display: flex;
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    margin: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: zoomIn 0.3s ease-out;
}

.lightbox-content-wrapper img {
    max-width: 100%;
    max-height: 100%;
}

.lightbox-content {
    display: block;
}

.lightbox-caption {
    color: white;
    text-align: center;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    width: 100%;
    box-sizing: border-box;
    font-size: 1.2em;
    font-weight: 500;
    border-radius: 0 0 8px 8px;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 50px;
    cursor: pointer;
    user-select: none;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    transition: background-color 0.3s;
    z-index: 2001;
}

.lightbox-nav-btn:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

footer {
    background-color: #0c4c7d;
    color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 25px;
}

footer > div.max-w-7xl {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 0 auto;
    max-width: 1280px;
    gap: 2rem;
}

footer > div.max-w-7xl > div {
    flex: 1 1 auto;
    min-width: 200px;
    text-align: center;
}

footer > div.max-w-7xl > div:first-child {
    text-align: left;
}

footer > div.max-w-7xl > div:first-child img {
    height: 3rem;
    width: auto;
    max-width: 100%;
}

@media (min-width: 768px) {
    footer > div.max.w-7xl > div {
        text-align: left;
    }
    footer > div.max-w-7xl > div:first-child {
        flex-basis: 25%;
    }
    footer > div.max-w-7xl > div:nth-child(2),
    footer > div.max-w-7xl > div:nth-child(3),
    footer > div.max-w-7xl > div:nth-child(4) {
        flex-basis: calc(75% / 3);
    }
}

@media (min-width: 1024px) {
    footer > div.max-w-7xl > div {
        flex-basis: 25%;
    }
}

footer a {
    color: white;
    text-decoration: none;
}

footer a:hover {
    color: #a0aec0;
}

footer img {
    border-radius: 0.375rem;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    align-self: flex-start;
}

.icon-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-end;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #0c4c7d;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 0;
        gap: 0;
    }

    .nav-list.active {
        display: flex;
    }
    
    .nav-link {
        padding: 10px 20px;
        font-size: 1rem;
        width: 100%;
        text-align: left;
    }

    .whatsapp-btn {
        padding: 10px 20px !important;
        font-size: 1rem;
        width: 100%;
    }

    .menu-toggle {
        display: block;
    }
    
    .instagram-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    .instagram-carousel-wrapper {
        aspect-ratio: 3/4;
    }
    .carousel-prev,
    .carousel-next {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    .carousel-indicators {
        bottom: 15px;
    }
    .photos-container {
        grid-template-columns: repeat(auto-fill, minmax(220px, auto));
    }
    .photos-container img {
        height: 180px;
    }
    .gallery-section {
        padding: 20px 15px;
        margin: 20px auto;
    }
    .gallery-section h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    .clinic-photos-section h3 {
        font-size: 1.4em;
        margin-top: 20px;
        margin-bottom: 15px;
    }
    .photos-container img {
        height: 180px;
    }
    .events-photos-section .photos-container {
        grid-template-columns: repeat(auto-fill, minmax(180px, auto));
    }
}

@media (max-width: 480px) {
    .nav-list {
        gap: 5px;
    }
    .nav-link {
        font-size: 0.85rem;
        padding: 8px 10px;
    }
    .whatsapp-btn {
        padding: 8px 15px !important;
        font-size: 0.9rem;
    }
    .instagram-grid {
        grid-template-columns: 1fr;
    }
    .instagram-carousel-wrapper {
        aspect-ratio: 3/4;
    }
    .carousel-prev,
    .carousel-next {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    .carousel-indicators {
        bottom: 10px;
    }
    .photos-container {
        grid-template-columns: 1fr;
    }
    .photos-container img {
        height: 180px;
    }
    .events-photos-section .photos-container {
        grid-template-columns: 1fr;
    }
}