/**
 * School Public Profile — Premium Design
 * Matches homepage navy-academic design language
 */

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --sp-navy-900: #0d1b3e;
    --sp-navy-800: #132952;
    --sp-navy-700: #1a365d;
    --sp-navy-600: #234e87;
    --sp-navy-500: #2b6cb0;
    --sp-navy-400: #4299e1;
    --sp-navy-200: #bee3f8;
    --sp-navy-100: #ebf8ff;

    --sp-gold-600: #b7791f;
    --sp-gold-500: #d69e2e;
    --sp-gold-400: #ecc94b;

    --sp-teal-600: #0e7490;
    --sp-teal-500: #0891b2;
    --sp-teal-100: #e0f7fa;

    --sp-text: #2d3748;
    --sp-text-muted: #718096;
    --sp-text-light: #a0aec0;

    --sp-bg: #ffffff;
    --sp-bg-alt: #f0f4fa;
    --sp-border: #e2e8f0;

    --sp-shadow-sm: 0 2px 8px rgba(13, 27, 62, 0.06);
    --sp-shadow-md: 0 4px 20px rgba(13, 27, 62, 0.08);
    --sp-shadow-lg: 0 12px 40px rgba(13, 27, 62, 0.1);

    --sp-radius-sm: 8px;
    --sp-radius-md: 14px;
    --sp-radius-lg: 20px;
    --sp-radius-xl: 28px;
    --sp-radius-pill: 50px;

    --sp-ease: cubic-bezier(0.4, 0, 0.2, 1);
    --sp-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --sp-font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
    --sp-container: 1200px;
    --sp-gutter: clamp(16px, 4vw, 40px);
}

/* ============================================================
   BASE
   ============================================================ */
.sp {
    font-family: var(--sp-font);
    color: var(--sp-text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

.sp *, .sp *::before, .sp *::after {
    box-sizing: border-box;
}

.sp h1, .sp h2, .sp h3, .sp h4 {
    font-family: var(--sp-font);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
}

.sp-container {
    max-width: var(--sp-container);
    margin: 0 auto;
    padding: 0 var(--sp-gutter);
}

/* ============================================================
   HERO
   ============================================================ */
.sp-hero {
    position: relative;
    background: linear-gradient(160deg, var(--sp-navy-900) 0%, var(--sp-navy-700) 45%, var(--sp-navy-600) 100%);
    padding: clamp(60px, 10vw, 120px) 0 clamp(100px, 12vw, 180px);
    overflow: hidden;
    color: #fff;
}

.sp-hero__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.sp-hero__shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.05;
    background: #fff;
}

.sp-hero__shape--1 {
    width: 500px;
    height: 500px;
    top: -150px;
    right: -80px;
}

.sp-hero__shape--2 {
    width: 300px;
    height: 300px;
    bottom: -100px;
    left: -60px;
}

.sp-hero__grid-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 32px 32px;
    pointer-events: none;
}

.sp-hero__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 48px;
}

.sp-hero__logo {
    flex: 0 0 auto;
    animation: spFadeUp 0.6s var(--sp-ease) backwards;
}

.sp-hero__logo img {
    width: 130px;
    height: 130px;
    object-fit: contain;
    background: #fff;
    border-radius: var(--sp-radius-lg);
    padding: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.sp-hero__content {
    flex: 1;
    min-width: 0;
}

.sp-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 16px;
    animation: spFadeUp 0.6s var(--sp-ease) 0.1s backwards;
}

.sp-hero__badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    animation: spFadeUp 0.6s var(--sp-ease) 0.2s backwards;
}

.sp-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--sp-radius-pill);
    font-size: 0.8125rem;
    font-weight: 600;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}

.sp-hero__location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 16px;
    animation: spFadeUp 0.6s var(--sp-ease) 0.3s backwards;
}

.sp-hero__desc {
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.8);
    max-width: 640px;
    margin: 0 0 24px;
    animation: spFadeUp 0.6s var(--sp-ease) 0.35s backwards;
}

.sp-hero__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    animation: spFadeUp 0.6s var(--sp-ease) 0.4s backwards;
}

@keyframes spFadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Wave */
.sp-wave {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    line-height: 0;
    overflow: hidden;
}

.sp-wave--bottom {
    bottom: -1px;
}

.sp-wave svg {
    display: block;
    width: 100%;
    height: clamp(50px, 8vw, 100px);
}

/* Hero responsive */
@media (max-width: 768px) {
    .sp-hero {
        padding: 48px 0 100px;
    }
    .sp-hero__inner {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    .sp-hero__logo img {
        width: 100px;
        height: 100px;
    }
    .sp-hero__badges { justify-content: center; }
    .sp-hero__location { justify-content: center; }
    .sp-hero__desc { margin-left: auto; margin-right: auto; }
    .sp-hero__actions { justify-content: center; }
}

/* ============================================================
   BUTTONS
   ============================================================ */
.sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--sp-font);
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    border-radius: var(--sp-radius-sm);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--sp-transition);
    white-space: nowrap;
    padding: 10px 20px;
}

.sp-btn--lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: var(--sp-radius-md);
}

.sp-btn--sm {
    padding: 8px 16px;
    font-size: 0.8125rem;
}

.sp-btn--block {
    width: 100%;
}

.sp-btn--primary {
    background: var(--sp-navy-700);
    color: #fff;
}

.sp-btn--primary:hover {
    background: var(--sp-navy-800);
    transform: translateY(-1px);
    box-shadow: var(--sp-shadow-md);
}

.sp-btn--outline {
    background: transparent;
    color: var(--sp-navy-700);
    border: 1.5px solid var(--sp-border);
}

.sp-btn--outline:hover {
    border-color: var(--sp-navy-400);
    background: var(--sp-navy-100);
}

.sp-btn--white {
    background: #fff;
    color: var(--sp-navy-700);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.sp-btn--white:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}

.sp-btn--ghost {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,0.5);
}

.sp-btn--ghost:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

/* ============================================================
   INFO BAR
   ============================================================ */
.sp-info-bar {
    background: var(--sp-bg);
    border-bottom: 1px solid var(--sp-border);
    padding: 16px 0;
}

.sp-info-bar__grid {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.sp-info-bar__item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--sp-text-muted);
}

.sp-info-bar__item i {
    color: var(--sp-navy-500);
    font-size: 0.9375rem;
}

.sp-info-bar__item--socials {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.sp-info-bar__item--socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--sp-bg-alt);
    color: var(--sp-navy-700);
    transition: all var(--sp-transition);
    text-decoration: none;
}

.sp-info-bar__item--socials a:hover {
    background: var(--sp-navy-700);
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    .sp-info-bar__grid {
        justify-content: center;
        gap: 16px;
    }
    .sp-info-bar__item--socials {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   GRID LAYOUT
   ============================================================ */
.sp-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    padding: 48px 0 80px;
    align-items: start;
}

.sp-main {
    min-width: 0;
}

@media (max-width: 960px) {
    .sp-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 32px 0 60px;
    }
}

/* ============================================================
   CARDS
   ============================================================ */
.sp-card {
    background: var(--sp-bg);
    border-radius: var(--sp-radius-lg);
    box-shadow: var(--sp-shadow-sm);
    border: 1px solid var(--sp-border);
    padding: 28px;
    margin-bottom: 28px;
    scroll-margin-top: 90px;
}

.sp-card__header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
}

.sp-card__header--compact {
    margin-bottom: 16px;
}

.sp-card__header h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--sp-text);
}

.sp-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--sp-radius-sm);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sp-card__icon--navy {
    background: var(--sp-navy-100);
    color: var(--sp-navy-700);
}

.sp-card__icon--gold {
    background: #fef9ef;
    color: var(--sp-gold-600);
}

.sp-card__icon--teal {
    background: var(--sp-teal-100);
    color: var(--sp-teal-600);
}

.sp-card__footer {
    padding-top: 16px;
    margin-top: 8px;
    border-top: 1px solid var(--sp-border);
}

/* ============================================================
   GUIDELINES
   ============================================================ */
.sp-guidelines {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sp-guideline {
    padding: 16px 20px;
    background: var(--sp-bg-alt);
    border-radius: var(--sp-radius-md);
    border-left: 4px solid var(--sp-navy-500);
}

.sp-guideline h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--sp-text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sp-guideline h3 i {
    color: var(--sp-navy-500);
}

.sp-guideline p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--sp-text-muted);
    line-height: 1.7;
}

.sp-guideline__links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ============================================================
   SHOE LIST CARDS
   ============================================================ */
.sp-shoe-lists {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sp-list-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--sp-bg-alt);
    border-radius: var(--sp-radius-md);
    border: 1px solid transparent;
    transition: all var(--sp-transition);
}

.sp-list-card:hover {
    border-color: var(--sp-navy-200);
    box-shadow: var(--sp-shadow-sm);
}

.sp-list-card__body {
    flex: 1;
    min-width: 0;
}

.sp-list-card__body h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--sp-text);
    margin-bottom: 4px;
}

.sp-list-card__meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: var(--sp-text-muted);
}

.sp-list-card__meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.sp-list-card__meta i {
    font-size: 0.75rem;
    color: var(--sp-text-light);
}

.sp-list-card__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .sp-list-card {
        flex-direction: column;
        align-items: stretch;
    }
    .sp-list-card__actions {
        justify-content: stretch;
    }
    .sp-list-card__actions .sp-btn {
        flex: 1;
    }
}

/* ============================================================
   NOTICES
   ============================================================ */
.sp-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--sp-radius-sm);
    font-size: 0.9375rem;
    margin-bottom: 16px;
}

.sp-notice i {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.sp-notice p {
    margin: 0;
}

.sp-notice--info {
    background: var(--sp-navy-100);
    color: var(--sp-navy-700);
}

.sp-notice--warning {
    background: #fffbeb;
    color: #92400e;
}

/* ============================================================
   SCHOOL DETAILS
   ============================================================ */
.sp-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.sp-details h3 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sp-text-muted);
    margin-bottom: 12px;
}

.sp-details address {
    font-style: normal;
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--sp-text);
}

.sp-share {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .sp-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ============================================================
   MAP
   ============================================================ */
.sp-map-wrap {
    border-radius: var(--sp-radius-md);
    overflow: hidden;
}

.sp-map {
    width: 100%;
    height: 420px;
}

@media (max-width: 768px) {
    .sp-map { height: 320px; }
}

/* Map markers */
.sp-marker {
    background: transparent !important;
    border: none !important;
}

.sp-marker__dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    position: relative;
    transition: transform 0.2s ease;
}

.sp-marker__dot:hover {
    transform: scale(1.15);
}

.sp-marker__dot--school {
    background: linear-gradient(135deg, #f5576c, #ff6b6b);
}

.sp-marker__dot--shop {
    background: linear-gradient(135deg, var(--sp-navy-500), #764ba2);
}

.sp-marker__dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: inherit;
    opacity: 0;
    animation: spPulse 2s ease-out infinite;
}

@keyframes spPulse {
    0%   { transform: scale(1); opacity: 0.5; }
    100% { transform: scale(1.6); opacity: 0; }
}

/* Map popup */
.sp-popup {
    padding: 4px 2px;
    max-width: 220px;
}

.sp-popup strong {
    display: block;
    font-size: 0.9375rem;
    margin-bottom: 4px;
}

.sp-popup span {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--sp-navy-500);
    margin-bottom: 6px;
}

.sp-popup small {
    display: block;
    font-size: 0.8125rem;
    color: var(--sp-text-muted);
    margin-bottom: 4px;
}

.sp-popup a {
    display: inline-block;
    font-size: 0.8125rem;
    color: var(--sp-navy-500);
    text-decoration: none;
    font-weight: 600;
    margin-top: 4px;
}

.sp-popup a:hover {
    text-decoration: underline;
}

/* ============================================================
   SIDEBAR — SHOPS
   ============================================================ */
.sp-shops {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sp-shop {
    display: block;
    padding: 14px 16px;
    border-radius: var(--sp-radius-sm);
    text-decoration: none;
    color: var(--sp-text);
    transition: all var(--sp-transition);
    border: 1px solid transparent;
}

.sp-shop:hover {
    background: var(--sp-bg-alt);
    border-color: var(--sp-border);
}

.sp-shop__top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.sp-shop__top h3 {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--sp-navy-700);
    margin: 0;
}

.sp-shop__distance {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background: var(--sp-teal-500);
    padding: 2px 8px;
    border-radius: var(--sp-radius-pill);
    white-space: nowrap;
}

.sp-shop__address {
    font-size: 0.8125rem;
    color: var(--sp-text-muted);
    line-height: 1.5;
}

.sp-shop__phone {
    font-size: 0.8125rem;
    color: var(--sp-text-muted);
    margin-top: 4px;
}

.sp-shop__phone i {
    font-size: 0.75rem;
}

/* ============================================================
   SIDEBAR — LINKS
   ============================================================ */
.sp-links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sp-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--sp-radius-sm);
    text-decoration: none;
    color: var(--sp-text);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all var(--sp-transition);
}

.sp-link:hover {
    background: var(--sp-bg-alt);
    color: var(--sp-navy-700);
}

.sp-link > i:first-child {
    width: 20px;
    text-align: center;
    color: var(--sp-navy-500);
    font-size: 0.9375rem;
}

.sp-link > span {
    flex: 1;
}

.sp-link > i:last-child {
    font-size: 0.6875rem;
    color: var(--sp-text-light);
    transition: transform var(--sp-transition);
}

.sp-link:hover > i:last-child {
    transform: translateX(3px);
    color: var(--sp-navy-500);
}

/* ============================================================
   SIDEBAR — CTA CARD
   ============================================================ */
.sp-cta-card {
    background: linear-gradient(135deg, var(--sp-navy-700), var(--sp-navy-900));
    border-radius: var(--sp-radius-lg);
    padding: 28px;
    text-align: center;
    color: #fff;
    margin-bottom: 28px;
}

.sp-cta-card__icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.25rem;
}

.sp-cta-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.sp-cta-card p {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.75);
    line-height: 1.6;
    margin: 0 0 20px;
}

/* ============================================================
   TOAST
   ============================================================ */
.sp-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #065f46;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--sp-radius-sm);
    box-shadow: var(--sp-shadow-lg);
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ============================================================
   SCROLL TARGETS
   ============================================================ */
#sp-guidelines,
#sp-shoe-lists,
#sp-details,
#sp-map,
#sp-nearby-shops {
    scroll-margin-top: 90px;
}
