/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.5; 
    color: #333;
    background-color: #f8f9fa;
    width: 100%;
    overflow-x: hidden;
    font-size: 16px; 
}

.app-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Header Styles */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    padding: 10px 30px; 
    border-bottom: 1px solid #eaeaea;
    background: white;
    width: 100%;
    /* Sticky Header */
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 70px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-left {
    text-align: left;
    flex: 1; 
    min-width: 0;
}

.header-right { 
    margin: 0; 
    padding: 0; 
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

/* NAVIGATION FIXED CENTER */
.main-nav {
    display: flex;
    gap: 20px;
    flex: 0 0 auto; 
    margin: 0 20px;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 12px;
    border-radius: 4px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

/* Style for the Special Sister Site Link */
.nav-link.special-link {
    color: #FF6B35; /* Orange to stand out */
}

.nav-link.special-link:hover {
    background: rgba(255, 107, 53, 0.1);
    color: #e65100;
}

.main-title {
    font-size: 1.8rem; 
    font-weight: 700;
    margin-bottom: 2px;
    line-height: 1;
    position: relative;
    height: 35px; 
    overflow: hidden;
    letter-spacing: -0.5px;
}

.title-part {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    transform: translateY(0);
}

.learn-win {
    color: #FF6B35;
    animation: learnWinSequence 4s ease-in-out forwards;
}

.flashlearn {
    animation: flashlearnSequence 4s ease-in-out forwards;
}

.flash-text { color: #2C3E50; }
.win-text { color: #FF6B35; }

@keyframes learnWinSequence {
    0% { opacity: 1; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(0); }
    65% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 0; transform: translateY(-20px); }
}

@keyframes flashlearnSequence {
    0% { opacity: 0; transform: translateY(20px); }
    65% { opacity: 0; transform: translateY(20px); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 1; transform: translateY(0); }
}

.main-title.final-state .learn-win { display: none; }
.main-title.final-state .flashlearn {
    animation: none;
    opacity: 1;
    position: static;
    transform: none;
}
.main-title.final-state { height: auto; overflow: visible; }

.main-subtitle {
    font-size: 0.95rem;
    color: #7f8c8d;
    line-height: 1.2;
}

.header-logo {
    max-height: 50px; 
    width: auto;
    display: block;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 25px 30px; 
    text-align: center;
    width: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 100%; 
    width: 100%;
}

.hero-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    font-weight: 600;
    color: white;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.hero-description {
    font-size: 1rem;
    margin-bottom: 20px;
    color: #ecf0f1;
    line-height: 1.4;
}

/* Hero Summary */
.hero-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 10px;
}

.summary-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 5px;
    flex: 1;
    transition: background 0.3s ease;
}

.summary-item:hover { background: rgba(255, 255, 255, 0.05); }

.summary-icon {
    font-size: 1.4rem;
    color: #FF6B35;
}

.summary-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.summary-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #FF6B35;
    line-height: 1.1;
}

.summary-label {
    font-size: 0.8rem;
    color: #bdc3c7;
    font-weight: 500;
}

/* Search Bar Styles */
.search-container {
    max-width: 500px;
    margin: 0 auto 30px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 15px;
    color: #95a5a6;
    font-size: 1rem;
}

.search-input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 30px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
    background: white;
}

.search-input:focus {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    border-color: #3498db;
}

#search-message {
    background: #fff3cd;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ffeeba;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}

/* Global Section Styles */
.section-title {
    font-size: 1.8rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 1rem;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.featured-section,
.how-it-works-section,
.coming-soon-section,
.testimonials-section,
.other-products-section {
    padding: 30px 30px; 
    width: 100%;
}

.how-it-works-section { background: #f8f9fa; }
.testimonials-section { background: #ecf0f1; }
.other-products-section { background: #34495e; color: white; }

.other-products-section .section-title,
.other-products-section .section-subtitle { color: white; }
.other-products-section .section-subtitle { color: #bdc3c7; }

/* ==============================================
   Subject Cards with DYNAMIC Color Variables
   ============================================== */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 25px;
    max-width: 100%; 
    margin: 0 auto;
}

.subjects-grid.search-active {
    min-height: 200px;
}

.subject-card {
    /* DEFAULT COLOR (Fallback) */
    --dynamic-color: #3498db;
    
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #eaeaea;
}

.subject-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Border uses the dynamic color */
.subject-card.featured { 
    border-top: 3px solid var(--dynamic-color); 
}

/* Icon uses the dynamic color */
.subject-icon {
    background: var(--dynamic-color);
    color: white;
    padding: 15px;
    text-align: center;
    font-size: 1.8rem;
    transition: background-color 0.3s ease;
}

.subject-content {
    padding: 15px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.subject-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.subject-description {
    color: #7f8c8d;
    margin-bottom: 15px;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.subject-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.subject-stat {
    font-size: 0.85rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Button uses the dynamic color */
.subject-button {
    display: block;
    background: var(--dynamic-color);
    color: white;
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
}

/* Button Hover uses Brightness Filter to darken any dynamic color automatically */
.subject-button:hover { 
    background-color: var(--dynamic-color);
    filter: brightness(0.85);
}

.coming-soon-badge {
    background: #e74c3c;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    align-self: flex-start;
    margin-top: 5px;
}

/* Other Products */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
}

.product-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-card:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.15);
}

.product-icon {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 10px;
}

.product-title {
    font-size: 1.15rem;
    color: white;
    margin-bottom: 8px;
    font-weight: 600;
}

.product-description {
    color: #ecf0f1; 
    margin-bottom: 15px;
    line-height: 1.4;
    font-size: 0.9rem;
}

.product-button {
    display: inline-block;
    background: #FF6B35; 
    color: white;         
    padding: 8px 16px;
    font-size: 0.9rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.product-button:hover {
    background: white;
    color: #FF6B35;
}

/* How It Works */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
}

.step-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
}

.step-number {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    margin: 0 auto 10px;
}

.step-icon {
    font-size: 1.8rem;
    color: #3498db;
    margin-bottom: 15px;
}

.step-title {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 8px;
}

.step-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
}

.testimonial-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #eaeaea;
}

.testimonial-card:before {
    font-size: 3rem;
    top: 5px;
    left: 15px;
}

.testimonial-content {
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.author-name { font-size: 0.95rem; }
.author-title { font-size: 0.85rem; }

/* Footer */
footer {
    background: #1a252f;
    color: white;
    padding: 40px 30px 20px;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.footer-section h3 { font-size: 1.4rem; margin-bottom: 10px; }
.footer-section h4 { font-size: 1.1rem; margin-bottom: 10px; }
.footer-section p { font-size: 0.9rem; color: #ecf0f1; }

.footer-section ul li a { 
    font-size: 0.9rem; 
    color: #ffffff; 
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #FF6B35;
}

.footer-section ul li a:visited {
    color: #ffffff;
}

.footer-bottom {
    padding-top: 20px;
    font-size: 0.85rem;
    color: #bdc3c7;
    text-align: center; 
}

/* Heart Icon with Beat Animation */
.heart {
    color: #e74c3c; /* Red color for the heart */
    margin: 0 5px;
}

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite both;
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    5% {
        transform: scale(1.1);
    }
    10% {
        transform: scale(1);
    }
    15% {
        transform: scale(1.1);
    }
    20% {
        transform: scale(1);
    }
    100% {
        transform: scale(1);
    }
}

/* Animation */
.animate-in { animation: fadeInUp 0.6s ease-out forwards; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile Adjustments (UNCHANGED AS REQUESTED) */
@media (max-width: 768px) {
    .content-header { padding: 10px 15px; height: auto; flex-direction: column; }
    
    .header-left { text-align: center; width: 100%; order: 2; flex: none; }
    .main-title { font-size: 1.6rem; height: auto; margin-top: 5px; }
    
    /* Hide Nav on Mobile */
    .main-nav { display: none; }
    .header-right { display: none; }
    
    /* HIDE HERO SECTION (INCL SUMMARY) ON MOBILE */
    .hero-section {
        display: none; 
    }
    
    .subjects-grid, .products-grid, .steps-grid, .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-title { font-size: 1.5rem; }
    
    .featured-section, .how-it-works-section, .other-products-section, footer {
        padding: 30px 15px; 
    }
}

@media (max-width: 480px) {
    .main-title { font-size: 1.4rem; }
    .hero-title { font-size: 1.3rem; }
    .summary-item { flex: 1 1 100%; } 
}