/**
 * InsideFlow Studios – Single Studio Page Styles
 */

/* ── Hero ─────────────────────────────────────────────── */

.iy-studio__hero {
    width: 100vw;
    max-height: 400px;
    overflow: hidden;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

.iy-studio__hero img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0;
}

/* ── Container ────────────────────────────────────────── */

.iy-studio__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 48px;
}

/* ── Back link ────────────────────────────────────────── */

.iy-studio__back {
    display: inline-block;
    margin: 20px 0 24px;
    font-size: 13px;
    color: var(--iy-teal, #3b6063);
    text-decoration: none;
    transition: opacity 0.2s;
}

.iy-studio__back:hover {
    opacity: 0.7;
}

/* ── Grid ─────────────────────────────────────────────── */

.iy-studio__grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
}

/* ── Header ───────────────────────────────────────────── */

.iy-studio__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.iy-studio__thumb {
    flex-shrink: 0;
}

.iy-studio__thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 12px;
}

.iy-studio__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.3;
}

/* ── Badge ────────────────────────────────────────────── */

.iy-studio__badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 7px; /* library micro-tag radius */
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

.iy-studio__badge--basic {
    background: #f0f0f0;
    color: #666;
}

.iy-studio__badge--affiliated {
    background: color-mix(in srgb, var(--iy-gold, #A77637) 15%, transparent);
    color: var(--iy-gold, #A77637);
}

.iy-studio__badge--official {
    background: color-mix(in srgb, var(--iy-teal, #3b6063) 15%, transparent);
    color: var(--iy-teal, #3b6063);
}

/* ── Sections ─────────────────────────────────────────── */

.iy-studio__section {
    margin-bottom: 40px;
}

.iy-studio__section h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 12px;
    color: var(--e-global-color-text, #222);
}

.iy-studio__content p {
    font-size: 14px;
    line-height: 1.7;
    color: #444;
}

/* ── Offerings ────────────────────────────────────────── */

.iy-studio__offerings {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.iy-studio__pill {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid var(--bb-content-border-color, #e4e4e4);
    border-radius: 7px; /* library micro-tag radius */
    font-size: 13px;
    color: #555;
    background: #fff;
}

/* ── Teachers ─────────────────────────────────────────── */

.iy-studio__teachers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.iy-studio__teacher-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--iy-card, #fff);
    border: 1px solid var(--iy-line, #e4e4e4);
    border-radius: 12px; /* library tag radius */
    padding: 8px 14px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.iy-studio__teacher-card:hover {
    background: #fafafa;
    border-color: #ccc;
}

.iy-studio__teacher-avatar,
.iy-studio__teacher-card img {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.iy-studio__teacher-info {
    display: flex;
    flex-direction: column;
}

.iy-studio__teacher-name {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
}

.iy-studio__teacher-type {
    font-size: 11px;
    color: #888;
    line-height: 1.3;
}

/* ── Gallery ──────────────────────────────────────────── */

.iy-studio__gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.iy-studio__gallery-item {
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    position: relative;
}

.iy-studio__gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.2s ease;
}

.iy-studio__gallery-item:hover::after {
    background: rgba(0, 0, 0, 0.15);
}

.iy-studio__gallery-item:hover .iy-studio__gallery-img {
    transform: scale(1.05);
}

.iy-studio__gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

/* ── Lightbox ─────────────────────────────────────────── */

.iy-studio__lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
    animation: iy-lightbox-in 0.2s ease;
}

@keyframes iy-lightbox-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.iy-studio__lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.4);
}

.iy-studio__lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.iy-studio__lightbox-close:hover {
    opacity: 1;
}

.iy-studio__lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.15s;
    user-select: none;
    padding: 20px;
}

.iy-studio__lightbox-nav:hover {
    opacity: 1;
}

.iy-studio__lightbox-prev { left: 10px; }
.iy-studio__lightbox-next { right: 10px; }

/* ── Events placeholder ──────────────────────────────── */

.iy-studio__events-placeholder {
    opacity: 0.35;
}

/* ── Sidebar ──────────────────────────────────────────── */

.iy-studio__sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Cards ────────────────────────────────────────────── */

.iy-studio__card {
    border: 1px solid var(--bb-content-border-color, #e4e4e4);
    border-radius: 12px;
    padding: 20px;
    background: #fff;
}

.iy-studio__card-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* ── Map ──────────────────────────────────────────────── */

.iy-studio__map {
    height: 160px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

/* Leaflet marker reset */
.iy-studio-marker {
    background: none !important;
    border: none !important;
}

/* ── Address grid ─────────────────────────────────────── */

.iy-studio__address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.iy-studio__address-item {
    display: flex;
    flex-direction: column;
}

.iy-studio__address-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 2px;
}

.iy-studio__address-value {
    font-size: 13px;
    color: #333;
}

/* ── Contact ──────────────────────────────────────────── */

.iy-studio__contact-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.iy-studio__contact-item {
    display: flex;
    flex-direction: column;
}

.iy-studio__contact-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 2px;
}

.iy-studio__contact-value {
    font-size: 13px;
    color: var(--iy-teal, #3b6063);
    text-decoration: none;
    word-break: break-word;
}

a.iy-studio__contact-value:hover {
    text-decoration: underline;
}

/* ── Responsive: Tablet ──────────────────────────────── */

@media (max-width: 1024px) {
    .iy-studio__grid {
        grid-template-columns: 1fr;
    }

    .iy-studio__sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .iy-studio__card {
        flex: 1;
        min-width: 260px;
    }
}

/* ── Responsive: Mobile ──────────────────────────────── */

@media (max-width: 768px) {
    .iy-studio__hero {
        max-height: 180px;
    }

    .iy-studio__hero img {
        max-height: 180px;
    }

    .iy-studio__container {
        padding: 0 16px 32px;
    }

    .iy-studio__header {
        gap: 12px;
    }

    .iy-studio__thumb img {
        width: 60px;
        height: 60px;
    }

    .iy-studio__title {
        font-size: 18px;
    }

    .iy-studio__gallery {
        grid-template-columns: repeat(3, 1fr);
    }

    .iy-studio__sidebar {
        flex-direction: column;
    }

    .iy-studio__card {
        min-width: auto;
    }
}
