/* ========================================
   Aalima Home Tuition - Final Enhanced CSS
   With Confetti, Lights, Full Styling
   ======================================== */

:root {
    --green-primary: #1f7a4d;
    --green-light: #28a745;
    --green-soft: #e8f5e9;
    --gold: #c9a24d;
    --gold-light: #fff8e8;
    --teal: #00897b;
    --teal-soft: #e0f2f1;
    --red: #dc3545;
    --black: #1a1a1a;
    --white: #ffffff;
    --gray: #6c757d;
    --gray-light: #f8f9fa;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-cursive: 'Dancing Script', cursive;

    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--black);
    background: var(--white);
    line-height: 1.6;
    padding-top: 42px;
    padding-bottom: 70px;
    -webkit-font-smoothing: antialiased;
}

/* Confetti Canvas */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

/* ========================================
   TOP ALERT BAR
   ======================================== */
.top-alert {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #fff0f0, #ffffff, #fff0f0);
    border-bottom: 2px solid var(--red);
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    z-index: 1001;
    font-size: 0.85rem;
    font-weight: 700;
}

.top-alert i {
    color: var(--red);
    font-size: 1.1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

.alert-text {
    color: var(--red);
    animation: vibrate 0.5s ease-in-out infinite;
}

@keyframes vibrate {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px);
    }

    75% {
        transform: translateX(2px);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Section Title */
.section-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--black);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero-section {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f5e9 0%, #fff8e8 50%, #f0f9f4 100%);
    padding: 30px 20px 50px;
    overflow: hidden;
}

.islamic-pattern {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l30 30-30 30L0 30 30 0zm0 8L8 30l22 22 22-22L30 8z' fill='%231f7a4d' fill-opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Decorative Stars */
.hero-star {
    position: absolute;
    color: var(--gold);
    font-size: 1.5rem;
    animation: twinkle 2s ease-in-out infinite;
}

.star-1 {
    top: 15%;
    left: 10%;
    animation-delay: 0s;
}

.star-2 {
    top: 25%;
    right: 12%;
    animation-delay: 0.7s;
}

.star-3 {
    bottom: 20%;
    left: 15%;
    animation-delay: 1.4s;
    font-size: 1.2rem;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

.bismillah {
    font-size: 1.4rem;
    color: var(--gold);
    margin-bottom: 0.75rem;
    letter-spacing: 1px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    font-weight: 700;
    color: var(--black);
    white-space: nowrap;
    margin-bottom: 0.25rem;
}

.hero-subtitle {
    font-family: var(--font-cursive);
    font-size: 1.6rem;
    color: var(--green-primary);
    margin-bottom: 0.75rem;
}

.hero-tagline {
    font-size: 0.95rem;
    color: var(--gray);
    margin-bottom: 1.5rem;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.btn-trial {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--green-primary), var(--green-light));
    color: var(--white);
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 6px 25px rgba(31, 122, 77, 0.35);
    transition: all 0.3s ease;
}

.btn-trial:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(31, 122, 77, 0.45);
    color: var(--white);
}

.btn-calculator {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--gold), #d4a853);
    color: var(--white) !important;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(201, 162, 77, 0.35);
    transition: all 0.3s ease;
}

.btn-calculator:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(201, 162, 77, 0.45);
}

/* ========================================
   FEATURES - Colorful Cards
   ======================================== */
.features-section {
    padding: 50px 20px;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.feature-card {
    padding: 28px 22px;
    border-radius: var(--radius);
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-green {
    background: linear-gradient(145deg, #e8f5e9 0%, #c8e6c9 100%);
    border-color: #a5d6a7;
}

.card-green .feature-icon {
    background: linear-gradient(135deg, var(--green-light), var(--green-primary));
}

.card-gold {
    background: linear-gradient(145deg, #fff8e8 0%, #ffe0b2 100%);
    border-color: #ffcc80;
}

.card-gold .feature-icon {
    background: linear-gradient(135deg, #ffc107, var(--gold));
}

.card-teal {
    background: linear-gradient(145deg, #e0f2f1 0%, #b2dfdb 100%);
    border-color: #80cbc4;
}

.card-teal .feature-icon {
    background: linear-gradient(135deg, #26a69a, var(--teal));
}

.feature-icon {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.feature-icon i {
    font-size: 1.6rem;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--black);
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--gray);
    margin: 0;
    line-height: 1.5;
}

/* ========================================
   COURSES - Styled Box
   ======================================== */
.courses-section {
    padding: 50px 20px;
    background: linear-gradient(180deg, var(--gray-light) 0%, #fff 100%);
}

.courses-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px 15px;
    max-width: 100%;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
}

.course-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 12px;
    background: linear-gradient(135deg, #fafafa 0%, #fff 100%);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--gold);
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.course-item:last-child {
    margin-bottom: 0;
}

.course-item:hover {
    background: linear-gradient(135deg, var(--gold-light) 0%, #fff 100%);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.course-icon-box {
    width: 38px;
    height: 38px;
    min-width: 38px;
    background: linear-gradient(135deg, var(--gold), #d4a853);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(201, 162, 77, 0.3);
}

.course-icon-box i {
    font-size: 1.05rem;
    color: var(--white);
}

.course-content {
    flex: 1;
    min-width: 0;
}

.course-content strong {
    display: block;
    font-size: 0.80rem;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 3px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-content span {
    font-size: 0.75rem;
    color: var(--gray);
    line-height: 1.35;
    display: block;
}

/* ========================================
   SPECIAL OFFER - Festive with Lights
   ======================================== */
.offer-section {
    padding: 50px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    position: relative;
    overflow: hidden;
}

.offer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--green-light), var(--gold), var(--green-light), var(--gold));
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Decorative Lights */
.lights-container {
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    pointer-events: none;
}

.light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: glow 1s ease-in-out infinite alternate;
}

.light-1 {
    background: #ff6b6b;
    animation-delay: 0s;
}

.light-2 {
    background: #ffd93d;
    animation-delay: 0.2s;
}

.light-3 {
    background: #6bcb77;
    animation-delay: 0.4s;
}

.light-4 {
    background: #4d96ff;
    animation-delay: 0.6s;
}

.light-5 {
    background: #ff6b6b;
    animation-delay: 0.8s;
}

@keyframes glow {
    0% {
        opacity: 0.4;
        transform: scale(0.8);
        box-shadow: 0 0 5px currentColor;
    }

    100% {
        opacity: 1;
        transform: scale(1.2);
        box-shadow: 0 0 20px currentColor, 0 0 30px currentColor;
    }
}

.offer-header {
    text-align: center;
    margin-bottom: 25px;
}

.offer-icon-big {
    font-size: 2.5rem;
    color: var(--gold);
    display: block;
    margin-bottom: 10px;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.offer-section .section-title {
    color: var(--white);
    margin-bottom: 0;
}

.offer-cards {
    max-width: 600px;
    margin: 0 auto;
}

.offer-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: var(--radius);
    margin-bottom: 14px;
    border: 1px solid rgba(201, 162, 77, 0.4);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.offer-card:last-child {
    margin-bottom: 0;
}

.offer-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    border-color: var(--gold);
    transform: translateX(8px);
}

.offer-icon-wrap {
    width: 45px;
    height: 45px;
    min-width: 45px;
    background: linear-gradient(135deg, var(--gold), #d4a853);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(201, 162, 77, 0.4);
}

.offer-icon-wrap i {
    font-size: 1.3rem;
    color: var(--white);
}

.offer-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
}

.offer-content p {
    font-size: 0.85rem;
    color: #cccccc;
    margin: 0;
    line-height: 1.45;
}

/* ========================================
   CONTACT SECTION
   ======================================== */
.contact-section {
    padding: 50px 20px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.contact-subtitle {
    font-size: 0.95rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.phone-display {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--green-primary);
    text-decoration: none;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.phone-display:hover {
    color: var(--green-light);
    transform: scale(1.05);
}

.contact-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-whatsapp {
    background: #25d366;
    color: var(--white) !important;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp:hover {
    background: #22c35e;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.45);
}

.btn-call {
    background: var(--green-primary);
    color: var(--white) !important;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(31, 122, 77, 0.35);
}

.btn-call:hover {
    background: var(--green-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(31, 122, 77, 0.45);
}

/* ========================================
   FOOTER
   ======================================== */
.footer-section {
    background: var(--black);
    text-align: center;
    padding: 25px 20px;
}

.footer-section p {
    margin: 0;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
}

.footer-dua {
    margin-top: 8px !important;
    color: var(--gold) !important;
    font-size: 1rem !important;
}

/* ========================================
   BOTTOM NAVIGATION
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 10px 8px;
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border-top: 1px solid #e0e0e0;
    height: 58px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-item i {
    font-size: 1.4rem;
    margin-bottom: 1px;
}

.nav-item.whatsapp {
    color: #25d366;
}

.nav-item.calculator {
    color: var(--gold);
}

.nav-item.offer {
    color: var(--gold);
}

.nav-item.call {
    color: #0066cc;
}

/* Center Home Button - Big Elevated Circle */
.nav-item.home-center {
    position: relative;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--green-primary), var(--green-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -35px;
    box-shadow: 0 6px 25px rgba(31, 122, 77, 0.45);
    border: 4px solid var(--white);
}

.nav-item.home-center i {
    font-size: 1.7rem;
    color: var(--white);
    margin: 0;
}

.nav-item.home-center:hover {
    transform: scale(1.12);
    box-shadow: 0 8px 30px rgba(31, 122, 77, 0.55);
}

.nav-item:hover,
.nav-item:active {
    background: rgba(0, 0, 0, 0.04);
    transform: scale(1.08);
}

.nav-item.home-center:active {
    background: linear-gradient(135deg, var(--green-light), var(--green-primary));
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }

    .bottom-nav {
        display: none;
    }

    .hero-section {
        min-height: 75vh;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Courses Section - Larger on Desktop */
    .courses-box {
        padding: 25px;
        max-width: 700px;
    }

    .course-item {
        gap: 15px;
        padding: 16px;
    }

    .course-icon-box {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }

    .course-icon-box i {
        font-size: 1.1rem;
    }

    .course-content strong {
        font-size: 0.95rem;
        white-space: normal;
    }

    .course-content span {
        font-size: 0.82rem;
    }
}

@media (max-width: 400px) {
    .hero-title {
        font-size: 1.35rem;
        white-space: normal;
    }

    .feature-card {
        padding: 22px 18px;
    }

    .course-item {
        padding: 14px;
    }
}

/* Print Styles */
@media print {

    .bottom-nav,
    .top-alert,
    #confetti-canvas,
    .lights-container {
        display: none !important;
    }

    body {
        padding: 0;
    }
}

/* ========================================
   MOBILE PERFORMANCE OPTIMIZATIONS
   ======================================== */
@media (max-width: 768px) {

    /* Hardware acceleration for smoother animations */
    .nav-item,
    .feature-card,
    .course-item,
    .offer-card,
    .btn-trial,
    .btn-calculator,
    .hero-star {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }

    /* Reduce animation complexity on mobile */
    .hero-star,
    .light {
        animation-duration: 3s;
        /* Slower, less CPU intensive */
    }

    /* Optimize confetti for mobile */
    #confetti-canvas {
        pointer-events: none;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }

    /* Reduce backdrop blur complexity */
    .offer-card {
        backdrop-filter: none;
        /* Remove blur on mobile for better performance */
        background: rgba(255, 255, 255, 0.12);
    }

    /* Prevent layout shifts */
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-star,
    .light,
    .offer-icon-big {
        animation: none !important;
    }
}