/* Galeria de Fotos Section Styles */
:root {
    --gallery-primary: #016CB0;
    --gallery-text: #364153;
    --gallery-text-muted: #6A7282;
    --gallery-bg: #F8F9FA;
    --gallery-white: #FFFFFF;
    --gallery-border: #E5E7EB;
    --gallery-card-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    --gallery-transition: all 0.3s ease;
}

.gallery-hero {
    height: 227px;
    background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url('../images/semed-hero-bg.png');
    /* Reusing high quality bg */
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: var(--gallery-white);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.gallery-hero .container {
    width: 100%;
}

.gallery-hero h1 {
    font-size: calc(42px * var(--var-fontscale));
    font-weight: 700;
    margin: 0;
    font-family: "Montserrat", sans-serif;
    text-align: left;
}

.gallery-hero p {
    font-size: calc(1.2rem * var(--var-fontscale));
    margin-top: 10px;
    font-weight: 600;
}

.gallery-accessibility {
    position: absolute;
    top: 30px;
    right: 5%;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gallery-acc-icon {
    width: 32px;
    height: 32px;
    background: #2563EB;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: calc(0.8rem * var(--var-fontscale));
    border: 2px solid white;
}

.gallery-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.gallery-breadcrumb {
    font-size: calc(14px * var(--var-fontscale));
    color: var(--gallery-text-muted);
    margin-bottom: 30px;
    font-family: "Montserrat", sans-serif;
    text-align: left;
}

.gallery-breadcrumb a {
    color: var(--gallery-primary);
    text-decoration: none;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 60px;
}

.gallery-card {
    background: var(--gallery-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--gallery-card-shadow);
    transition: var(--gallery-transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    width: 385px;
    min-height: 334px;
}

.gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.gallery-img-wrapper {
    position: relative;
    height: 236px;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #34495E;
    color: white;
    padding: 6px 9px;
    border-radius: 4px;
    font-size: calc(14px * var(--var-fontscale));
    font-weight: 500;
    font-family: "Montserrat", sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gallery-body {
    padding: 21px 23px;
    display: flex;
    flex-direction: column;
}

.gallery-date {
    font-size: calc(12px * var(--var-fontscale));
    font-weight: 400;
    color: #293B49;
    margin-bottom: 8px;
    text-align: left;
    font-family: "Montserrat", sans-serif;
}

.gallery-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gallery-title {
    font-size: calc(22px * var(--var-fontscale));
    font-weight: 600;
    color: #293B49;
    margin: 0;
    font-family: "Montserrat", sans-serif;
    text-align: left;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gallery-arrow {
    color: var(--gallery-text);
    opacity: 0.5;
}

.see-also-header {
    margin-bottom: 44px;
    display: flex;
}

.see-also-title {
    font-size: calc(32px * var(--var-fontscale));
    font-weight: 600;
    font-family: "Montserrat", sans-serif;
    color: #293B49;
    display: inline-block;
    position: relative;
    padding-bottom: 15px;
}

.see-also-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #016CB0;
}

.see-also-grid {
    display: flex;
    gap: 24px;
    margin-bottom: 80px;
}

.see-also-item {
    position: relative;
    width: 384px;
    height: 192px;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 19px 16px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: calc(25px * var(--var-fontscale));
    font-family: "Montserrat", sans-serif;
}

.see-also-item svg {
    margin-top: 5px;
}

.see-also-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    z-index: 1;
}

.see-also-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.see-also-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Footer link */
.gallery-footer-link {
    text-align: left;
    margin-top: 40px;
    padding-bottom: 60px;
}

.gallery-footer-link a {
    color: #1A82C4;
    text-decoration: underline;
    font-size: calc(18px * var(--var-fontscale));
    font-weight: 400;
    font-family: "Montserrat", sans-serif;
}

/* Gallery Search */
.gallery-search {
    margin-bottom: 35px;
    max-width: 600px;
}

.gallery-search-wrapper {
    display: flex;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid #E5E7EB;
    background: #FFF;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.gallery-search-wrapper:focus-within {
    border-color: var(--gallery-primary);
    box-shadow: 0 2px 12px rgba(1, 108, 176, 0.15);
}

.gallery-search-wrapper input {
    flex: 1;
    border: none;
    padding: 14px 24px;
    font-size: calc(15px * var(--var-fontscale));
    font-weight: 500;
    color: var(--gallery-text);
    outline: none;
    font-family: "Montserrat", sans-serif;
}

.gallery-search-wrapper input::placeholder {
    color: var(--gallery-text-muted);
}

.gallery-search-wrapper button {
    background-color: var(--gallery-primary);
    color: white;
    border: none;
    padding: 0 28px;
    font-size: calc(15px * var(--var-fontscale));
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
    font-family: "Montserrat", sans-serif;
    flex-shrink: 0;
}

.gallery-search-wrapper button:hover {
    background-color: #015B96;
}

.gallery-search-wrapper button svg {
    flex-shrink: 0;
}

/* Gallery Empty State */
.gallery-empty {
    text-align: center;
    padding: 60px 20px;
    background: #FFF;
    border-radius: 12px;
    box-shadow: var(--gallery-card-shadow);
    grid-column: 1 / -1;
    font-family: "Montserrat", sans-serif;
}

.gallery-empty p {
    font-size: calc(18px * var(--var-fontscale));
    color: var(--gallery-text-muted);
    margin-bottom: 20px;
}

.gallery-clear-search {
    display: inline-block;
    padding: 10px 24px;
    background: var(--gallery-primary);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: calc(14px * var(--var-fontscale));
    transition: background-color 0.2s;
}

.gallery-clear-search:hover {
    background: #015B96;
}

/* Gallery Pagination */
.gallery-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 50px;
    margin-bottom: 50px;
}

.gallery-pagination .page-link,
.gallery-pagination .page-num {
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: calc(14px * var(--var-fontscale));
    font-weight: 600;
    color: #666;
    background: #fff;
    border: 1px solid #eee;
    transition: all 0.2s;
    font-family: "Montserrat", sans-serif;
}

.gallery-pagination .page-num.active {
    background: var(--gallery-primary);
    border-color: var(--gallery-primary);
    color: #fff;
}

.gallery-pagination .page-link:hover,
.gallery-pagination .page-num:hover:not(.active) {
    background: #eee;
}

/* Responsiveness Media Query */
@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        justify-content: center;
    }
    .gallery-card {
        width: 100%;
        max-width: 100%;
    }
    .see-also-grid {
        flex-direction: column;
    }
    .see-also-item {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-search {
        max-width: 100%;
    }
    .gallery-search-wrapper input {
        padding: 10px 16px;
        font-size: calc(14px * var(--var-fontscale));
    }
    .gallery-search-wrapper button {
        padding: 0 16px;
        font-size: calc(14px * var(--var-fontscale));
    }
    .gallery-pagination {
        flex-wrap: wrap;
        gap: 6px;
    }
    .gallery-pagination .page-link,
    .gallery-pagination .page-num {
        padding: 6px 12px;
        font-size: calc(12px * var(--var-fontscale));
    }
}