/* ============================================================
   home.css — Home Page
   Color Palette: #F2D8E1 (blush pink) + White
   Location: static/css/home.css
   ============================================================ */

/* ── CSS Variables ───────────────────────────────────────── */
:root {
    --pink:           #F2D8E1;
    --pink-dark:      #e8c2d0;
    --pink-light:     #faeef3;
    --accent:         #c9718f;
    --accent-dark:    #a85570;
    --white:          #ffffff;
    --text-dark:      #2c1a2e;
    --text-mid:       #5a3a4a;
    --text-soft:      #a07080;
    --border:         rgba(180, 110, 140, 0.28);
    --border-focus:   rgba(180, 110, 140, 0.60);
    --shadow-sm:      0 2px 10px rgba(193, 100, 135, 0.10);
    --shadow-md:      0 6px 24px rgba(193, 100, 135, 0.16);
    --shadow-lg:      0 16px 48px rgba(193, 100, 135, 0.22);
    --radius:         16px;
    --radius-sm:      10px;
    --transition:     all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Body ────────────────────────────────────────────────── */
body {

    min-height: 100vh;
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
    color: var(--text-dark);
}

/* ── Container ───────────────────────────────────────────── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   IMAGE CAROUSEL SECTION
   ============================================================ */
.image-carousel-section {
    width: 100%;
    margin-bottom: 36px;
    animation: fadeInDown 0.6s ease both;
}

.carousel-container {
    position: relative;
    width: 100%;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-lg);
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ── Carousel Slides ─────────────────────────────────────── */
.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Carousel Overlay ────────────────────────────────────── */
.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(44, 26, 46, 0.05) 0%,
        rgba(44, 26, 46, 0.25) 60%,
        rgba(44, 26, 46, 0.55) 100%
    );
}

/* ── Carousel Caption ────────────────────────────────────── */
.carousel-caption {
    position: absolute;
    bottom: 64px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 90%;
    max-width: 680px;
    z-index: 2;
}

.carousel-caption h3 {
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--white);
    margin: 0 0 10px;
    text-shadow: 0 2px 12px rgba(44, 26, 46, 0.45);
    letter-spacing: -0.3px;
}

.carousel-caption p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
    text-shadow: 0 1px 6px rgba(44, 26, 46, 0.35);
    line-height: 1.6;
}

/* ── Carousel Buttons ────────────────────────────────────── */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.88);
    border: 1.5px solid var(--pink-dark);
    border-radius: 50%;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dark);
    font-size: 0.95rem;
    z-index: 3;
    backdrop-filter: blur(4px);
}

.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }

.carousel-btn:hover {
    background: #F2D8E1;
    border-color: var(--accent);
    color: var(--accent-dark);
    transform: translateY(-50%) scale(1.08);
    box-shadow: var(--shadow-md);
}

/* ── Carousel Indicators ─────────────────────────────────── */
/* Positioned INSIDE the wrapper at the bottom, overlaid on the image */
.carousel-indicators {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: 4;
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.28);
    border-radius: 999px;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.50);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: inline-block;
    flex-shrink: 0;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.85);
    transform: scale(1.2);
}

.indicator.active {
    background: #fff;
    width: 22px;
    border-radius: 4px;
    transform: none;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.45);
}

/* ── Carousel Logo Overlay ───────────────────────────────── */
.carousel-logo-overlay {
    position: absolute;
    top: 14px;
    right: 20px;
    z-index: 10;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.carousel-logo-overlay img {
    width: 110px;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.carousel-logo-overlay span { display: none; }

/* ── Carousel Register Form ──────────────────────────────── */
.carousel-register-form {
    position: absolute;
    right: 32px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    padding: 24px 20px 20px;
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: all;
}

.carousel-register-form h4 {
    margin: 0 0 4px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #4a1a4a;
    text-align: center;
    letter-spacing: 0.3px;
}

.carousel-register-form select,
.carousel-register-form input[type="text"],
.carousel-register-form input[type="tel"] {
    width: 100%;
    padding: 8px 10px;
    border: 1.5px solid #e0c0cc;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #444;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}

.carousel-register-form select:focus,
.carousel-register-form input:focus {
    border-color: #c0697a;
}

.carousel-register-form .phone-row {
    display: flex;
    gap: 6px;
}

.carousel-register-form .phone-row select {
    width: 80px;
    flex-shrink: 0;
    font-size: 0.75rem;
    padding: 8px 4px;
}

.carousel-register-form .phone-row input {
    flex: 1;
}

.carousel-register-form .btn-carousel-register {
    background: linear-gradient(135deg, #e85d75, #c0392b);
    color: #fff;
    border: none;
    border-radius: 22px;
    padding: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    letter-spacing: 0.5px;
    animation: popInOut 1.4s ease-in-out infinite;
    transition: transform 0.2s;
}

.carousel-register-form .btn-carousel-register:hover {
    animation-play-state: paused;
    transform: scale(1.04);
}

.carousel-register-form .terms-note {
    font-size: 0.62rem;
    color: #999;
    text-align: center;
    line-height: 1.4;
}

.carousel-register-form .terms-note a {
    color: #c0697a;
    text-decoration: none;
}

/* Gender row */
.carousel-register-form .gender-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #666;
    display: block;
    margin-bottom: 5px;
}

.carousel-register-form .gender-options {
    display: flex;
    gap: 10px;
}

.carousel-register-form .gender-opt {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    color: #444;
    cursor: pointer;
    background: #fdf0f4;
    border: 1.5px solid #e0c0cc;
    border-radius: 20px;
    padding: 5px 12px;
    flex: 1;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.carousel-register-form .gender-opt:has(input:checked) {
    background: #fce4ec;
    border-color: #c0697a;
    font-weight: 600;
}

.carousel-register-form .gender-opt input {
    display: none;
}

/* ── Profile card logo watermark ─────────────────────────── */
.profile-card-image { position: relative; }

.profile-card-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 85%;
    height: 85%;
    object-fit: contain;
    border-radius: 50%;
    border: 4px solid #f2b8cc;
    z-index: 5;
    pointer-events: none;
    opacity: 0.18;
    mix-blend-mode: normal;
    background: transparent;
}

/* ── Anti-download: disable save / drag on all home images ── */
.profile-card-image img,
.profile-card-logo,
.carousel-slide img,
.carousel-logo-overlay img,
.success-story-image img {
    -webkit-user-select:   none;
    -moz-user-select:      none;
    user-select:           none;
    -webkit-touch-callout: none;
    pointer-events:        none;
}

.profile-card-image,
.carousel-slide,
.carousel-logo-overlay,
.success-story-image {
    pointer-events: auto;
}

/* ============================================================
   MAIN LAYOUT (Sidebar + Content)
   ============================================================ */
.main-layout {
    display: flex;
    gap: 28px;
    padding: 32px 0 48px;
    align-items: flex-start;
}

.main-layout main {
    flex: 1;
    min-width: 0;
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    animation: fadeInDown 0.6s ease both;
}

.section-header h2 {
    font-size: 1.45rem;
    font-weight: 900;
    color: var(--text-dark);
    margin: 0;
    letter-spacing: -0.2px;
    position: relative;
    padding-bottom: 8px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--pink-dark));
    border-radius: 4px;
}

.view-all-link {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--accent-dark);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1.5px solid var(--border);
    border-radius: 999px;
    background: var(--white);
    transition: var(--transition);
}

.view-all-link:hover {
    background: #F2D8E1;
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   PROFILE GRID SECTION
   ============================================================ */
.profile-grid-section {
    animation: fadeInUp 0.5s ease both;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* ── Profile Card ────────────────────────────────────────── */
.card.profile-card {
    background: var(--white);
    border: 1.5px solid var(--pink-dark);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s ease both;
    position: relative;
}

.card.profile-card:nth-child(1) { animation-delay: 0.05s; }
.card.profile-card:nth-child(2) { animation-delay: 0.10s; }
.card.profile-card:nth-child(3) { animation-delay: 0.15s; }
.card.profile-card:nth-child(4) { animation-delay: 0.20s; }
.card.profile-card:nth-child(5) { animation-delay: 0.25s; }
.card.profile-card:nth-child(6) { animation-delay: 0.30s; }

.card.profile-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, var(--pink-light), var(--white));
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 0;
    pointer-events: none;
}

.card.profile-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.card.profile-card:hover::before { opacity: 1; }
.card.profile-card > * { position: relative; z-index: 1; }

/* ── Profile Card Image ──────────────────────────────────── */
.profile-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--pink-light);
    flex-shrink: 0;
}

.profile-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.card.profile-card:hover .profile-card-image img {
    transform: scale(1.07);
}

/* ── Profile Card Content ────────────────────────────────── */
.profile-card-content {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.profile-card-content h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
}

.profile-card-content p {
    font-size: 0.83rem;
    color: var(--text-soft);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.profile-card-content p::before {
    content: '📍';
    font-size: 0.78rem;
}

/* ============================================================
   SUCCESS STORIES SECTION
   ============================================================ */
.success-stories-section {
    background: linear-gradient(135deg, var(--pink) 0%, var(--pink-light) 100%);
    border-top: 1.5px solid var(--pink-dark);
    border-bottom: 1.5px solid var(--pink-dark);
    padding: 48px 0 56px;
    position: relative;
    overflow: hidden;
}

.success-stories-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 10% 50%, rgba(210, 150, 185, 0.30) 0%, transparent 40%),
        radial-gradient(ellipse at 90% 50%, rgba(210, 150, 185, 0.22) 0%, transparent 40%);
    pointer-events: none;
}

.success-stories-section .container { position: relative; z-index: 1; }

.success-stories-section .section-header {
    justify-content: center;
    margin-bottom: 28px;
}

.success-stories-section .section-header h2 {
    font-size: 1.6rem;
    text-align: center;
}

.success-stories-section .section-header h2::after {
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
}

/* ── Stories Grid ────────────────────────────────────────── */
.success-stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ── Success Story Card ──────────────────────────────────── */
.card.success-story-card {
    background: var(--white);
    border: 1.5px solid var(--pink-dark);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    opacity: 0;
    transform: translateY(24px);
}

.card.success-story-card.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.55s ease, transform 0.55s ease,
                box-shadow 0.3s ease, border-color 0.3s ease;
}

.card.success-story-card:nth-child(1) { transition-delay: 0.05s; }
.card.success-story-card:nth-child(2) { transition-delay: 0.12s; }
.card.success-story-card:nth-child(3) { transition-delay: 0.19s; }
.card.success-story-card:nth-child(4) { transition-delay: 0.26s; }
.card.success-story-card:nth-child(5) { transition-delay: 0.33s; }
.card.success-story-card:nth-child(6) { transition-delay: 0.40s; }

.card.success-story-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, var(--pink-light), var(--white));
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 0;
    pointer-events: none;
}

.card.success-story-card:hover {
    transform: translateY(-7px) scale(1.01);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.card.success-story-card:hover::before { opacity: 1; }
.card.success-story-card > * { position: relative; z-index: 1; }

/* ── Story Image ─────────────────────────────────────────── */
.success-story-image {
    width: 100%;
    height: 210px;
    overflow: hidden;
    background: var(--pink-light);
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-story-image img {
    width: 168px;
    height: 168px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.95);
    outline: 2px solid rgba(201, 113, 143, 0.22);
    outline-offset: 6px;
    box-shadow: 0 12px 28px rgba(193, 100, 135, 0.22);
    transition: transform 0.55s ease, box-shadow 0.55s ease, outline-color 0.55s ease;
    display: block;
}

.card.success-story-card:hover .success-story-image img {
    transform: scale(1.08);
    box-shadow: 0 18px 42px rgba(193, 100, 135, 0.28);
    outline-color: rgba(201, 113, 143, 0.38);
}

.success-story-image::before,
.success-story-image::after {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    text-shadow:
        0 0 10px rgba(201, 113, 143, 0.35),
        0 8px 16px rgba(193, 100, 135, 0.18);
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.success-story-image::after {
    content: "✦";
    top: 18px;
    right: 18px;
    font-size: 1.2rem;
    color: var(--accent-dark);
}

.success-story-image::before {
    content: "✧";
    bottom: 18px;
    left: 18px;
    font-size: 1.1rem;
    color: var(--accent);
}

.card.success-story-card:hover .success-story-image::before,
.card.success-story-card:hover .success-story-image::after,
.card.success-story-card:focus-within .success-story-image::before,
.card.success-story-card:focus-within .success-story-image::after {
    opacity: 0.98;
    transform: scale(1);
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.card.success-story-card:hover .success-story-image::after,
.card.success-story-card:focus-within .success-story-image::after {
    animation-name: sparkleTwinkle;
    animation-duration: 1.6s;
}

.card.success-story-card:hover .success-story-image::before,
.card.success-story-card:focus-within .success-story-image::before {
    animation-name: sparkleFloat;
    animation-duration: 2.2s;
}

/* ── Story Content ───────────────────────────────────────── */
.success-story-content {
    padding: 20px 20px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.success-story-content h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

.success-story-content h3::before {
    content: '💍';
    font-size: 0.95rem;
}

.success-story-content p {
    font-size: 0.87rem;
    color: var(--text-mid);
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid var(--border);
    transition: var(--transition);
    font-family: inherit;
    white-space: nowrap;
    margin-top: auto;
}

.btn-primary {
    background: #F2D8E1;
    color: var(--text-dark);
    border-color: var(--border);
}

.btn-primary:hover {
    background: var(--white);
    color: var(--accent-dark);
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(193, 100, 135, 0.22);
}

.btn-secondary {
    background: var(--white);
    color: var(--text-dark);
    border-color: var(--border);
}

.btn-secondary:hover {
    background: #F2D8E1;
    color: var(--accent-dark);
    border-color: var(--border-focus);
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(193, 100, 135, 0.16);
}

/* Premium lock box */
.premium-lock-box {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.premium-message {
    background: #fff0f4;
    border: 2px dashed #e85d75;
    padding: 40px;
    text-align: center;
    border-radius: 16px;
    max-width: 500px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

.premium-message i {
    font-size: 32px;
    color: #c0392b;
    margin-bottom: 10px;
}

.premium-message h3 {
    margin-bottom: 10px;
    color: #4a1a4a;
}

.premium-message p {
    color: #666;
    margin-bottom: 20px;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes popInOut {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(232, 93, 117, 0.6); }
    50%  { transform: scale(1.06); box-shadow: 0 0 0 8px rgba(232, 93, 117, 0); }
    100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(232, 93, 117, 0); }
}

@keyframes sparkleTwinkle {
    0%, 100% { transform: scale(0.92) rotate(-8deg); opacity: 0.55; }
    50%       { transform: scale(1.25) rotate(10deg); opacity: 1; }
}

@keyframes sparkleFloat {
    0%, 100% { transform: translateY(0) scale(0.95);    opacity: 0.65; }
    50%       { transform: translateY(-8px) scale(1.15); opacity: 1; }
}

/* ============================================================
   RESPONSIVE — CAROUSEL SECTION
   ============================================================

   Breakpoints:
     1200px  Tablet landscape / small desktop
      1024px  Tablet landscape
       768px  Tablet portrait
       600px  Large phone landscape
       480px  Phone portrait
       380px  Small phone
   ============================================================ */

/* ── 1200px: slightly narrower desktops ─────────────────── */
@media (max-width: 1200px) {
    .carousel-wrapper { height: 440px; }

    /* Register form: slightly smaller so it doesn't crowd the image */
    .carousel-register-form {
        width: 200px;
        right: 20px;
        padding: 20px 16px 16px;
        gap: 10px;
    }
}

/* ── 1024px: tablet landscape ────────────────────────────── */
@media (max-width: 1024px) {
    .main-layout {
        flex-direction: column;
        gap: 20px;
    }

    .carousel-wrapper { height: 380px; }

    .carousel-caption h3 { font-size: 1.5rem; }
    .carousel-caption     { bottom: 54px; }

    /* Form still floats but narrower */
    .carousel-register-form {
        width: 190px;
        right: 16px;
        padding: 18px 14px 14px;
        gap: 9px;
        font-size: 0.78rem;
    }

    .carousel-register-form h4            { font-size: 0.88rem; }
    .carousel-register-form select,
    .carousel-register-form input[type="text"],
    .carousel-register-form input[type="tel"] {
        font-size: 0.78rem;
        padding: 7px 8px;
    }
    .carousel-register-form .btn-carousel-register {
        font-size: 0.82rem;
        padding: 9px;
    }

    /* Logo overlay */
    .carousel-logo-overlay img { width: 90px; }
}

/* ── 768px: tablet portrait ──────────────────────────────── */
@media (max-width: 768px) {
    .carousel-wrapper {
        height: 320px;
        border-radius: 0;
    }

    .carousel-caption        { bottom: 52px; width: 80%; max-width: 100%; }
    .carousel-caption h3     { font-size: 1.2rem; }
    .carousel-caption p      { font-size: 0.85rem; }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 0.80rem;
    }
    .carousel-btn.prev { left: 10px; }
    .carousel-btn.next { right: 10px; }

    /* Logo top-left on mobile so form doesn't overlap it */
    .carousel-logo-overlay {
        top: 10px;
        left: 12px;
        right: auto;
    }
    .carousel-logo-overlay img { width: 72px; }

    /* ── Register form: collapses below the carousel image ── */
    .carousel-register-form {
        /* Pull out of absolute, sit below carousel-wrapper */
        position: relative;
        top: auto;
        right: auto;
        transform: none;

        /* Full-width bar below the slides */
        width: 100%;
        max-width: 100%;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 4px 18px rgba(0, 0, 0, 0.14);
        padding: 14px 16px;

        /* 2-column wrap layout */
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: 8px;
    }

    .carousel-register-form h4 {
        width: 100%;
        font-size: 0.88rem;
        margin-bottom: 2px;
    }

    /* Profile-for select — full width on its own row */
    .carousel-register-form select:first-of-type {
        width: 100%;
        flex: 1 1 100%;
    }

    /* Name input and phone row share a row */
    .carousel-register-form input[type="text"] {
        flex: 1 1 calc(50% - 4px);
    }

    .carousel-register-form .phone-row {
        flex: 1 1 calc(50% - 4px);
    }

    /* Gender row — full width */
    .carousel-register-form .gender-row {
        width: 100%;
        flex: 1 1 100%;
    }

    /* Register button — full width */
    .carousel-register-form .btn-carousel-register {
        width: 100%;
        flex: 1 1 100%;
        font-size: 0.88rem;
        padding: 10px;
    }

    /* Terms note — full width */
    .carousel-register-form .terms-note {
        width: 100%;
        flex: 1 1 100%;
    }

    /* Profile + success grids */
    .profile-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 14px;
    }

    .success-stories-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .section-header h2 { font-size: 1.2rem; }

    .success-story-image img {
        width: 140px;
        height: 140px;
    }
}

/* ── 600px: large phone landscape ────────────────────────── */
@media (max-width: 600px) {
    .carousel-wrapper { height: 280px; }

    .carousel-caption    { bottom: 46px; }
    .carousel-caption h3 { font-size: 1.05rem; }
    .carousel-caption p  { font-size: 0.78rem; }

    /* Register form — tighter 2-col */
    .carousel-register-form {
        padding: 12px 12px 10px;
        gap: 7px;
    }

    .carousel-register-form input[type="text"],
    .carousel-register-form .phone-row {
        flex: 1 1 100%; /* stack vertically on small phones */
    }

    .carousel-logo-overlay img { width: 60px; }
}

/* ── 480px: phone portrait ───────────────────────────────── */
@media (max-width: 480px) {
    .carousel-wrapper { height: 230px; }

    .carousel-caption         { bottom: 40px; }
    .carousel-caption h3      { font-size: 0.95rem; }
    .carousel-caption p       { display: none; } /* hide description on tiny screens */

    .carousel-btn {
        width: 30px;
        height: 30px;
        font-size: 0.72rem;
    }

    /* Register form: single-column stacked */
    .carousel-register-form {
        flex-direction: column;
        padding: 12px;
        gap: 8px;
        border-radius: 0;
    }

    .carousel-register-form h4,
    .carousel-register-form select,
    .carousel-register-form input[type="text"],
    .carousel-register-form .phone-row,
    .carousel-register-form .gender-row,
    .carousel-register-form .btn-carousel-register,
    .carousel-register-form .terms-note {
        width: 100%;
        flex: 1 1 100%;
    }

    .carousel-register-form .phone-row select {
        width: 72px;
    }

    .carousel-indicators { bottom: 10px; padding: 4px 10px; gap: 5px; }
    .indicator { width: 6px; height: 6px; }
    .indicator.active { width: 16px; }

    .carousel-logo-overlay img { width: 52px; }

    /* Profile grid */
    .profile-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .profile-card-image  { height: 150px; }
    .success-stories-section { padding: 28px 0 36px; }
    .success-story-image { height: 180px; }
    .success-story-image img { width: 120px; height: 120px; }
}

/* ── 380px: very small phones ────────────────────────────── */
@media (max-width: 380px) {
    .carousel-wrapper { height: 200px; }

    .carousel-caption { display: none; } /* too cramped, hide entirely */

    .carousel-logo-overlay img { width: 44px; }

    .carousel-register-form { padding: 10px; gap: 6px; }

    .carousel-register-form h4             { font-size: 0.80rem; }
    .carousel-register-form select,
    .carousel-register-form input[type="text"],
    .carousel-register-form input[type="tel"] {
        font-size: 0.75rem;
        padding: 6px 8px;
    }

    .carousel-register-form .btn-carousel-register {
        font-size: 0.80rem;
        padding: 8px;
    }

    .profile-grid { grid-template-columns: 1fr; }
}

/* ── Respect reduced motion ──────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .card.success-story-card:hover .success-story-image::before,
    .card.success-story-card:hover .success-story-image::after,
    .card.success-story-card:focus-within .success-story-image::before,
    .card.success-story-card:focus-within .success-story-image::after {
        animation: none !important;
    }

    .success-story-image img           { transition: none !important; }
    .carousel-register-form .btn-carousel-register { animation: none !important; }
}