/* =========================================
   GALLERY.CSS — Abhimo Technologies
   Professional Gallery Page Styles
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Arizonia&family=DM+Sans:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,700;1,400&family=Cormorant+Garamond:ital,wght@0,500;1,400;1,500&display=swap');

html,
body,
* {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

*::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
}

:root {
    --primary: #0077ff;
    --primary-dark: #005bcc;
    --accent: #00d2ff;
    --accent-2: #7b2cff;
    --bg-deep: #04111e;
    --bg-section: #071929;
    --bg-card: #0b2237;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(255, 255, 255, 0.09);
    --text-primary: #ffffff;
    --text-muted: #8aafcc;
    --text-label: #00d2ff;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 40px rgba(0, 119, 255, 0.25);
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ── Reset body for gallery page ── */
body {
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'DM Sans', sans-serif;
    overflow-x: hidden;
}

/* =========================================
   HERO SECTION
   ========================================= */

.gallery-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 0;
    overflow: hidden;
    background: radial-gradient(ellipse at 20% 50%, rgba(0, 119, 255, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 210, 255, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(123, 44, 255, 0.1) 0%, transparent 50%),
        var(--bg-deep);
}

/* Animated orbs */
.hero-bg-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 119, 255, 0.2), transparent 70%);
    top: -100px;
    left: -150px;
    animation-delay: 0s;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 210, 255, 0.15), transparent 70%);
    top: 50px;
    right: -100px;
    animation-delay: -3s;
}

.orb-3 {
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(123, 44, 255, 0.15), transparent 70%);
    bottom: 100px;
    left: 40%;
    animation-delay: -5s;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 40px;
}

.hero-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
    opacity: 0.9;
}

.gallery-hero h1 {
    font-family: 'Arizonia', cursive;
    font-size: clamp(3.5rem, 9vw, 7rem);
    line-height: 1.05;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #ffffff 0%, #00d2ff 55%, #7b2cff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 24px rgba(0, 210, 255, 0.3));
}

.hero-sub {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-weight: 400;
}

.hero-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 0;
    color: var(--accent);
    font-size: 1.1rem;
}

.hero-divider span {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent));
    display: block;
}

.hero-divider span:last-child {
    background: linear-gradient(90deg, var(--accent), transparent);
}

/* =========================================
   CATEGORY NAVIGATION PILLS
   ========================================= */

.category-nav-wrap {
    position: relative;
    z-index: 10;
    width: 100%;
    margin-top: 50px;
    padding-bottom: 0;
    background: linear-gradient(to bottom, transparent, var(--bg-deep) 60%);
    padding-top: 20px;
}

.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 24px 20px 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.cat-pill {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    letter-spacing: 0.02em;
    backdrop-filter: blur(10px);
}

.cat-pill:hover {
    background: rgba(0, 119, 255, 0.15);
    border-color: rgba(0, 119, 255, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

.cat-pill.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 119, 255, 0.4);
    transform: translateY(-2px);
}

/* =========================================
   GALLERY SECTIONS
   ========================================= */

.gallery-category {
    padding: 80px 0;
    position: relative;
    border-bottom: 1px solid var(--glass-border);
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-category:nth-child(even) {
    background: var(--bg-section);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--text-label);
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.2);
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 14px;
}

.gallery-heading {
    font-family: 'Arizonia', cursive;
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    color: var(--text-primary);
    margin-bottom: 12px;
    font-weight: normal;
    background: linear-gradient(135deg, #fff 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.section-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Divider line under heading */
.section-header::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin: 20px auto 0;
    border-radius: 10px;
}

/* =========================================
   GALLERY GRID
   ========================================= */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 10px;
}

/* Masonry-feel: let some items span more columns on larger grids */
.gallery-grid img:nth-child(3n+1) {
    grid-column: span 1;
}

.gallery-grid img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--glass-border);
    display: block;
    background: var(--bg-card);
    /* Subtle zoom-in as page loads */
    animation: imgReveal 0.5s ease forwards;
    opacity: 0;
}

@keyframes imgReveal {
    from {
        opacity: 0;
        transform: scale(0.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stagger image animations */
.gallery-grid img:nth-child(1) {
    animation-delay: 0.05s;
}

.gallery-grid img:nth-child(2) {
    animation-delay: 0.10s;
}

.gallery-grid img:nth-child(3) {
    animation-delay: 0.15s;
}

.gallery-grid img:nth-child(4) {
    animation-delay: 0.20s;
}

.gallery-grid img:nth-child(5) {
    animation-delay: 0.25s;
}

.gallery-grid img:nth-child(6) {
    animation-delay: 0.30s;
}

.gallery-grid img:nth-child(7) {
    animation-delay: 0.35s;
}

.gallery-grid img:nth-child(8) {
    animation-delay: 0.40s;
}

.gallery-grid img:nth-child(9) {
    animation-delay: 0.45s;
}

.gallery-grid img:nth-child(10) {
    animation-delay: 0.50s;
}

.gallery-grid img:hover {
    transform: scale(1.04) translateY(-4px);
    box-shadow: 0 20px 50px rgba(0, 119, 255, 0.3), 0 0 0 1px rgba(0, 210, 255, 0.2);
    border-color: rgba(0, 210, 255, 0.3);
    z-index: 2;
}

/* =========================================
   LIGHTBOX POPUP
   ========================================= */

.popup {
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 18, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(12px);
}

.popup.active {
    opacity: 1;
    pointer-events: all;
}

.popup-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
    padding: 20px 60px;
}

#popupImage {
    max-width: 85vw;
    max-height: 82vh;
    width: auto;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08);
    object-fit: contain;
    transition: opacity 0.15s ease;
    display: block;
}

.close-btn {
    position: fixed;
    top: 24px;
    right: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.close-btn:hover {
    background: rgba(255, 80, 80, 0.3);
    border-color: rgba(255, 80, 80, 0.5);
    transform: rotate(90deg) scale(1.1);
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: white;
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    line-height: 1;
}

.prev-btn {
    left: -10px;
}

.next-btn {
    right: -10px;
}

.nav-btn:hover {
    background: rgba(0, 119, 255, 0.3);
    border-color: rgba(0, 119, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(0, 119, 255, 0.3);
}

.popup-counter {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    letter-spacing: 0.1em;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* =========================================
   NAVBAR OVERRIDES (dark theme)
   ========================================= */

.custom-navbar {
    background: rgba(4, 17, 30, 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

/* Ensure hamburger icon is white on dark navbar */
.custom-navbar .navbar-toggler-icon {
    filter: invert(1) brightness(100%) !important;
}

.custom-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 991.98px) {
    .custom-navbar .navbar-collapse {
        background: #04111e !important;
        border: 1px solid var(--glass-border) !important;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    }

    .custom-navbar .navbar-nav .nav-link {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
}

.logo-text {
    font-size: 32px;
    font-weight: 800;
    color: var(--primary) !important;
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 600;
    transition: 0.3s;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    position: absolute;
    left: 0;
    bottom: -4px;
    border-radius: 20px;
    transition: 0.4s;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
}

/* =========================================
   FOOTER OVERRIDES
   ========================================= */

.footer {
    background: var(--bg-section);
    color: var(--text-muted);
    padding: 60px 20px;
    text-align: center;
    border-top: 1px solid var(--glass-border);
}

.footer h3 {
    font-size: 30px;
    font-weight: 700;
    color: var(--text-primary);
}

.footer p {
    margin-top: 12px;
    color: var(--text-muted);
}

.footer-btn {
    display: inline-block;
    background: linear-gradient(45deg, var(--accent), var(--accent-2));
    color: white !important;
    padding: 14px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 0 24px rgba(0, 210, 255, 0.3);
    border: none;
}

.footer-btn:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 0 36px rgba(0, 210, 255, 0.55);
    color: white !important;
}

/* =========================================
   BUTTONS
   ========================================= */

.apply-btn,
.hero-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white !important;
    border: none;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(0, 119, 255, 0.3);
}

.apply-btn:hover,
.hero-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0, 119, 255, 0.45);
    background: linear-gradient(135deg, var(--accent), var(--primary));
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
    .gallery-hero {
        padding: 100px 16px 0;
    }

    .gallery-hero h1 {
        font-size: clamp(2.8rem, 12vw, 4.5rem);
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .gallery-grid img {
        height: 180px;
    }

    .gallery-category {
        padding: 50px 0;
    }

    .popup-inner {
        padding: 10px 48px;
    }

    #popupImage {
        max-width: 95vw;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .prev-btn {
        left: -5px;
    }

    .next-btn {
        right: -5px;
    }

    .category-nav {
        gap: 8px;
        padding: 16px 12px 24px;
    }

    .cat-pill {
        font-size: 0.75rem;
        padding: 6px 14px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gallery-grid img {
        height: 150px;
    }

    .gallery-heading {
        font-size: 2rem;
    }
}

/* Scrollbar removed to fix laptop visibility issues */

/* =========================================
   SELECTION
   ========================================= */

::selection {
    background: rgba(0, 119, 255, 0.35);
    color: #fff;
}

.intern-card {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    overflow: hidden;
    text-align: center;
}

.intern-card img {
    width: 100%;
    display: block;
}

.intern-details {
    padding: 15px;
}

.intern-details h2,
.intern-details h3 {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 500;
    color: #fff;
    margin-bottom: 8px;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.intern-details p {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 400;
    color: #cbd5e1;
    margin: 5px 0;
    font-size: 15px;
    line-height: 1.4;
}

.intern-details p strong,
.intern-details p b {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 500;
    color: #a8c4d8;
}

@media (max-width: 768px) {
    .intern-details h2,
    .intern-details h3 {
        font-size: 19px;
        font-weight: 500;
    }

    .intern-details p {
        font-size: 13px;
        font-weight: 400;
    }
}