﻿/* ------------------------------
            COMPLETE ISOLATED GALLERY STYLES
            Prefix: "clg-" (college gallery)
            No conflict with existing homoeo-course styles
        -------------------------------- */
.clg-gallery-wrapper {
    --clg-bg: #fefcf5;
    --clg-surface: #ffffff;
    --clg-accent: #8B5A2B;
    --clg-accent-light: #c49a6c;
    --clg-accent-soft: #e7d9c5;
    --clg-text-dark: #2c221b;
    --clg-text-muted: #6b5a4e;
    --clg-border: #ede3d4;
    --clg-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.08);
    --clg-hover-shadow: 0 30px 45px -15px rgba(0, 0, 0, 0.15);
    --clg-transition: all 0.5s cubic-bezier(0.2, 0.95, 0.4, 1);
}

.clg-gallery-wrapper {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background: var(--clg-bg);
    padding: 5rem 1.5rem;
    position: relative;
    z-index: 1;
    overflow-x: clip;
}

.clg-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* section header */
.clg-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.clg-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--clg-accent-soft);
    color: var(--clg-accent);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 1.2rem;
    border-radius: 40px;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    backdrop-filter: blur(2px);
}

.clg-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--clg-text-dark);
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

    .clg-title span {
        color: var(--clg-accent);
        position: relative;
        display: inline-block;
    }

        .clg-title span::after {
            content: '';
            position: absolute;
            bottom: 6px;
            left: 0;
            width: 100%;
            height: 6px;
            background: var(--clg-accent-soft);
            border-radius: 4px;
            z-index: -1;
        }

.clg-desc {
    color: var(--clg-text-muted);
    max-width: 680px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.5;
}

/* Gallery grid */
.clg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.8rem;
    grid-auto-flow: dense;
}

/* Gallery card */
.clg-card {
    position: relative;
    background: var(--clg-surface);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--clg-shadow);
    transition: var(--clg-transition);
    transform: translateY(0);
    cursor: pointer;
    border: 1px solid var(--clg-border);
}

    .clg-card:hover {
        transform: translateY(-8px);
        box-shadow: var(--clg-hover-shadow);
        border-color: var(--clg-accent-light);
    }

.clg-img-box {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f5efe7;
}

.clg-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.7s ease-out;
}

.clg-card:hover .clg-img {
    transform: scale(1.05);
}

.clg-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    padding: 0.3rem 0.9rem;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #ffefcf;
    letter-spacing: 0.3px;
    font-family: monospace;
    z-index: 2;
    pointer-events: none;
    border-left: 3px solid var(--clg-accent);
}

.clg-overlay {
    padding: 1.2rem 1.2rem 1.3rem;
    background: white;
    transition: var(--clg-transition);
    border-top: 1px solid var(--clg-border);
}

.clg-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--clg-text-dark);
    margin-bottom: 0.3rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .clg-card-title i {
        color: var(--clg-accent);
        font-size: 1rem;
    }

.clg-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--clg-accent-light);
    margin-bottom: 0.4rem;
}

.clg-desc-text {
    font-size: 0.85rem;
    color: var(--clg-text-muted);
    line-height: 1.4;
    margin-top: 6px;
}

/* orientation aspect ratios */
.clg-card.portrait .clg-img-box {
    aspect-ratio: 3 / 4;
}

.clg-card.landscape .clg-img-box {
    aspect-ratio: 16 / 9;
}

/* scroll reveal animation */
.clg-card {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

    .clg-card.clg-reveal {
        opacity: 1;
        transform: translateY(0);
    }

@media (max-width: 768px) {
    .clg-gallery-wrapper {
        padding: 3rem 1rem;
    }

    .clg-title {
        font-size: 2rem;
    }

    .clg-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.clg-gallery-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--clg-accent), var(--clg-accent-light), var(--clg-accent-soft));
}

/* ========== MODAL CAROUSEL STYLES - Fully featured ========== */
.clg-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.94);
    backdrop-filter: blur(16px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
    opacity: 0;
    transition: opacity 0.35s ease;
}

    .clg-modal.active {
        display: flex;
        opacity: 1;
    }

.clg-modal-content {
    max-width: 90vw;
    max-height: 90vh;
    background: transparent;
    border-radius: 40px;
    overflow: hidden;
    position: relative;
    animation: modalFloatIn 0.5s cubic-bezier(0.2, 0.9, 0.4, 1.2);
    cursor: default;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
}

@keyframes modalFloatIn {
    0% {
        opacity: 0;
        transform: scale(0.88) translateY(30px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.clg-modal-img-wrapper {
    position: relative;
    background: #0a0a0a;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.clg-modal-img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.2s;
}

.clg-modal-info {
    background: rgba(25, 20, 18, 0.85);
    backdrop-filter: blur(24px);
    padding: 1.2rem 2rem;
    color: white;
    border-top: 1px solid rgba(255,215,170,0.3);
}

.clg-modal-category {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--clg-accent-light);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.clg-modal-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .clg-modal-title i {
        color: var(--clg-accent-light);
        font-size: 1.4rem;
    }

.clg-modal-desc {
    font-size: 0.95rem;
    color: #f0e6db;
    line-height: 1.5;
}

/* Navigation arrows */
.clg-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 20;
    border: 1px solid rgba(255,255,255,0.2);
}

    .clg-modal-nav:hover {
        background: var(--clg-accent);
        transform: translateY(-50%) scale(1.08);
        border-color: white;
    }

.clg-modal-prev {
    left: 20px;
}

.clg-modal-next {
    right: 20px;
}
/* Close button */
.clg-modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(12px);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    cursor: pointer;
    transition: all 0.25s;
    border: 1px solid rgba(255,255,255,0.25);
    z-index: 21;
}

    .clg-modal-close:hover {
        background: #c0392b;
        transform: rotate(90deg) scale(1.05);
        border-color: white;
    }
/* counter indicator */
.clg-modal-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    padding: 6px 16px;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #f5e6d3;
    font-family: monospace;
    letter-spacing: 0.5px;
    pointer-events: none;
    z-index: 20;
}

@media (max-width: 768px) {
    .clg-modal-nav {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .clg-modal-close {
        width: 40px;
        height: 40px;
        font-size: 1.4rem;
        top: 12px;
        right: 12px;
    }

    .clg-modal-title {
        font-size: 1.2rem;
    }

    .clg-modal-info {
        padding: 1rem;
    }

    .clg-modal-prev {
        left: 8px;
    }

    .clg-modal-next {
        right: 8px;
    }
}


/* ------------------------------
            MD DESK SECTION - IMAGE LEFT, CONTENT RIGHT
            Complete isolated styles with prefix "md-desk-"
            No conflict with gallery or other sections
        -------------------------------- */
.md-desk-wrapper {
    --md-bg: linear-gradient(135deg, #f8f5f0 0%, #f0ebe3 100%);
    --md-accent: #8B5A2B;
    --md-accent-light: #b87c4a;
    --md-accent-glow: #d4a373;
    --md-text-dark: #2c221b;
    --md-text-muted: #6b5a4e;
    --md-border: #e2d5c5;
    --md-shadow: 0 25px 45px -12px rgba(0, 0, 0, 0.12);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background: var(--md-bg);
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

    /* decorative background element */
    .md-desk-wrapper::before {
        content: '';
        position: absolute;
        top: -20%;
        right: -10%;
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, rgba(139,90,43,0.05) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
    }

    .md-desk-wrapper::after {
        content: '';
        position: absolute;
        bottom: -15%;
        left: -5%;
        width: 350px;
        height: 350px;
        background: radial-gradient(circle, rgba(212,163,115,0.04) 0%, transparent 70%);
        border-radius: 50%;
        pointer-events: none;
    }

.md-desk-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 2;
}

/* LEFT SIDE - IMAGE SECTION */
.md-desk-image {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.md-image-frame {
    background: linear-gradient(145deg, #ffffff, #f5efe7);
    border-radius: 40px;
    padding: 1rem;
    box-shadow: var(--md-shadow);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    animation: mdImageFloat 5s ease-in-out infinite;
}

@keyframes mdImageFloat {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

.md-image-frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 50px -15px rgba(0, 0, 0, 0.2);
}

.md-portrait-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 32px;
    object-fit: cover;
    aspect-ratio: 4 / 5;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease;
}

.md-image-frame:hover .md-portrait-img {
    transform: scale(1.02);
}

/* decorative badge on image */
.md-image-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(139, 90, 43, 0.9);
    backdrop-filter: blur(8px);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 3;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

    .md-image-badge i {
        font-size: 0.9rem;
    }

/* RIGHT SIDE - CONTENT SECTION */
.md-desk-content {
    flex: 1.2;
    min-width: 320px;
}

.md-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(139, 90, 43, 0.12);
    padding: 0.45rem 1.2rem;
    border-radius: 40px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--md-accent);
    margin-bottom: 1.2rem;
    border: 1px solid rgba(139, 90, 43, 0.2);
    backdrop-filter: blur(2px);
}

    .md-section-badge i {
        font-size: 0.9rem;
    }

.md-name {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--md-text-dark);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

    .md-name span {
        color: var(--md-accent);
        position: relative;
        display: inline-block;
    }

        .md-name span::after {
            content: '';
            position: absolute;
            bottom: 6px;
            left: 0;
            width: 100%;
            height: 4px;
            background: var(--md-accent-light);
            border-radius: 4px;
            opacity: 0.3;
        }

.md-designation {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--md-accent-light);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

    .md-designation i {
        font-size: 1.2rem;
    }

.md-qualifications {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.md-qual-badge {
    background: white;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--md-accent);
    border: 1px solid var(--md-border);
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.md-message {
    background: white;
    padding: 1.5rem;
    border-radius: 24px;
    margin: 1.2rem 0;
    border-left: 4px solid var(--md-accent);
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

    .md-message i {
        color: var(--md-accent);
        font-size: 1.2rem;
        margin-right: 8px;
    }

    .md-message p {
        font-size: 1rem;
        line-height: 1.6;
        color: var(--md-text-muted);
        margin-top: 8px;
    }

.md-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.md-stat-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.md-stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(139, 90, 43, 0.1);
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--md-accent);
    transition: all 0.3s;
}

.md-stat-item:hover .md-stat-icon {
    background: var(--md-accent);
    color: white;
    transform: scale(1.05);
}

.md-stat-info h4 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--md-text-dark);
    margin-bottom: 0.2rem;
}

.md-stat-info p {
    font-size: 0.75rem;
    color: var(--md-text-muted);
    font-weight: 500;
}

/* CTA Button */
.md-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--md-accent);
    color: white;
    padding: 0.9rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 1.8rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

    .md-contact-btn:hover {
        background: var(--md-accent-light);
        transform: translateX(5px);
        gap: 15px;
        box-shadow: 0 10px 20px rgba(139, 90, 43, 0.3);
    }

/* Responsive */
@media (max-width: 900px) {
    .md-desk-wrapper {
        padding: 3rem 1.5rem;
    }

    .md-desk-container {
        flex-direction: column;
        text-align: center;
    }

    .md-name {
        font-size: 2rem;
    }

    .md-message {
        text-align: left;
    }

    .md-stats {
        justify-content: center;
    }

    .md-image-badge {
        bottom: 15px;
        right: 15px;
        padding: 0.4rem 1rem;
    }

    .md-contact-btn {
        margin: 1.5rem auto 0;
    }
}

/* subtle scroll reveal for MD section */
.md-desk-wrapper {
    opacity: 0;
    transform: translateY(30px);
    animation: mdSectionReveal 0.8s ease forwards;
}

@keyframes mdSectionReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}