/* =========================================================
   Speakers Elementor Widget — Front-end Styles
   ========================================================= */

/* ── Grid ────────────────────────────────────────────────── */
.sew-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ── Card base ───────────────────────────────────────────── */
.sew-card { position: relative; }

.sew-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.sew-card-inner {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.sew-card:hover .sew-card-inner {
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
    transform: translateY(-4px);
}

/* ── Photo wrapper ───────────────────────────────────────── */
.sew-photo {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.sew-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}

.sew-scale-hover:hover img,
.sew-card:hover .sew-scale-hover img {
    transform: scale(1.06);
}

/* Ratios */
.sew-ratio-square  .sew-photo { aspect-ratio: 1/1; }
.sew-ratio-portrait  .sew-photo { aspect-ratio: 3/4; }
.sew-ratio-landscape .sew-photo { aspect-ratio: 4/3; }
.sew-ratio-circle  .sew-photo { aspect-ratio: 1/1; border-radius: 50%; margin: 16px auto; width: 75%; }
.sew-ratio-circle  .sew-photo img { border-radius: 50%; }

/* Placeholder avatar */
.sew-no-photo {
    width: 100%;
    height: 100%;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 48px;
}
.sew-no-photo svg { width: 48px; height: 48px; }

/* ── Badge ───────────────────────────────────────────────── */
.sew-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #6366f1;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .3px;
    z-index: 2;
    text-transform: uppercase;
}

/* ── Info block ──────────────────────────────────────────── */
.sew-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sew-name {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}

.sew-designation {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #6366f1;
}

.sew-org {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

.sew-bio {
    margin: 8px 0 0;
    font-size: 13px;
    color: #4b5563;
    line-height: 1.5;
}

/* ── Social icons ────────────────────────────────────────── */
.sew-social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 12px;
}

.sew-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    font-size: 16px;
    transition: color .2s, transform .2s;
    text-decoration: none;
}

.sew-social a:hover {
    color: #4338ca;
    transform: scale(1.2);
}

/* ── Session block ───────────────────────────────────────── */
.sew-session {
    margin-top: 10px;
    background: #f3f4f6;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.sew-session-title {
    font-weight: 600;
    color: #1f2937;
}

.sew-session-meta {
    color: #6b7280;
}

/* ─────────────────────────────────────────────────────────
   CARD STYLE VARIANTS
───────────────────────────────────────────────────────── */

/* Overlay style */
.sew-style-overlay .sew-card-inner { position: relative; overflow: hidden; }
.sew-style-overlay .sew-photo { height: 280px; aspect-ratio: unset; }
.sew-style-overlay .sew-info {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.85));
    color: #fff;
    padding: 32px 16px 16px;
    transform: translateY(60px);
    transition: transform .3s ease;
}
.sew-style-overlay .sew-card:hover .sew-info { transform: translateY(0); }
.sew-style-overlay .sew-name       { color: #fff; }
.sew-style-overlay .sew-designation{ color: #c7d2fe; }
.sew-style-overlay .sew-org        { color: #d1d5db; }
.sew-style-overlay .sew-social a   { color: #fff; }

/* Horizontal style */
.sew-style-horizontal .sew-card-inner {
    flex-direction: row;
    align-items: flex-start;
}
.sew-style-horizontal .sew-photo {
    width: 120px;
    flex-shrink: 0;
    aspect-ratio: 1/1;
    border-radius: 8px;
    margin: 12px 0 12px 12px;
    overflow: hidden;
}
.sew-style-horizontal.sew-ratio-circle .sew-photo { border-radius: 50%; }

/* Minimal style */
.sew-style-minimal .sew-card-inner {
    box-shadow: none;
    border-radius: 0;
    border-bottom: 1px solid #e5e7eb;
}
.sew-style-minimal .sew-card:hover .sew-card-inner {
    box-shadow: none;
    transform: none;
    border-color: #6366f1;
}

/* ─────────────────────────────────────────────────────────
   SPEAKER DETAIL PAGE
───────────────────────────────────────────────────────── */
.sew-detail-wrap {
    padding: 40px 0 80px;
}

.sew-detail-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.sew-back { margin-bottom: 28px; }

.sew-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
    border: 1px solid #c7d2fe;
    padding: 6px 16px;
    border-radius: 6px;
    transition: background .2s, color .2s;
}
.sew-back-btn:hover {
    background: #6366f1;
    color: #fff;
}

/* Hero row */
.sew-detail-hero {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.sew-detail-photo {
    position: relative;
    flex-shrink: 0;
    width: 220px;
}

.sew-detail-photo img {
    width: 100%;
    border-radius: 16px;
    display: block;
}

.sew-detail-intro { flex: 1; min-width: 200px; }

.sew-detail-name {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.2;
    color: #111827;
}

.sew-detail-designation {
    font-size: 16px;
    font-weight: 600;
    color: #6366f1;
    margin: 0 0 4px;
}

.sew-detail-org {
    font-size: 15px;
    color: #6b7280;
    margin: 0 0 20px;
}

/* Social on detail */
.sew-detail-social {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sew-detail-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    font-size: 18px;
    transition: background .2s, color .2s, transform .2s;
}
.sew-detail-social-icon:hover {
    background: #6366f1;
    color: #fff;
    transform: translateY(-2px);
}

/* Detail sections */
.sew-detail-section {
    margin-bottom: 40px;
}

.sew-detail-section-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.sew-detail-bio { font-size: 15px; line-height: 1.8; color: #374151; }

/* Session block */
.sew-detail-session {
    background: #f9fafb;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e5e7eb;
}

.sew-detail-talk-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px;
}

.sew-detail-session-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.sew-detail-session-meta span {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.sew-detail-talk-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #4b5563;
}

/* Archive page */
.sew-archive-wrap { padding: 40px 0 80px; }

.sew-archive-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 32px;
    color: #111827;
}

/* No results */
.sew-no-results {
    text-align: center;
    color: #9ca3af;
    font-size: 16px;
    padding: 40px;
}

/* Related speakers heading */
.sew-related .sew-name { font-size: 14px; }
.sew-related .sew-designation { font-size: 12px; }

/* ─────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .sew-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .sew-grid { grid-template-columns: 1fr; }
    .sew-style-horizontal .sew-card-inner { flex-direction: column; }
    .sew-style-horizontal .sew-photo { width: 100%; }
    .sew-detail-photo { width: 160px; }
    .sew-detail-name  { font-size: 24px; }
    .sew-related .sew-grid { grid-template-columns: 1fr !important; }
}
