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

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

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

/* Header Styles - Edge Aligned */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 30px;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 0;
    background: white;
    width: 100%;
    position: relative;
}

.header-left {
    text-align: left;
    margin: 0;
    padding: 0;
}

/* Simplified Animated Header Title */
.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.1;
    position: relative;
    height: 60px;
    overflow: hidden;
}

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

.learn-win {
    color: #FF6B35; /* Orange color from logo */
    animation: learnWinSequence 4s ease-in-out forwards;
}

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

/* Individual text colors for FlashLearn.Win */
.flash-text {
    color: #2C3E50; /* Dark blue for "Flash" */
}

.learn-text {
    color: #2C3E50; /* Dark blue for "Learn" */
}

.win-text {
    color: #FF6B35; /* Orange for ".Win" */
}

@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);
    }
}

/* Final static state - Only FlashLearn.Win remains */
.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: 1.1rem;
    color: #7f8c8d;
    line-height: 1.3;
}

.header-right {
    margin: 0;
    padding: 0;
}

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

/* Hero Section - Clean Design */
.hero-section {
    background: #2c3e50;
    color: white;
    padding: 40px 5%;
    margin-bottom: 0;
    text-align: center;
    width: 100%;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hero-title {
    font-size: 2rem;
    margin-bottom: 15px;
    font-weight: 600;
    color: white;
    line-height: 1.3;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: #ecf0f1;
    line-height: 1.5;
    white-space: nowrap;
    overflow: visible;
    text-overflow: unset;
    max-width: none;
}

/* Updated Hero Stats with Tiles */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.hero-stat-tile {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.hero-stat-tile:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.5);
}

.hero-stat-tile::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #3498db, #2980b9, #3498db);
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hero-stat-tile:hover::before {
    opacity: 0.6;
}

.stat-icon {
    font-size: 1.8rem;
    color: #3498db;
    margin-bottom: 10px;
    opacity: 0.9;
}

.hero-stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #3498db;
}

.hero-stat-label {
    font-size: 0.95rem;
    color: #bdc3c7;
    font-weight: 500;
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.featured-section,
.how-it-works-section,
.coming-soon-section,
.testimonials-section,
.other-products-section {
    margin-bottom: 0;
    padding: 60px 5%;
    width: 100%;
}

/* Alternate background colors for sections */
.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 */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.subject-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid #eaeaea;
}

.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.subject-card.featured {
    border-top: 4px solid #3498db;
}

.subject-icon {
    background: #3498db;
    color: white;
    padding: 25px;
    text-align: center;
    font-size: 2.5rem;
}

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

.subject-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

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

.subject-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

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

.subject-button {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.subject-button:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

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

/* Other Products Section */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

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

.product-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

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

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

.product-description {
    color: #bdc3c7;
    margin-bottom: 18px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.product-button {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #3498db;
    font-size: 0.95rem;
}

.product-button:hover {
    background: transparent;
    color: #3498db;
    transform: translateY(-2px);
}

/* How It Works Section */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.step-card {
    background: white;
    border-radius: 12px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #eaeaea;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.step-number {
    display: inline-block;
    background: #3498db;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 auto 15px;
}

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

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

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

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.testimonial-card {
    background: white;
    border-radius: 12px;
    padding: 30px 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    position: relative;
    transition: transform 0.3s ease;
    border: 1px solid #eaeaea;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-card:before {
    content: """;
    font-size: 5rem;
    color: #3498db;
    opacity: 0.1;
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial-content {
    margin-bottom: 20px;
    font-style: italic;
    color: #555;
    position: relative;
    z-index: 1;
    font-size: 1rem;
    line-height: 1.6;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    color: #2c3e50;
    font-size: 1rem;
}

.author-title {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Footer */
footer {
    background: #1a252f;
    color: white;
    padding: 50px 5% 25px;
    margin-top: 0;
    width: 100%;
}

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

.footer-section h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #ecf0f1;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #ecf0f1;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
    font-size: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

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

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

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
    font-size: 1rem;
}

.heart {
    color: #e74c3c;
}

/* Animation for scroll-triggered elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Mobile-Specific Header Layout */
@media (max-width: 768px) {
    .content-header {
        flex-direction: column;
        text-align: center;
        padding: 15px 20px;
        align-items: center;
    }
    
    .header-left {
        margin-bottom: 0;
        text-align: center;
        order: 2; /* Move to bottom */
        width: 100%;
    }
    
    .main-title {
        height: 50px;
        font-size: 2rem;
        display: block; /* Show on mobile */
    }
    
    .main-subtitle {
        font-size: 1rem;
        margin-top: 10px;
        color: #7f8c8d;
    }
    
    .header-right {
        text-align: center;
        order: 1; /* Move to top */
        margin-bottom: 10px;
    }
    
    .header-logo {
        max-height: 60px;
        margin: 0 auto;
    }
    
    .hero-section {
        padding: 30px 5%;
        min-height: auto;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-description {
        font-size: 1rem;
        white-space: normal;
        line-height: 1.5;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .hero-stat-tile {
        padding: 20px 10px;
    }
    
    .stat-icon {
        font-size: 1.5rem;
    }
    
    .hero-stat-number {
        font-size: 1.8rem;
    }
    
    .hero-stat-label {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-subtitle {
        font-size: 1.1rem;
    }
    
    .featured-section,
    .how-it-works-section,
    .coming-soon-section,
    .testimonials-section,
    .other-products-section {
        padding: 40px 5%;
    }
    
    .subjects-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Desktop Layout - Ensure normal display */
@media (min-width: 769px) {
    .content-header {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .header-left {
        order: 1;
        text-align: left;
    }
    
    .main-title {
        display: block; /* Show "FlashLearn.Win" on desktop */
    }
    
    .header-right {
        order: 2;
        text-align: right;
    }
}

@media (max-width: 480px) {
    .content-header {
        padding: 10px 15px;
    }
    
    .main-title {
        height: 45px;
        font-size: 1.8rem;
    }
    
    .main-subtitle {
        font-size: 0.95rem;
    }
    
    .header-logo {
        max-height: 50px;
    }
    
    .hero-section {
        padding: 25px 5%;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .hero-stat-number {
        font-size: 1.6rem;
    }
    
    .hero-stat-label {
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .featured-section,
    .how-it-works-section,
    .coming-soon-section,
    .testimonials-section,
    .other-products-section {
        padding: 30px 5%;
    }
    
    .subject-content,
    .step-card,
    .testimonial-card,
    .product-card {
        padding: 20px 15px;
    }
    
    .subject-icon {
        padding: 20px;
        font-size: 2rem;
    }
    
    .step-icon,
    .product-icon {
        font-size: 2rem;
    }
    
    footer {
        padding: 30px 5% 20px;
    }
}