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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo i {
    color: #3498db;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #3498db;
}

.nav-button {
    background-color: #3498db;
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.nav-button:hover {
    background-color: #2980b9;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 8rem 0 4rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.tagline {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.description {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cta-button::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: 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button.primary {
    background-color: #fff;
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.cta-button.primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.cta-button.secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.cta-button.secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.hero-image {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transform: perspective(1000px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(52, 152, 219, 0.1), rgba(44, 62, 80, 0.1));
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.hero-image:hover::before {
    opacity: 1;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.hero-image:hover {
    transform: perspective(1000px) rotateY(5deg) scale(1.02);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.hero-image:hover img {
    transform: scale(1.05);
}

.hero-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.2), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.hero-image:hover::after {
    opacity: 1;
}

/* About Section */
.about {
    padding: 5rem 0;
    background-color: #f9f9f9;
}

.about h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.about-card:hover::before {
    transform: scaleX(1);
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.about-icon {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
    position: relative;
}

.about-card:hover .about-icon {
    transform: scale(1.1);
}

/* Special effects for all cards */
.about-card .about-icon::after {
    content: '';
    position: absolute;
    top: -5px;
    right: -5px;
    width: 15px;
    height: 15px;
    background-color: #3498db;
    border-radius: 50%;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

/* First card - Modern Learning */
.about-card:nth-child(1) .about-icon {
    color: #3498db;
}

.about-card:nth-child(1)::before {
    background: linear-gradient(90deg, #3498db, #2c3e50);
}

.about-card:nth-child(1):hover {
    transform: translateY(-5px) rotate(1deg);
}

/* Second card - Feedback System */
.about-card:nth-child(2) .about-icon {
    color: #2ecc71;
}

.about-card:nth-child(2)::before {
    background: linear-gradient(90deg, #2ecc71, #3498db);
}

.about-card:nth-child(2):hover {
    transform: translateY(-5px) rotate(1deg);
}

.about-card:nth-child(2) .about-icon::after {
    background-color: #2ecc71;
}

/* Third card - Interactive Learning */
.about-card:nth-child(3) .about-icon {
    color: #e74c3c;
}

.about-card:nth-child(3)::before {
    background: linear-gradient(90deg, #e74c3c, #3498db);
}

.about-card:nth-child(3):hover {
    transform: translateY(-5px) rotate(1deg);
}

.about-card:nth-child(3) .about-icon::after {
    background-color: #e74c3c;
}

.about-card:nth-child(3):hover::after {
    opacity: 0.2;
    transform: scale(1.2);
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

.about-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

/* Testimonials Section */
.testimonials {
    padding: 5rem 0;
    background-color: #f9f9f9;
}

.testimonials h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.testimonial-card::after {
    content: '"';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 4rem;
    color: rgba(52, 152, 219, 0.1);
    font-family: serif;
    line-height: 1;
    transition: all 0.3s ease;
}

.testimonial-card:hover::after {
    transform: scale(1.2);
    color: rgba(52, 152, 219, 0.2);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.testimonial-rating {
    color: #f1c40f;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.testimonial-content {
    margin-bottom: 1.5rem;
    font-style: italic;
    line-height: 1.8;
    color: #555;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.author-info h4 {
    color: #2c3e50;
    margin-bottom: 0.2rem;
}

.author-location {
    font-size: 0.8rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.testimonial-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    margin-bottom: 2rem;
    opacity: 0.9;
    font-size: 1.1rem;
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-feature:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.cta-feature i {
    color: #2ecc71;
    transition: transform 0.3s ease;
}

.cta-feature:hover i {
    transform: scale(1.2);
}

/* Newsletter Section */
.newsletter {
    padding: 5rem 0;
    background-color: #f9f9f9;
}

.newsletter-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.newsletter h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.newsletter p {
    color: #7f8c8d;
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.newsletter-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.newsletter-button::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: 0.5s;
}

.newsletter-button:hover::before {
    left: 100%;
}

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

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 1.5rem 0 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.footer-brand {
    max-width: 400px;
}

.footer-brand .logo {
    color: white;
    margin-bottom: 0.4rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-brand .logo i {
    color: #3498db;
}

.footer-brand p {
    color: #bdc3c7;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    font-size: 0.85rem;
}

.social-links {
    display: flex;
    gap: 0.7rem;
}

.social-links a {
    color: white;
    font-size: 1rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #3498db;
    transform: translateY(-2px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.footer-column h4 {
    color: white;
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
    padding-bottom: 0.2rem;
    position: relative;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: #3498db;
}

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

.footer-column ul li {
    margin-bottom: 0.4rem;
}

.footer-column ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
}

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

.footer-column ul li i {
    width: 16px;
    color: #3498db;
}

.footer-bottom {
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #bdc3c7;
}

.footer-legal {
    display: flex;
    gap: 0.8rem;
}

.footer-legal a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #3498db;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer {
        padding: 1.2rem 0 0.6rem;
    }

    .footer-main {
        gap: 1.2rem;
    }

    .footer-links {
        gap: 1.2rem;
    }

    .footer-bottom {
        gap: 0.6rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .cta-buttons {
        justify-content: center;
    }

    .nav-links {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .tagline {
        font-size: 1.2rem;
    }

    .testimonial-stats {
        grid-template-columns: 1fr;
    }

    .cta-features {
        flex-direction: column;
        align-items: center;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-button {
        justify-content: center;
    }
}

/* Add smooth scrolling to the entire page */
html {
    scroll-behavior: smooth;
}

/* Smooth Scroll Offset for Fixed Header */
html {
    scroll-padding-top: 80px; /* Adjust this value based on your header height */
}

/* Button Styles */
.cta-button, .nav-button, .newsletter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    gap: 0.5rem;
}

.cta-button::before, .nav-button::before, .newsletter-button::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: 0.5s;
}

.cta-button:hover::before, .nav-button:hover::before, .newsletter-button:hover::before {
    left: 100%;
}

/* Primary Button */
.cta-button.primary, .nav-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    border: none;
}

.cta-button.primary:hover, .nav-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9, #3498db);
}

/* Secondary Button */
.cta-button.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    backdrop-filter: blur(5px);
}

.cta-button.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Newsletter Button */
.newsletter-button {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.newsletter-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
    background: linear-gradient(135deg, #2980b9, #3498db);
}

.newsletter-button i {
    transition: transform 0.3s ease;
}

.newsletter-button:hover i {
    transform: translateX(3px);
}

/* Button Focus States */
.cta-button:focus, .nav-button:focus, .newsletter-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.4);
}

/* Button Active States */
.cta-button:active, .nav-button:active, .newsletter-button:active {
    transform: translateY(1px);
}

/* Responsive Button Styles */
@media (max-width: 768px) {
    .cta-button, .nav-button, .newsletter-button {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2.5rem;
    right: 2.5rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.5);
    background: linear-gradient(135deg, #2980b9, #3498db);
}

.scroll-to-top:active {
    transform: translateY(1px);
}

.scroll-to-top i {
    transition: transform 0.3s ease;
}

.scroll-to-top:hover i {
    transform: translateY(-3px);
}

/* Responsive Scroll to Top Button */
@media (max-width: 768px) {
    .scroll-to-top {
        bottom: 2rem;
        right: 2rem;
        width: 55px;
        height: 55px;
        font-size: 1.4rem;
    }
}

/* Materi Page Styles */
.materi-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 8rem 0 3rem;
    margin-top: 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.materi-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.materi-header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.materi-grid {
    padding: 4rem 0;
}

.materi-grid .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.materi-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.materi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(44, 62, 80, 0.1));
    opacity: 0;
    transition: opacity 0.5s ease;
}

.materi-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.materi-card:hover::before {
    opacity: 1;
}

.materi-card:hover::after {
    height: 50%;
}

.materi-icon {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: inline-block;
}

.arabic-letter {
    font-family: 'Amiri', serif;
    font-size: 3.5rem;
    font-weight: bold;
    display: inline-block;
    line-height: 1;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.materi-card:hover .arabic-letter {
    transform: translateY(-10px) scale(1.1);
    color: #2c3e50;
}

.materi-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    color: #2c3e50;
    transition: all 0.3s ease;
    position: relative;
}

.materi-card:hover h3 {
    color: #3498db;
    transform: translateX(10px);
}

.materi-card p {
    color: #4a5568;
    margin-bottom: 1.2rem;
    line-height: 1.5;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.materi-card:hover p {
    transform: translateX(5px);
}

.materi-progress {
    margin-bottom: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.materi-card:hover .materi-progress {
    transform: scale(1.05);
}

.progress-bar {
    background: #e2e8f0;
    border-radius: 50px;
    height: 0.4rem;
    margin-bottom: 0.4rem;
    overflow: hidden;
    position: relative;
}

.progress {
    background: linear-gradient(90deg, #3498db, #2c3e50);
    height: 100%;
    transition: width 1s ease-in-out;
}

.materi-button {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
    transform: translateY(0);
}

.materi-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.materi-button:hover {
    background: #2c3e50;
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.4);
}

.materi-button:hover::before {
    transform: translateX(100%);
}

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

.materi-features {
    background: #f7fafc;
    padding: 6rem 0;
}

.materi-features h2 {
    text-align: center;
    margin-bottom: 4rem;
    color: #1a365d;
    font-size: 2.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

.feature-card {
    background: white;
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 2.5rem;
    color: #3498db;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h4 {
    font-size: 1.25rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #4a5568;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.feature-button {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.feature-card:hover .feature-button {
    background: #2c3e50;
    transform: translateY(-2px);
}

.feature-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
    height: 100%;
}

@media (max-width: 768px) {
    .materi-header {
        padding: 3rem 0;
    }

    .materi-header h1 {
        font-size: 2rem;
    }

    .materi-grid .container {
        grid-template-columns: 1fr;
    }

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

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.05);
}

/* Back Button */
.back-button {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 20px rgba(52, 152, 219, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    text-decoration: none;
}

.back-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.5);
    background: linear-gradient(135deg, #2980b9, #3498db);
}

.back-button:active {
    transform: translateY(1px);
}

.back-button i {
    transition: transform 0.3s ease;
}

.back-button:hover i {
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .back-button {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Materi Detail Header */
.materi-detail-header {
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    padding: 8rem 0 4rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.materi-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.materi-title .arabic-letter {
    font-family: 'Amiri', serif;
    font-size: 4rem;
    font-weight: bold;
    line-height: 1;
}

.materi-title h1 {
    font-size: 2.5rem;
    margin: 0;
}

.materi-detail-header .subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Materi Content */
.materi-content {
    padding: 4rem 0;
    background: #f7fafc;
}

.content-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.content-section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    border-radius: 3px;
}

/* Hukum Grid */
.hukum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.hukum-card {
    background: #f7fafc;
    border-radius: 0.8rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(52, 152, 219, 0.1);
}

.hukum-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(52, 152, 219, 0.2);
}

.hukum-card h3 {
    color: #3498db;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.hukum-card p {
    color: #4a5568;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.arabic-example {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    text-align: center;
}

.arabic-example p {
    font-family: 'Amiri', serif;
    font-size: 1.5rem;
    margin: 0.5rem 0;
    color: #2c3e50;
}

.hukum-desc {
    background: rgba(52, 152, 219, 0.1);
    padding: 0.8rem;
    border-radius: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
    text-align: center;
}

/* Reading Steps */
.reading-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.step {
    background: #f7fafc;
    border-radius: 0.8rem;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
}

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

.step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3498db, #2c3e50);
    color: white;
    border-radius: 50%;
    line-height: 40px;
    font-weight: bold;
    margin-bottom: 1rem;
}

.step h3 {
    color: #2c3e50;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.step p {
    color: #4a5568;
    line-height: 1.6;
}

/* Practice Examples */
.practice-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.example-card {
    background: #f7fafc;
    border-radius: 0.8rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

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

.example-card h3 {
    color: #3498db;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.example-card .arabic {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    color: #2c3e50;
    margin: 1rem 0;
}

.example-card .translation {
    color: #4a5568;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    .back-button {
        top: 1rem;
        left: 1rem;
        padding: 0.6rem 1.2rem;
    }

    .materi-detail-header {
        padding: 6rem 0 3rem;
    }

    .materi-title {
        flex-direction: column;
        gap: 1rem;
    }

    .materi-title .arabic-letter {
        font-size: 3rem;
    }

    .materi-title h1 {
        font-size: 2rem;
    }

    .content-section {
        padding: 1.5rem;
    }

    .hukum-grid,
    .reading-steps,
    .practice-examples {
        grid-template-columns: 1fr;
    }
}

/* Progress tracking badge */
.materi-card {
    position: relative;
}

.completed-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    padding: 0.5rem 0.8rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 10px rgba(46, 204, 113, 0.3);
    animation: fadeIn 0.3s ease-out;
    z-index: 2;
}

.completed-badge i {
    font-size: 0.9rem;
}

/* Progress that loads from localStorage should have a transition */
.progress {
    transition: width 1s ease-in-out;
}

/* Progress reset button in profile/settings */
.reset-progress {
    background: #f1f1f1;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    color: #e74c3c;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-top: 1rem;
}

.reset-progress:hover {
    background: #ffe5e5;
    color: #c0392b;
}