/* ============================================
   HERO 3D ROLODEX CAROUSEL STYLES
   Adapted from React/Tailwind to vanilla CSS
   ============================================ */

/* --- Animations --- */
@keyframes heroFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-fade-up {
    animation: heroFadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

@keyframes personalizedHeroFloat {
    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(10deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(-5deg);
    }
}

/* --- Personalized Hero Background --- */
#summary.content-section {
    isolation: isolate;
}

.personalized-hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: linear-gradient(180deg, #fdfdff 0%, #f7f9ff 48%, #f3f7ff 100%);
}

.personalized-hero-background::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(45, 55, 72, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(45, 55, 72, 0.022) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.personalized-hero-background::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 3;
    opacity: 0.22;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

.personalized-hero-gradient-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(circle at 14% 18%, rgba(61, 28, 196, 0.18) 0%, rgba(61, 28, 196, 0) 32%),
        radial-gradient(circle at 70% 34%, rgba(79, 172, 254, 0.15) 0%, rgba(79, 172, 254, 0) 30%),
        radial-gradient(circle at 46% 76%, rgba(240, 147, 251, 0.1) 0%, rgba(240, 147, 251, 0) 26%),
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0) 74%);
}

.personalized-hero-gradient-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0) 56%, rgba(255, 255, 255, 0.18) 74%, rgba(255, 255, 255, 0.52) 100%);
    pointer-events: none;
}

.personalized-hero-shapes {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    filter: blur(112px);
    opacity: 0.68;
}

.personalized-hero-shape {
    position: absolute;
    border-radius: 50%;
    mix-blend-mode: multiply;
    animation: personalizedHeroFloat 25s infinite ease-in-out;
}

.personalized-hero-shape-1 {
    width: min(48vw, 580px);
    height: min(48vw, 580px);
    top: 0;
    left: -8%;
    background: radial-gradient(circle, rgba(41, 9, 166, 0.22) 0%, rgba(41, 9, 166, 0) 74%);
    animation-delay: 0s;
}

.personalized-hero-shape-2 {
    width: min(44vw, 520px);
    height: min(44vw, 520px);
    right: 1%;
    bottom: 0;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.18) 0%, rgba(79, 172, 254, 0) 74%);
    animation-delay: -5s;
    animation-duration: 30s;
}

.personalized-hero-shape-3 {
    width: min(32vw, 380px);
    height: min(32vw, 380px);
    top: 32%;
    right: 22%;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.14) 0%, rgba(240, 147, 251, 0) 74%);
    animation-delay: -10s;
    animation-duration: 34s;
}

/* --- Hero Section Layout (inside content-section card) --- */
.hero-section-inner {
    --hero-professor-size: clamp(400px, 38vw, 420px);
    display: grid;
    grid-template-columns: var(--hero-professor-size) minmax(0, 1fr);
    gap: var(--space-2xl);
    align-items: stretch;
    min-height: var(--hero-professor-size);
    position: relative;
    z-index: 5;
    isolation: isolate;
}

/* --- Professor Column (Left) --- */
.hero-professor-col {
    position: relative;
    flex-shrink: 0;
    margin-top: calc(-1 * var(--space-xl));
    margin-bottom: -2.5rem;
    margin-left: calc(-1 * var(--space-xl));
    /* Negate section left padding */
    display: flex;
    flex-direction: column;
    width: var(--hero-professor-size);
    align-self: start;
    aspect-ratio: 1 / 1;
    min-width: 0;
}

.hero-professor-col::before {
    content: '';
    position: absolute;
    width: min(28vw, 360px);
    height: min(28vw, 360px);
    left: 2%;
    top: 14%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(61, 28, 196, 0.12) 0%, rgba(61, 28, 196, 0) 72%);
    filter: blur(54px);
    z-index: -1;
    pointer-events: none;
}

.hero-professor-img-wrapper {
    width: 100%;
    height: 100%;
    flex: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px 0 0 16px;
}

.hero-professor-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    display: block;
}

.hero-professor-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    transition: background 0.3s ease;
}

.hero-professor-overlay:hover {
    background: rgba(255, 255, 255, 0.6);
}

.hero-professor-name {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.15rem 0;
    letter-spacing: 0.02em;
    line-height: 1.2;
    text-align: center;
}

.hero-professor-role {
    font-family: var(--font-primary);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.3;
    text-align: center;
}

/* --- Content Column (Right) --- */
.hero-content-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
    position: relative;
    z-index: 1;
}

.hero-content-col::before {
    content: '';
    position: absolute;
    width: min(34vw, 460px);
    height: min(34vw, 460px);
    right: 6%;
    top: 4%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 172, 254, 0.1) 0%, rgba(79, 172, 254, 0) 72%);
    filter: blur(58px);
    z-index: -1;
    pointer-events: none;
}

/* --- Title --- */
.hero-main-title {
    font-family: var(--font-display);
    font-size: 4.5rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin: 0 0 1.5rem 0;
}

.hero-main-title .brand-gradient-text {
    background: linear-gradient(to right, #1e0780, var(--brand-primary), var(--brand-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    padding-bottom: 0.1em;
}

.hero-main-title .neutral-text {
    color: var(--text-primary);
    font-weight: 700;
    display: inline-block;
    -webkit-text-fill-color: var(--text-primary);
}

.hero-main-title .brand-gradient-block {
    background: linear-gradient(to right, #1e0780, var(--brand-primary), var(--brand-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-top: 0.1em;
    padding-bottom: 0.1em;
}

/* --- Carousels Grid --- */
.hero-carousels-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    width: auto;
    margin-top: -1rem;
    align-items: start;
    overflow: visible;
}

.hero-carousel-column {
    display: flex;
    flex-direction: column;
    flex: 0 0 240px;
    width: 240px;
    gap: 0.15rem;
    overflow: visible;
}

.hero-carousel-question {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 700;
    color: var(--brand-primary);
    margin: 0;
    padding: 0 0.25rem;
    line-height: 1.3;
    min-height: 2.2em;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.hero-carousel-wrapper {
    border-radius: 1.5rem;
    padding: 0;
    margin-top: -0.75rem;
    display: flex;
    justify-content: flex-start;
    width: 100%;
    overflow: visible;
}

/* --- 3D Rolodex Container --- */
.rolodex-stage {
    position: relative;
    width: 240px;
    max-width: 240px;
    margin: 0 auto;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    perspective: 1000px;
}

.rolodex-scene {
    width: 120px;
    /* Match rotor width */
    height: 180px;
    /* Match rotor height */
    position: relative;
    transform-style: preserve-3d;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rolodex-rotor {
    position: relative;
    width: 120px;
    height: 180px;
    transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}

.rolodex-card-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.rolodex-card-wrapper.is-active {
    z-index: 2;
}

.rolodex-card {
    width: 100%;
    height: 100%;
    border-radius: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    /* Default: inactive state - narrowed horizontally */
    background: #dde3f5;
    border: 1px solid rgba(176, 189, 232, 0.92);
    opacity: 0.96;
    transform: scale(0.72, 0.9);
    transform-origin: center center;
}

.rolodex-card.active {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 14px 28px -20px rgba(15, 23, 42, 0.18);
    opacity: 1;
    transform: scale(1);
}

.rolodex-card-inner {
    padding: 0.75rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    transition: all 0.7s ease-in-out;
    opacity: 0;
    transform: scale(0.95);
}

.rolodex-card.active .rolodex-card-inner {
    opacity: 1;
    transform: scale(1);
}

/* --- Card Icon --- */
.rolodex-card-icon {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary-light);
}

.rolodex-card-icon svg {
    width: 80px;
    height: 80px;
}

/* --- Card Bottom Content --- */
.rolodex-card-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
    min-width: 0;
    align-items: center;
    text-align: center;
    padding-bottom: 0.25rem;
    padding-inline: 0.15rem;
    box-sizing: border-box;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

.rolodex-card-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--brand-primary);
    margin: 0;
    white-space: nowrap;
    max-width: 100%;
    overflow: visible;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    text-wrap: nowrap;
    display: block;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* --- Carousel Navigation --- */
.rolodex-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 0.35rem;
    z-index: 20;
    pointer-events: none;
}

.rolodex-nav-btn {
    pointer-events: auto;
    padding: 0.3rem;
    border-radius: 50%;
    color: var(--brand-primary);
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rolodex-nav-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.rolodex-nav-btn svg {
    width: 18px;
    height: 18px;
}

/* --- Bottom Row: Closing + CTAs side by side --- */
.hero-bottom-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    margin-top: 1.5rem;
    width: 100%;
}

/* --- Closing Statement --- */
.hero-closing-statement {
    flex-shrink: 0;
}

.hero-closing-text {
    font-family: 'Raleway', var(--font-primary), sans-serif;
    font-style: italic;
    font-size: 1rem;
    /* Match .hero-carousel-question size */
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.3;
    text-align: left;
}

.hero-closing-text .brand-gradient-text {
    background: linear-gradient(to right, #1e0780, var(--brand-primary), var(--brand-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    padding-bottom: 0.05em;
}

/* --- CTA Buttons Row (Book + WhatsApp) --- */
.hero-cta-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

@media (min-width: 769px) {
    #summary.content-section {
        overflow: visible !important;
    }

    .hero-section-inner {
        --hero-professor-size: clamp(280px, 31vw, 420px);
        grid-template-columns: minmax(260px, var(--hero-professor-size)) minmax(0, 1fr);
        align-items: stretch;
        min-height: var(--hero-professor-size);
    }

    .hero-professor-col {
        margin: 0;
        width: 100%;
        max-width: var(--hero-professor-size);
        height: 100%;
        align-self: stretch;
    }

    .hero-professor-img-wrapper {
        height: 100%;
        border-radius: 1rem;
    }

    .hero-content-col {
        min-height: var(--hero-professor-size);
        justify-content: flex-start;
    }

    .hero-main-title {
        font-size: clamp(2.9rem, 5vw, 4.5rem);
    }

    .hero-carousels-grid {
        display: grid;
        grid-template-columns: repeat(2, 220px);
        gap: clamp(1rem, 1.8vw, 1.5rem);
        width: min(100%, calc(440px + clamp(1rem, 1.8vw, 1.5rem)));
        max-width: 100%;
        margin-top: 0;
        align-items: flex-start;
    }

    .hero-carousel-column {
        width: 220px;
        min-width: 220px;
        gap: 0.15rem;
    }

    .hero-carousel-wrapper {
        display: flex;
        justify-content: center;
        margin-top: 0;
    }

    .hero-carousel-question {
        min-height: 2.6em;
        padding: 0;
    }

    .rolodex-stage {
        width: 220px;
        max-width: 220px;
        height: 190px;
        margin: 0 auto;
    }

    .rolodex-scene,
    .rolodex-rotor {
        width: 106px;
        height: 160px;
    }

    .rolodex-card {
        opacity: 0.9;
        transform: scale(0.68, 0.9);
    }

    .rolodex-card.active {
        border-color: rgba(226, 232, 240, 0.8);
        box-shadow: 0 10px 22px -18px rgba(15, 23, 42, 0.16);
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    #summary.content-section {
        padding: 1.25rem 0.5rem calc(7rem + env(safe-area-inset-bottom)) !important;
        overflow: visible !important;
    }

    .personalized-hero-shapes {
        filter: blur(78px);
        opacity: 0.58;
    }

    .personalized-hero-shape-1 {
        width: 74vw;
        height: 74vw;
        top: -6%;
        left: -20%;
    }

    .personalized-hero-shape-2 {
        width: 68vw;
        height: 68vw;
        right: -14%;
        bottom: 4%;
    }

    .personalized-hero-shape-3 {
        width: 52vw;
        height: 52vw;
        top: 44%;
        right: 8%;
    }

    .hero-professor-col::before {
        width: 56vw;
        height: 56vw;
        left: 50%;
        top: 10%;
        transform: translateX(-50%);
        filter: blur(40px);
    }

    .hero-content-col::before {
        width: 64vw;
        height: 64vw;
        left: 50%;
        right: auto;
        top: 8%;
        transform: translateX(-50%);
        filter: blur(44px);
    }

    .hero-full-width {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 2.5rem;
    }

    .hero-section-inner {
        grid-template-columns: 1fr;
        min-height: auto;
        gap: 1.25rem;
        width: 100%;
        min-width: 0;
    }

    .hero-professor-col {
        width: min(100%, 420px);
        margin: 0 auto;
        aspect-ratio: 1 / 1;
        justify-self: center;
    }

    .hero-content-col {
        width: 100%;
        min-width: 0;
        align-items: center;
    }

    .hero-main-title {
        font-size: clamp(2rem, 10vw, 3rem);
        text-align: center;
        width: 100%;
        max-width: 100%;
        margin-bottom: 0.9rem;
    }

    .hero-main-title .brand-gradient-text,
    .hero-main-title .neutral-text {
        display: inline;
    }

    .hero-carousels-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: clamp(0.45rem, 2vw, 0.75rem);
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-inline: 0;
        box-sizing: border-box;
        margin: 0 auto;
        align-items: flex-start;
    }

    .hero-carousel-column {
        min-width: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0;
        overflow: visible;
    }

    .hero-carousel-question {
        display: flex;
        width: 100%;
        min-width: 0;
        min-height: 1.45em;
        padding: 0;
        align-items: flex-end;
        justify-content: center;
        font-size: clamp(0.72rem, 2.2vw, 0.9rem);
        line-height: 1.1;
        text-align: center;
    }

    .hero-carousel-wrapper {
        width: 100%;
        display: flex;
        justify-content: center;
        margin-top: -0.38rem;
    }

    #hero-rolodex-goals,
    #hero-rolodex-feelings {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .rolodex-stage {
        width: 100%;
        max-width: none;
        height: auto;
        aspect-ratio: 12 / 11;
        margin: 0 auto;
    }

    .rolodex-scene,
    .rolodex-rotor {
        width: 56%;
        height: 80%;
    }

    .rolodex-card.active {
        width: 122%;
        max-width: 122%;
        align-self: center;
        transform: scale(1);
    }

    .rolodex-card-inner {
        justify-content: center;
        gap: clamp(0.35rem, 1.4vw, 0.5rem);
        padding: clamp(0.42rem, 1.6vw, 0.58rem);
    }

    .rolodex-card-icon svg {
        width: clamp(34px, 9.6vw, 52px);
        height: clamp(34px, 9.6vw, 52px);
    }

    .rolodex-card-title {
        width: 100%;
        font-size: clamp(0.72rem, 2.35vw, 0.98rem);
        line-height: 1.06;
        text-align: center;
    }

    .hero-bottom-row {
        align-items: center;
        margin-top: 0.8rem;
    }

    .hero-closing-statement,
    .hero-closing-text {
        width: 100%;
        text-align: center;
    }

    .hero-cta-row {
        display: none;
    }
}
