/* css/index.css */

/* Hero Section */
.hero-section {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
}

/* Mobile Layout: Flex column with custom order */
.hero-section .hero-section-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-text-column {
    display: contents; /* This makes its children direct flex items of the grid on mobile */
}

.hero-section .text-content {
    order: 1; /* Title and text appear first */
    text-align: center;
}

.hero-section .image-content {
    order: 2; /* Image appears second */
    padding-top: 20px;
}

.hero-section .hero-cta-container {
    order: 3; /* Button and rating appear last */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-section .text-content p.subtitle {
    font-size: 1rem;
    color: #374151; 
    margin-bottom: 0;
}
.hero-section .text-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-top: 0; 
    margin-bottom: 0rem;
    padding-top: 0.3rem;
}
.hero-section .text-content p.description {
    color: #4B5563;
    font-size: 1rem;
    margin-bottom: 0; /* Margin is now handled by the gap in the grid */
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}
.hero-section .btn-primary {
    font-weight: 700;
}
.hero-section .rating-container {
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-section .stars-wrapper {
    display: flex;
    margin-right: 0.5rem;
    gap: 0.25rem;
}
.hero-section .rating-text {
    color: #4B5563;
    font-size: 0.875rem;
}
.hero-section .image-content img {
    width: 100%;
    max-width: 36rem;
    height: auto;
    border-radius: 0.5rem;
}

/* Statistics Section */
.stats-section {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
}
.stats-section .content-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    text-align: center;
    gap: 1rem;
    flex-direction: row;
    align-content: flex-start;
    justify-content: space-around;
}

.stats-section .stat-item h3 {
    font-size: 2rem; /* MODIFIED: was 2.25rem */
    font-weight: 700;
    color: #ad5207;
    margin: 0;
}

.stats-section .stat-item p {
    color: #374151;
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* What Do We Teach Section */
.what-we-teach-section {
    background-color: #ad5207; /* This is the dark brand color background */
    text-align: center;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    margin-bottom: 3rem; /* Spacing from global.css for section */
    padding-top: 3rem; 
    padding-bottom: 4rem;
}
.what-we-teach-section h2,
.about-us-section-home h2,
.what-makes-us-different-section h2 {
    font-size: 2rem; /* MODIFIED: was 2rem-2.5rem */
}
/* MODIFIED: Increased h2 size for specific sections on mobile */
.what-we-teach-section h2,
.about-us-section-home h2 {
    font-size: 2.5rem;
}
.what-we-teach-section h2 {
    font-weight: 700;
    color: white !important;
    margin-bottom: 1.5rem;
}
.what-we-teach-section p.intro-text {
    color: white !important;
    font-size: 1.125rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
}


/* --- IMPROVED TEACH CARD STYLES --- */
.what-we-teach-section .grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* This ensures all items, including the last one, are centered */
    gap: 2rem;
}

.what-we-teach-section .teach-card {
    background-color: #FFFFFF; /* Solid white background */
    border-radius: 2rem; /* Increased rounding */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Softer shadow */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1 1 300px;
    max-width: 340px; /* Control max width */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #f0f0f0;
}

.what-we-teach-section .teach-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* This new wrapper will hold the image and provide padding */
.what-we-teach-section .teach-card-image-wrapper {
    padding: 1rem; /* Inward padding for the image */
    background-color: #FFFFFF; /* White background for the image area */
    border-radius: 1rem; /* Increased rounding */
    margin: 0rem;
}

.what-we-teach-section .teach-card img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 1rem; /* Rounded corners for the image itself */
}

.what-we-teach-section .teach-card-content {
    padding: 0 1.5rem 1.5rem; /* Adjusted padding */
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.what-we-teach-section .teach-card h3 {
    color: #ad5207;
    font-weight: 700;
    font-size: 1.5rem; /* Increased size */
    margin-top: 0;
    margin-bottom: 0rem; /* Reduced padding */
}

.what-we-teach-section .teach-card p {
    color: #374151;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.what-we-teach-section button.view-more-button {
    margin-top: 3rem;
    background-color: white;
    color: #ad5207;
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    transition-property: background-color, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
    border: none;
    cursor: pointer;
}
.what-we-teach-section button.view-more-button:hover {
    background-color: #F3F4F6;
    transform: scale(1.05);
}
/* --- END OF IMPROVED STYLES --- */


/* About Us Section on Home Page */
.about-us-section-home {
    padding-top: 2rem;
    padding-bottom: 2rem;
}
.about-us-section-home .content-container {
}
.about-us-section-home .about-us-section-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
.about-us-section-home .text-content {
    text-align: center;
}
.about-us-section-home .text-content h2 {
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}
.about-us-section-home .text-content p.description {
    color: #4B5563; /* text-gray-600 */
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}
.about-us-section-home .text-content button.btn-primary {
    /* MODIFIED: Increased button size and adjusted margin */
    padding: 1rem 2.5rem;
    margin-bottom: 0rem;
}
.about-us-section-home .text-content .rating-container {
    display: flex;
    align-items: center;
    justify-content: center;
    /* MODIFIED: Removed top margin */
    margin-top: 0rem;
}
.about-us-section-home .text-content .stars-wrapper {
    display: flex;
    margin-right: 0.5rem;
    gap: 0.25rem;
}
.about-us-section-home .text-content .rating-text {
    color: #4B5563; /* text-gray-600 */
    font-size: 0.875rem;
}
.about-us-section-home .image-testimonial-section {
    display: flex;
    justify-content: center;
}
.about-us-section-home .image-testimonial-section img.main-image {
    width: 100%;
    max-width: 36rem;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 0.5rem;
}

/* What Makes Us Different Section */
.what-makes-us-different-section {
    padding-top: 4rem;
    padding-bottom: 2rem;
}
.what-makes-us-different-section .content-container {
    text-align: center;
}
.what-makes-us-different-section h2 {
    font-weight: 700;
    margin-bottom: 1.5rem;
}
.what-makes-us-different-section p.intro-text {
    color: #4B5563; /* text-gray-600 */
    font-size: 1rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
}

.what-makes-us-different-section .grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.what-makes-us-different-section .feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.what-makes-us-different-section .feature-card svg {
    width: 6rem;
    height: 6rem;
    margin-bottom: 1rem;
    stroke: #ad5207;
}
.what-makes-us-different-section .feature-card h3 {
    font-size: 1.1rem;
    font-weight: 500;
}

/* CSS Sprites - Common Styles */
.sprite-icon {
    background-image: url('../../assets/images/homepage/css_sprites.webp');
    background-repeat: no-repeat;
}

/* Feature Icons in "What makes us different" section */
.feature-icon {
    width: 96px;
    height: 96px;
    /* FIXED: Changed the bottom margin to reduce the gap */
    margin-bottom: 0rem;
    background-size: 288px 288px;
}

/* Positions for each feature icon (re-scaled for 96px size) */
.icon-one-to-one { background-position: -96px -192px; }
.icon-schedule { background-position: 0 -192px; }
.icon-experienced-teacher { background-position: -192px -96px; }
.icon-guaranteed-results { background-position: -96px 0; }
.icon-personalized-lessons { background-position: 0 -96px; }
.icon-child-friendly { background-position: 0 0; }


/* Trusted by Section */
.trusted-by-section {
    padding-top: 4rem;
    padding-bottom: 2rem;
}
.trusted-by-section .content-container {
}
.trusted-header-grid {
    display: flex;
    flex-direction: column; 
    align-items: center;
    text-align: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-right: 0;
}
.trusted-header-grid .header-text h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}
.rating-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.rating-summary .rating-value {
    font-size: 2.75rem;
    font-weight: 700;
    color: #ad5207;
    line-height: 1;
}
.rating-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}
.rating-summary .rating-count-text {
    color: #4B5563;
    font-size: 1rem;
    line-height: 1.4;
}
.rating-summary .stars-wrapper {
    display: flex;
    gap: 0.125rem;
}

.trusted-by-section .testimonials-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 2rem;
}
.trusted-by-section .testimonial-item {
    background-color: #fffaf2;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.trusted-by-section .testimonial-item .stars-rating {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.25rem;
}
.trusted-by-section .testimonial-item p.quote {
    color: #374151;
    font-size: 1rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}
.trusted-by-section .testimonial-item .author-info {
    display: flex;
    align-items: center;
    margin-top: auto;
}
.trusted-by-section .testimonial-item .author-info img {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    margin-right: 0.75rem;
    object-fit: cover;
}
.trusted-by-section .testimonial-item .author-info .name {
    font-weight: 500;
    color: #1F2937;
    margin: 0;
}
.trusted-by-section .testimonial-item .author-info .details {
    font-size: 0.8rem;
    color: #4B5563;
    margin-top: 0.2rem;
}

/* --- Star Rating SVG Styles --- */
.stars-wrapper svg,
.stars-rating svg {
    color: #f59e0b; /* Amber-500 color */
}
.hero-section .stars-wrapper svg,
.about-us-section-home .stars-wrapper svg {
    width: 1rem; /* 16px */
    height: 1rem;
}
.rating-summary .stars-wrapper svg,
.testimonial-item .stars-rating svg {
    width: 1.125rem; /* 18px */
    height: 1.125rem;
}


/* Profile Icons in "Testimonials" section */
.profile-icon {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    margin-right: 0.75rem;
    background-size: 120px 120px;
}

/* Positions for each profile icon */
.icon-hijab { background-position: -40px -40px; }
.icon-muslim-man { background-position: -80px 0; }

/* --- Improved Blog Section Styles --- */
.blog-section-home {
    padding-top: 4rem;
    padding-bottom: 2rem;
    text-align: center;
}
.blog-section-home h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.blog-section-home p.intro-text {
    color: #4B5563;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
}
.blog-grid-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}
.blog-card-home {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    overflow: hidden;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card-home:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}
.blog-card-home .blog-card-image-link {
    display: block;
    overflow: hidden; /* To contain the image zoom */
}
.blog-card-home img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.blog-card-home:hover img {
    transform: scale(1.05);
}
.blog-card-home .blog-card-content {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.blog-card-home .category {
    color: #ad5207;
    background-color: #fffaf2;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    align-self: flex-start; /* Makes the tag only as wide as its content */
}
.blog-card-home h3 {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 1rem 0;
    flex-grow: 1;
}
.blog-card-home h3 a {
    text-decoration: none;
    color: #1F2937;
    transition: color 0.3s ease;
}
.blog-card-home h3 a:hover {
    color: #ad5207;
}
.blog-card-home .read-more-link {
    color: #ad5207;
    text-decoration: none;
    font-weight: 600;
    margin-top: auto;
    transition: transform 0.3s ease;
    display: inline-block; /* Required for transform */
}
.blog-card-home .read-more-link:hover {
    transform: translateX(4px);
}
.blog-section-home .view-all-container {
    margin-top: 1rem;
}

/* --- Secondary Button Style --- */
.btn-secondary {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 9999px;
    background-color: transparent;
    border: 2px solid #ad5207;
    color: #ad5207;
    transition: all 0.3s ease;
}
.btn-secondary:hover {
    background-color: #ad5207;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}


/* FAQ Section */
.faq-section {
    padding-top: 4rem;
    padding-bottom: 2rem;
    text-align: center;
}
.faq-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.faq-section p.intro-text {
    color: #4B5563;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
}
.faq-container {
    max-width: 48rem; /* 768px */
    margin: 0 auto;
    border-top: 1px solid #e5e7eb; /* gray-200 */
}
.faq-item {
    border-bottom: 1px solid #e5e7eb;
}
.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: 1.5rem 0;
    background-color: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.125rem; /* 18px */
    font-weight: 600;
    color: #1F2937; /* gray-800 */
    transition: color 0.2s ease;
}
.faq-question:hover {
    color: #ad5207;
}
.faq-icon {
    transition: transform 0.3s ease-in-out;
    flex-shrink: 0; /* Prevents icon from shrinking */
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    text-align: left;
}
.faq-answer p {
    padding: 0 0 1.5rem 0;
    color: #4B5563; /* gray-600 */
    line-height: 1.6;
}
/* Active state for accordion */
.faq-item.active .faq-question {
    color: #ad5207;
}
.faq-item.active .faq-icon {
    transform: rotate(45deg);
}
.faq-item.active .faq-answer {
    max-height: 200px; /* Adjust if your answers are longer */
}


/* Call to Action (CTA) Section */
.cta-section {
    background-color: #ad5207;
    color: #ffffff;
    text-align: center;
    padding: 3rem 1rem;
    margin-top: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}
.cta-section .content-container {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
}
.cta-section h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff;
}
.cta-section p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    color: #ffffff;
}
.cta-section .btn-primary {
    background-color: #ffffff;
    color: #ad5207;
    padding: 0.75rem 2rem;
    font-weight: 700;
    transform: scale(1.0);
    transition: transform 0.3s ease, background-color 0.3s ease;
    border: none;
    text-decoration: none;
}
.cta-section .btn-primary:hover {
    background-color: #f3f4f6;
    transform: scale(1.05);
}

/* ====== RESPONSIVE STYLES ====== */

@media (min-width: 768px) {
    /* --- FLUID TYPOGRAPHY & SIZING --- */
    .hero-section .text-content h1 {
        font-size: clamp(2.5rem, 1.5rem + 2.5vw, 3.75rem);
    }
    
    .what-we-teach-section h2,
    .about-us-section-home h2,
    .what-makes-us-different-section h2,
    .trusted-header-grid .header-text h2,
    .blog-section-home h2,
    .faq-section h2 {
        font-size: clamp(2rem, 1.75rem + 0.8vw, 2.25rem);
    }

    .stats-section .stat-item h3 {
        font-size: clamp(2.25rem, 1.8rem + 1.5vw, 2.75rem);
    }

    .rating-summary .rating-value {
        font-size: clamp(3.5rem, 2.5rem + 3vw, 4.5rem);
    }
    
    .cta-section {
        padding: 4rem 1rem;
    }

    .cta-section h2 {
        font-size: clamp(2.25rem, 1.8rem + 1.5vw, 2.75rem);
    }

    /* --- LAYOUT ADJUSTMENTS --- */
    
    /* Desktop Layout: Revert to a two-column layout */
    .hero-section .hero-section-grid {
        flex-direction: row;
        align-items: center;
    }

    .hero-text-column {
        display: flex; /* Revert from 'contents' to a flex container */
        flex-direction: column;
        width: 50%;
        order: 0; /* Reset order */
    }

    .hero-section .text-content,
    .hero-section .hero-cta-container,
    .hero-section .image-content {
        order: 0; /* Reset order for all children */
    }

    .hero-section .text-content {
        text-align: left;
    }

    .hero-section .image-content {
        width: 50%;
        display: flex;
        justify-content: flex-end;
        margin-top: 0; /* Reset mobile margin */
    }

    .hero-section .text-content p.description {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 2rem; /* Add margin back for desktop */
    }

    .hero-section .hero-cta-container {
        align-items: flex-start; /* Align button/rating to the left */
    }

    .hero-section .rating-container {
        justify-content: flex-start;
    }

    .about-us-section-home .about-us-section-grid {
        flex-direction: row;
        align-items: center;
    }
    .about-us-section-home .text-content {
        text-align: left;
        width: 50%;
    }
    .about-us-section-home .image-testimonial-section {
        width: 50%;
        display: flex;
        justify-content: flex-end;
    }
    .about-us-section-home .text-content p.description {
        margin-left: 0;
        margin-right: 0;
    }
    .about-us-section-home .text-content button.btn-primary {
        margin-bottom: 0;
        padding: 0.75rem 2rem;
    }
    .about-us-section-home .text-content .rating-container {
        justify-content: flex-start;
    }

    .stats-section .content-container {
        flex-wrap: nowrap;
    }

    .what-makes-us-different-section .grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    /* FIXED: Restoring correct sprite icon sizes for desktop */
    .feature-icon {
        width: 192px;
        height: 192px;
        margin-bottom: 0rem;
        background-size: 576px 576px;
    }

    .icon-one-to-one { background-position: -192px -384px; }
    .icon-schedule { background-position: 0 -384px; }
    .icon-experienced-teacher { background-position: -384px -192px; }
    .icon-guaranteed-results { background-position: -192px 0; }
    .icon-personalized-lessons { background-position: 0 -192px; }
    .icon-child-friendly { background-position: 0 0; }

    .what-makes-us-different-section .feature-card h3 {
        font-size: 1.1rem;
    }
    
    .blog-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .what-we-teach-section .teach-card-content {
        padding: 0 2.5rem 2.5rem;
    }
    
    .what-we-teach-section .teach-card h3 {
        font-size: 1.4rem;
    }
    
    .what-we-teach-section .teach-card p {
        font-size: 1.05rem;
    }
    
    .trusted-header-grid {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
        padding-right: 2rem;
    }
    .trusted-by-section .testimonials-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .blog-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .what-we-teach-section .grid-container {
        gap: 2.5rem;
    }
    
    .what-we-teach-section .teach-card {
        flex: 1 1 320px;
    }
}