/* ============================================
   SEÑORITA W'S SPANISH TEACHING RESOURCES
   A whimsical yet professional design for educators
   ============================================ */

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&family=Work+Sans:wght@400;500;600;700;800&display=swap');

/* Custom Color Palette */
:root {
    /* Brand Colors - Updated to harmonize with logo & hero */
    --color-logo-green: #017745;     /* Logo green - professional, trustworthy */
    --color-hero-blue: #004aac;      /* Hero image blue - vibrant, energetic */
    --color-warm-sand: #f6c992;      /* Warm, inviting peachy tan */
    --color-dusty-rose: #d396a6;     /* Soft mauve accent */
    --color-forest-green: #01563a;   /* Darker green for depth */
    --color-sky-blue: #b3d9ff;       /* Light blue harmonizing with hero */
    
    /* Semantic Mappings */
    --primary: var(--color-logo-green);
    --secondary: var(--color-hero-blue);
    --accent: var(--color-warm-sand);
    --highlight: var(--color-dusty-rose);
    --dark: var(--color-forest-green);
    --light: var(--color-sky-blue);
    
    /* Neutrals */
    --surface: #fdfcfb;
    --text: #1a3d32;
    --text-muted: #5a6f68;
    
    /* Spacing & Effects */
    --border-radius-sm: 0.5rem;
    --border-radius: 1rem;
    --border-radius-lg: 1.5rem;
    --shadow-sm: 0 2px 8px rgba(1, 86, 58, 0.08);
    --shadow: 0 4px 20px rgba(1, 86, 58, 0.12);
    --shadow-lg: 0 8px 32px rgba(1, 86, 58, 0.16);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   GLOBAL STYLES
   ============================================ */

body {
    /* FONT OPTIONS - Uncomment one to use it! */
    
    /* Option 1: Inter - Very crisp, highly readable, popular choice */
    /* font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; */
    
    /* Option 2: Outfit - Modern geometric, sharp edges, playful yet professional */
    /* font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; */
    
    /* Option 3: DM Sans - Clean, crisp, excellent for body text */
    /* font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; */
    
    /* Option 4: Space Grotesk - Unique, angular, distinctive personality */
    /* font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; */
    
    /* Option 5: Manrope - Geometric sans-serif, crisp and modern */
    /* font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; */
    
    /* **** Option 6: Work Sans - Professional, sharp, great for educators */
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Option 7: System fonts only - Native, crisp, fast loading */
    /* font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; */
    
    /* HEADING FONT OPTIONS - Can be different from body font! */

    /* Option 1: Inherit body font (recommended for consistency) */
    /* font-family: inherit; */

    /* Option 2: Space Grotesk - Bold, angular, great for headings */

    /* Option 3: Outfit - Geometric, modern, strong presence */
    /* font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; */
    
    /* Option 4: Manrope - Clean geometric, pairs well with most body fonts */
    /* font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; */
    
    color: var(--text);
    background: linear-gradient(135deg, var(--surface) 0%, #ffffff 100%);
    line-height: 1.7;
}

/* Add subtle texture to body */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(172, 192, 211, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(246, 201, 146, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.3;
}

/* Add a subtle underline accent to headings */
.page-header h1::after,
h2::after {
    content: '';
    display: block;
    width: 4rem;
    height: 0.25rem;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    margin-top: 1rem;
    border-radius: 2px;
}

.page-header h1::after {
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   BOOTSTRAP OVERRIDES
   ============================================ */

/* Primary button with gradient and playful hover */
.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Secondary button with border */
.btn-outline-secondary {
    border: 2px solid var(--secondary);
    color: var(--secondary);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-outline-secondary:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Large buttons */
.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: var(--border-radius-lg);
}

/* Cards with organic feel */
.card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    background: white;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px) rotate(0.5deg);
    box-shadow: var(--shadow);
}

.card-img-top {
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: var(--dark);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* Badges with personality */
.badge {
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    letter-spacing: 0.02em;
}

.bg-success {
    background: var(--primary) !important;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.site-header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-weight: 700;
    color: var(--dark) !important;
    font-size: 1.5rem;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    color: var(--text) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0.25rem;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-link:hover {
    color: var(--primary) !important;
    background: rgba(1, 119, 69, 0.05);
}

/* Dropdown menus */
.dropdown-menu {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--border-radius-sm);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(1, 119, 69, 0.1), rgba(0, 74, 172, 0.1));
    color: var(--primary);
}

/* ============================================
   PAGE HEADER (HERO)
   ============================================ */

.page-header {
    background: linear-gradient(135deg, var(--light) 0%, white 50%, var(--accent) 100%);
    padding: 4rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 74, 172, 0.08) 0%, transparent 70%);
    transform: rotate(-15deg);
}

.page-header h1 {
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 1.5rem auto;
}

/* ============================================
   STATS STRIP
   ============================================ */

.stats-strip {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    margin: 2rem 0;
}

.stat-card {
    text-align: center;
    padding: 1rem;
    position: relative;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 3rem;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--highlight));
    border-radius: 2px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   TEACHER BIO
   ============================================ */

.teacher-bio {
    background: linear-gradient(135deg, white, var(--surface));
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.teacher-bio:hover {
    box-shadow: var(--shadow);
    transform: translateX(4px);
}

.teacher-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.teacher-photo:hover {
    transform: rotate(5deg) scale(1.05);
    border-color: var(--primary);
}

.teacher-bio h3 {
    color: var(--dark);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.teacher-bio h3::after {
    display: none;
}

/* ============================================
   PRODUCT CARDS
   ============================================ */

.product-summary {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.example-product-image,
.product-image {
    position: relative;
    max-width: 340px;
    margin: 1.5rem auto;
    padding: 0.75rem;
    background: white;
    border: 1px solid rgba(1, 86, 58, 0.1);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transform: rotate(-2deg);
    transition: var(--transition);
}

.product-summary:hover .example-product-image,
.product-summary:hover .product-image {
    transform: rotate(0deg) translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.example-product-image::after,
.product-image::after {
    content: "";
    position: absolute;
    inset: 0.75rem;
    border-radius: calc(var(--border-radius) - 0.25rem);
    box-shadow: inset 0 0 0 1px rgba(1, 86, 58, 0.04);
    pointer-events: none;
}

.example-product-image img,
.product-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: calc(var(--border-radius) - 0.25rem);
}

.product-title {
    color: var(--dark);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.product-excerpt {
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 1rem;
}

.price {
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
}

/* ============================================
   INSTAGRAM FEED
   ============================================ */

.instagram-gallery,
.instagram-feed {
    background: linear-gradient(135deg, var(--surface), white);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin: 2rem 0;
}

.instagram-gallery h2,
.instagram-feed h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.instagram-item,
.instagram-post {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.instagram-item:hover,
.instagram-post:hover {
    transform: scale(1.05) rotate(-1deg);
    box-shadow: var(--shadow);
}

.instagram-item img,
.instagram-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.instagram-item:hover img,
.instagram-post:hover img {
    transform: scale(1.1);
}

/* Instagram follow button */
.instagram-follow-btn {
    background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
    color: white;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.instagram-follow-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent), var(--highlight));
}

.site-footer h5 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.site-footer a:hover {
    color: var(--accent);
}

.footer-social a {
    display: inline-block;
    width: 2.5rem;
    height: 2.5rem;
    line-height: 2.5rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin: 0 0.25rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px) rotate(5deg);
    padding-left: 0;
}

/* ============================================
   ANNOUNCEMENT BAR
   ============================================ */

.announcement-bar {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.75rem 0;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
}

.announcement-bar a {
    color: var(--accent);
    text-decoration: underline;
    font-weight: 600;
}

.announcement-bar .btn-close {
    filter: invert(1);
    opacity: 0.7;
}

.announcement-bar .btn-close:hover {
    opacity: 1;
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-card {
    border: none;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.contact-card .card-body {
    padding: 2rem;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    margin: 0 auto;
}

.contact-card h3 {
    color: var(--dark);
    font-weight: 700;
}

.contact-card p {
    color: var(--text);
    line-height: 1.6;
}

.faq-box {
    background: linear-gradient(135deg, rgba(1, 119, 69, 0.03), rgba(179, 217, 255, 0.03));
    border-left: 4px solid var(--primary);
    border-radius: var(--border-radius);
}

.faq-box h3 {
    color: var(--dark);
    font-weight: 700;
}

.faq-box h4 {
    color: var(--primary);
    font-weight: 600;
}

.faq-box .small {
    color: var(--text);
    line-height: 1.5;
}

/* ============================================
   ABOUT PAGE
   ============================================ */

.about-photo-container {
    position: relative;
}

.about-photo-container img {
    border: 6px solid white;
    box-shadow: var(--shadow-lg);
}

.about-stat-card {
    background: linear-gradient(135deg, rgba(1, 119, 69, 0.05), rgba(179, 217, 255, 0.05));
    border-radius: var(--border-radius);
    border-left: 3px solid var(--primary);
    transition: var(--transition);
}

.about-stat-card:hover {
    transform: translateY(-4px);
    border-left-color: var(--secondary);
    box-shadow: var(--shadow);
}

.about-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.about-stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-section-box {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.about-section-box h3 {
    color: var(--dark);
    font-weight: 700;
}

.about-section-box ul {
    padding-left: 1.5rem;
}

.about-section-box li {
    margin-bottom: 0.75rem;
    color: var(--text);
    line-height: 1.6;
}

.about-section-box strong {
    color: var(--primary);
}

.about-philosophy {
    background: linear-gradient(135deg, rgba(1, 119, 69, 0.08), rgba(0, 74, 172, 0.08));
    border-radius: var(--border-radius-lg);
    border: 2px solid rgba(1, 119, 69, 0.2);
}

.about-philosophy h3 {
    color: var(--dark);
    font-weight: 700;
}

.about-philosophy .lead {
    color: var(--primary);
    font-weight: 600;
}

.about-personal {
    background: linear-gradient(135deg, rgba(246, 201, 146, 0.1), rgba(211, 150, 166, 0.1));
    border-radius: var(--border-radius-lg);
    border-left: 4px solid var(--accent);
}

.about-personal h3 {
    color: var(--dark);
    font-weight: 700;
}

.about-personal strong {
    color: var(--primary);
}

/* ============================================
   INSTAGRAM WIDGET (Elfsight / Embedded) STYLING
   ============================================ */

/* Container wrapping the Elfsight widget used on the homepage */
.instagram-widget {
    background: linear-gradient(180deg, rgba(179,217,255,0.06), rgba(1,119,69,0.03));
    border-radius: calc(var(--border-radius) * 1.2);
    padding: 0.75rem;
    box-shadow: 0 6px 24px rgba(1,86,58,0.08);
    border: 1px solid rgba(179,217,255,0.06);
    display: block;
    overflow: hidden;
    text-align: center;
}

/* Make the embedded Elfsight app visually framed and compact */
.instagram-widget .elfsight-app-1855f9a6-388c-4b40-a396-c17b8df89386,
.instagram-widget .elfsight-app,
.instagram-widget iframe {
    width: 100% !important;
    height: auto !important;
    min-height: 220px;
    max-height: 420px;
    border-radius: calc(var(--border-radius) - 0.25rem);
    box-shadow: none !important;
    border: none !important;
    display: block;
    margin: 0 auto !important;
}

/* Reduce whitespace inside common Elfsight wrappers */
.instagram-widget .elfsight-app-1855f9a6-388c-4b40-a396-c17b8df89386 > div,
.instagram-widget .elfsight-app > div {
    padding: 0 !important;
    margin: 0 !important;
}

/* Small caption/label above widget to call attention */
.instagram-widget-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Subtle hover lift to indicate interactivity */
.instagram-widget:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 34px rgba(1,86,58,0.14);
    transition: var(--transition);
}

@media (max-width: 768px) {
    .instagram-widget { padding: 0.5rem; }
    .instagram-widget .elfsight-app-1855f9a6-388c-4b40-a396-c17b8df89386,
    .instagram-widget iframe { min-height: 180px; max-height: 320px; }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Section spacing */
.section-spacing {
    padding: 4rem 0;
}

/* Decorative divider */
.decorative-divider {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), var(--accent), transparent);
    margin: 3rem 0;
    border-radius: 2px;
}

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Highlight box */
.highlight-box {
    background: linear-gradient(135deg, rgba(1, 119, 69, 0.05), rgba(246, 201, 146, 0.05));
    border-left: 4px solid var(--primary);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .page-header {
        padding: 3rem 0 2rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .teacher-photo {
        width: 120px;
        height: 120px;
    }
    
    .stats-strip {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
}

/* ============================================
   ANIMATIONS & INTERACTIONS
   ============================================ */

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes subtle-rotate {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

/* Add floating animation to certain elements */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    border-radius: var(--border-radius-sm);
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}


/* --------------------------------------------
   Compact Kit newsletter form
   -------------------------------------------- */

.footer-newsletter-form {
    max-width: 600px;
    margin-left: auto;
    margin-right: 0;
}

/* Form container - ensure horizontal layout and right alignment */
.footer-newsletter-form .formkit-form {
    font-size: 0.475rem !important;
    max-width: 600px !important;
    margin-left: auto !important;
}

/* Fields container - force horizontal, prevent stretching */
.footer-newsletter-form .formkit-fields {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    gap: 0.5rem !important;
    margin: 0 !important;
}

/* Individual field containers - set max widths */
.footer-newsletter-form .formkit-field {
    flex: 0 1 auto !important;
    max-width: 180px !important;
    margin: 0 !important;
}

/* Input fields */
.footer-newsletter-form .formkit-input {
    padding: 0.5rem 0.75rem !important;
    font-size: 0.875rem !important;
    line-height: 0.8 !important;
    width: 100% !important;
}

/* Placeholder text */
.footer-newsletter-form .formkit-input::placeholder {
    font-size: 0.875rem !important;
    opacity: 0.6 !important;
}

/* Subscribe button container */
.footer-newsletter-form .formkit-submit { 
    flex: 0 1 auto !important;
    max-width: 120px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0.875rem !important;
} 

/* Button inner span */
.footer-newsletter-form .formkit-submit > span { 
    padding: 0.3rem 1rem !important;
} 

/* "Built with Kit" - align right */
.footer-newsletter-form .formkit-powered-by-convertkit-container {
    font-size: 0.6875rem !important;
    margin-top: 0.5rem !important;
    justify-content: flex-end !important;
}

/* Responsive: stack on small screens */
@media (max-width: 767px) {
    .footer-newsletter-form {
        max-width: 100%;
    }
    
    .footer-newsletter-form .formkit-form {
        max-width: 100% !important;
    }
    
    .footer-newsletter-form .formkit-fields {
        flex-wrap: wrap !important;
        justify-content: stretch !important;
    }
    
    .footer-newsletter-form .formkit-field {
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }
    
    .footer-newsletter-form .formkit-submit {
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }
}

/* ============================================
   LOGIC PUZZLE STYLES
   ============================================ */

/* Puzzle Container */
.puzzle-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Puzzle Header */
.puzzle-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.puzzle-description {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.puzzle-meta {
  font-size: 0.95rem;
  color: var(--text-secondary, #6c757d);
}

.timer-display {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hint-counter {
  font-weight: 500;
}

/* Puzzle Controls */
.puzzle-controls .btn {
  min-width: 140px;
}

/* Puzzle Grid Wrapper */
.puzzle-grid-wrapper {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0;
}

/* On larger screens show clues and grid side-by-side; limit clues height and allow scrolling */
@media (min-width: 992px) {
    .puzzle-clues.card {
        max-height: calc(100vh - 180px);
        overflow: visible;
    }

    .puzzle-clues .card-body {
        max-height: calc(100vh - 260px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-right: 0.5rem;
    }
}

/* Puzzle Grid - CSS Grid Layout */
.puzzle-grid {
  display: grid;
  grid-template-columns: auto repeat(var(--grid-size), 1fr);
  grid-template-rows: auto repeat(var(--grid-size), 1fr);
  gap: 0;
  margin: 0 auto;
  max-width: min-content;
  border: 2px solid var(--border-color, #dee2e6);
  border-radius: var(--border-radius, 0.5rem);
  overflow: hidden;
  background: var(--surface, #fff);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Grid Cells - Base */
.grid-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  min-width: 80px;
  min-height: 60px;
  border: 1px solid var(--border-color, #dee2e6);
  background: var(--surface, #fff);
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.2;
}

/* Corner Cell (top-left, empty) */
.corner-cell {
  background: var(--background-secondary, #f8f9fa);
  border: none;
}

/* Header Cells */
.header-cell {
  font-weight: 600;
  background: var(--background-secondary, #f8f9fa);
  color: var(--text, #212529);
}

.option-header {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  min-height: 120px;
  font-size: 0.85rem;
}

.subject-header {
  text-align: right;
  padding-right: 1rem;
  font-size: 0.9rem;
}

/* Interactive Cells */
.interactive-cell {
  cursor: pointer;
  background: var(--surface, #fff);
  border: 1px solid var(--border-color, #dee2e6);
  transition: background-color 0.15s ease, transform 0.1s ease;
  position: relative;
  font-size: 1.5rem;
  color: var(--text, #212529);
}

.interactive-cell:hover {
  background: var(--background-hover, #f8f9fa);
  transform: scale(1.05);
}

.interactive-cell:focus-visible {
  outline: 3px solid var(--focus-ring, #0d6efd);
  outline-offset: -3px;
  z-index: 10;
}

.interactive-cell:active {
  transform: scale(0.95);
}

/* Cell States */
.interactive-cell[data-state="empty"] .cell-content {
  display: none;
}

.interactive-cell[data-state="no"] .cell-content {
  color: #dc3545;
  font-weight: 700;
}

.interactive-cell[data-state="no"] .cell-content::before {
  content: "✕";
}

.interactive-cell[data-state="yes"] .cell-content {
  color: #198754;
  font-weight: 700;
}

.interactive-cell[data-state="yes"] .cell-content::before {
  content: "✓";
}

/* Hint Animation */
@keyframes hintGlow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(102, 16, 242, 0);
    background: var(--surface, #fff);
  }
  50% {
    box-shadow: 0 0 20px 5px rgba(102, 16, 242, 0.5);
    background: rgba(102, 16, 242, 0.1);
  }
}

.interactive-cell.hint-highlight {
  animation: hintGlow 2s ease-in-out;
}

/* Disabled State (after showing solution) */
.interactive-cell:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.interactive-cell:disabled:hover {
  transform: none;
  background: var(--surface, #fff);
}

/* Clues Section */
.puzzle-clues {
  background: var(--surface, #fff);
  border: 1px solid var(--border-color, #dee2e6);
}

.puzzle-clues .card-header {
  background: var(--background-secondary, #f8f9fa);
  border-bottom: 1px solid var(--border-color, #dee2e6);
  padding: 1rem 1.25rem;
}

.clues-list {
  margin: 0;
  padding-left: 1.5rem;
  line-height: 1.8;
}

.clues-list li {
  margin-bottom: 0.5rem;
}

/* Success Modal */
.success-icon {
  animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.confetti-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .puzzle-title {
    font-size: 1.5rem;
  }
  
  .grid-cell {
    min-width: 60px;
    min-height: 50px;
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  .option-header {
    min-height: 100px;
    font-size: 0.75rem;
  }
  
  .interactive-cell {
    font-size: 1.2rem;
  }
  
  .puzzle-controls .btn {
    min-width: auto;
    font-size: 0.85rem;
    padding: 0.375rem 0.75rem;
  }
}

/* Print Styles */
@media print {
  /* Hide interactive controls */
  .puzzle-controls,
  .puzzle-meta,
  .modal,
  .btn-close {
    display: none !important;
  }
  
  /* Adjust layout for print */
  .puzzle-container {
    padding: 0;
  }
  
  .puzzle-grid-wrapper {
    overflow: visible;
    padding: 0;
  }
  
  .puzzle-grid {
    box-shadow: none;
    page-break-inside: avoid;
  }
  
  /* Ensure cells print clearly */
  .interactive-cell {
    border: 1px solid #000;
    background: #fff !important;
  }
  
  .header-cell {
    background: #f0f0f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  /* Show current state of cells */
  .interactive-cell[data-state="no"] .cell-content::before,
  .interactive-cell[data-state="yes"] .cell-content::before {
    color: #000;
  }
  
  /* Clues section */
  .puzzle-clues {
    page-break-inside: avoid;
    margin-top: 2rem;
    border: 1px solid #000;
  }
  
  .puzzle-clues .card-header {
    background: #f0f0f0 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  /* Add page title */
  .puzzle-title {
    color: #000;
  }
}