/* ============================================================
   AUTS GALLERY ALBUMS  —  Category Cards + Modal Popup
   Click album card → modal opens with all photos of that album
   ============================================================ */

/* ---- Section ---- */
.auts-albums-section {
    padding: 60px 0 80px;
    background: #f4f6f9;
}

/* ---- Page heading ---- */
.auts-albums-header {
    margin-bottom: 45px;
}
.auts-albums-page-title {
    font-size: 32px;
    font-weight: 700;
    color: #172b52;
    margin-bottom: 10px;
    position: relative;
    display: inline-block;
}
.auts-albums-page-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #c92039;
    margin: 10px auto 0;
    border-radius: 2px;
}
.auts-albums-page-desc {
    color: #666;
    font-size: 15px;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---- Album card ---- */
.auts-album-card {
    cursor: pointer;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 16px rgba(0,0,0,0.12);
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.auts-album-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 30px rgba(23,43,82,0.2);
}

/* ---- Card cover image ---- */
.auts-album-card-img {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: #ddd;
}
.auts-album-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, opacity 0.4s ease;
}
.auts-album-card:hover .auts-album-card-img img {
    transform: scale(1.08);
    opacity: 0.75;
}
.auts-album-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e4ec;
    color: #aaa;
    font-size: 48px;
}

/* ---- Card hover overlay ---- */
.auts-album-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(23,43,82,0.45);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.auts-album-card:hover .auts-album-card-overlay {
    opacity: 1;
}
.auts-album-card-overlay i {
    font-size: 38px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* ---- Card info bar ---- */
.auts-album-card-info {
    padding: 12px 14px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.auts-album-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #172b52;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}
.auts-album-card-count {
    font-size: 11px;
    font-weight: 700;
    background: #f0f2f7;
    color: #c92039;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ---- Custom Overlay (replaces Bootstrap modal — no FancyBox conflict) ---- */
#auts-album-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.72);
    z-index: 99990;
    overflow-y: auto;
    padding: 30px 16px;
}
#auts-album-overlay-box {
    background: #fff;
    border-radius: 16px;
    max-width: 1100px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}
#auts-album-overlay-header {
    background: #172b52;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#auts-album-overlay-title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}
#auts-album-overlay-title small {
    font-size: 13px;
    font-weight: 400;
    color: rgba(255,255,255,0.65);
    margin-left: 6px;
}
#auts-album-overlay-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.8;
    transition: opacity 0.2s;
}
#auts-album-overlay-close:hover { opacity: 1; }
#auts-album-overlay-grid {
    padding: 16px;
    background: #f4f6f9;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
@media (max-width: 900px) { #auts-album-overlay-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { #auts-album-overlay-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---- Overlay thumbnails ---- */
.auts-ov-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    cursor: pointer;
    aspect-ratio: 4/3;
}
.auts-ov-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    transition: transform 0.35s ease, opacity 0.35s ease;
}
.auts-ov-thumb:hover img {
    transform: scale(1.08);
    opacity: 0.65;
}
.auts-ov-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.auts-ov-thumb:hover .auts-ov-zoom {
    opacity: 1;
}
.auts-ov-zoom i {
    font-size: 26px;
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* ============================================================
   FANCYBOX OVERRIDES
   ============================================================ */

/* Force navigation to show (FancyBox hides it by default until mouse moves) */
.fancybox-show-nav .fancybox-navigation {
    display: block !important;
}

/* Arrow buttons */
.fancybox-navigation .fancybox-button--arrow_left,
.fancybox-navigation .fancybox-button--arrow_right {
    opacity: 1 !important;
    background: rgba(255,255,255,0.92) !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3) !important;
    border-radius: 6px !important;
    padding: 10px !important;
    transition: background 0.2s !important;
}
.fancybox-navigation .fancybox-button--arrow_right {
    right: 50px !important;
}
.fancybox-navigation .fancybox-button--arrow_left:hover,
.fancybox-navigation .fancybox-button--arrow_right:hover {
    background: #172b52 !important;
}

/* Arrow SVG icon — FancyBox 3 uses fill not stroke */
.fancybox-navigation .fancybox-button svg path {
    fill: #333 !important;
}
.fancybox-navigation .fancybox-button:hover svg path {
    fill: #fff !important;
}

@media (max-width: 767px) {
    .fancybox-navigation .fancybox-button--arrow_right { right: 50px !important; }
}

/* Close button */
.fancybox-button--close {
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    background: #c92039 !important;
    box-shadow: 0 4px 14px rgba(201,32,57,0.5) !important;
    opacity: 1 !important;
    margin: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.2s, transform 0.2s !important;
}
.fancybox-button--close:hover {
    background: #a01528 !important;
    transform: scale(1.12) !important;
}
.fancybox-button--close svg {
    width: 16px !important;
    height: 16px !important;
    color: #fff !important;
    stroke: #fff !important;
}

/* Toolbar background */
.fancybox-toolbar {
    background: linear-gradient(to bottom, rgba(0,0,0,0.55), transparent) !important;
    padding: 4px 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Navigation arrows always visible */
.fancybox-navigation .fancybox-button {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Image counter */
.fancybox-infobar {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    background: rgba(0,0,0,0.45) !important;
    border-radius: 20px !important;
    padding: 4px 14px !important;
    top: 14px !important;
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
    .auts-albums-section    { padding: 40px 0 60px; }
    .auts-albums-page-title { font-size: 24px; }
    .auts-album-card-img    { height: 160px; }
    .auts-modal-thumb img   { height: 130px; }
}
@media (max-width: 480px) {
    .auts-album-card-img  { height: 140px; }
    .auts-modal-thumb img { height: 110px; }
}
