/* ==================================
   VARIABLES & DESIGN TOKENS
   ================================== */
:root {
    /* Color Palette */
    --primary-color: #4F46E5;      /* Indigo 600 */
    --primary-dark: #4338CA;       /* Indigo 700 */
    --primary-light: #818CF8;      /* Indigo 400 */
    
    --secondary-color: #8B5CF6;    /* Violet 500 */
    --secondary-dark: #7C3AED;     /* Violet 600 */
    
    --whatsapp-color: #25D366;
    --whatsapp-dark: #128C7E;

    --text-main: #1F2937;          /* Gray 800 */
    --text-muted: #4B5563;         /* Gray 600 */
    --text-light: #9CA3AF;         /* Gray 400 */
    
    --bg-main: #FFFFFF;
    --bg-light: #F3F4F6;           /* Gray 100 */
    --bg-card: #FFFFFF;
    
    --border-color: #E5E7EB;       /* Gray 200 */

    /* Typography */
    --font-family: 'Tajawal', sans-serif;
    
    /* Layout */
    --max-width: 1200px;
    --header-height: 80px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-colored: 0 10px 25px -5px rgba(79, 70, 229, 0.4);

    /* Transitions */
    --transition: all 0.3s ease;
}

/* ==================================
   RESET & BASE STYLES
   ================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }

/* ==================================
   TYPOGRAPHY
   ================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-main);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-subtitle {
    display: inline-block;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    padding: 5px 15px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: 50px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==================================
   BUTTONS
   ================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    font-family: var(--font-family);
}

.btn i {
    font-size: 1.1em;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-colored);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(79, 70, 229, 0.5);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-whatsapp {
    border-color: var(--whatsapp-color);
    color: var(--whatsapp-dark);
}

.btn-whatsapp:hover {
    background-color: var(--whatsapp-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(37, 211, 102, 0.4);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ==================================
   HEADER & NAVIGATION
   ================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
    height: 70px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    font-size: 1.05rem;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to left, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    transition: var(--transition);
    border-radius: 3px;
}

/* ==================================
   HERO SECTION
   ================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(255,255,255,0) 70%);
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, rgba(255,255,255,0) 70%);
}

.hero-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    z-index: 2;
}

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

.badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--text-main);
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-image-wrap {
    flex: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    max-width: 90%;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 2;
    border: 8px solid white;
}

.blob-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: blob-bounce 8s infinite alternate;
    z-index: 1;
    opacity: 0.15;
    transform: scale(1.1);
}

@keyframes blob-bounce {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; transform: scale(1.1); }
    50% { border-radius: 50% 50% 30% 70% / 50% 70% 30% 50%; transform: scale(1.15); }
    100% { border-radius: 70% 30% 50% 50% / 70% 30% 50% 50%; transform: scale(1.1); }
}

.floating-card {
    position: absolute;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--secondary-color);
    animation: float 4s ease-in-out infinite;
}

.c-1 { top: 10%; right: 5%; animation-delay: 0s; }
.c-2 { bottom: 20%; left: 0%; animation-delay: 1.5s; }
.c-3 { top: 40%; left: -5%; animation-delay: 3s; color: var(--primary-color); }

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* ==================================
   ABOUT SECTION
   ================================== */
.about-container {
    display: flex;
    align-items: center;
    gap: 60px;
}

.about-image {
    flex: 1;
    position: relative;
    height: 400px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-xl);
}

.about-img-inner {
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    background-color: var(--bg-main);
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.large-icon {
    font-size: 8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border-right: 5px solid var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.experience-badge .number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

.experience-badge .text {
    font-weight: 600;
    line-height: 1.2;
}

.about-content {
    flex: 1.2;
}

.about-description {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.about-list {
    margin-bottom: 30px;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 500;
}

.about-list li i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* ==================================
   COURSES CARDS (Mental Math)
   ================================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 40px 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(79, 70, 229, 0.3);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to left, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

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

.card-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(79, 70, 229, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    transition: var(--transition);
}

.card:hover .card-icon {
    background-color: var(--primary-color);
    color: white;
    transform: rotateY(180deg);
}

.card-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.card-features {
    margin-bottom: 30px;
    flex-grow: 1;
}

.card-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-muted);
}

.card-features li i {
    color: var(--secondary-color);
    margin-top: 5px;
}

/* ==================================
   MATH COURSES
   ================================== */
.featured-card {
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.featured-content {
    flex: 1;
    padding: 50px;
}

.featured-content > h3 {
    font-size: 1.8rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.featured-content > p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.featured-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.featured-list li {
    display: flex;
    gap: 15px;
}

.feat-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(139, 92, 246, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.feat-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.feat-text p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.featured-image {
    flex: 0.8;
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-dark));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Mathematics Graphic Abstract */
.math-graphics {
    position: relative;
    width: 100%;
    height: 100%;
}

.math-shape {
    position: absolute;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.2);
}

.shape-1 {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    top: 20%;
    right: 20%;
    animation: rotate 20s linear infinite;
}

.shape-1::after {
    content: '';
    position: absolute;
    top: 50%; right: 0; width: 100%; height: 2px;
    background: rgba(255,255,255,0.3);
}

.shape-2 {
    width: 120px;
    height: 120px;
    bottom: 20%;
    left: 20%;
    transform: rotate(45deg);
}

.shape-3 {
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 140px solid rgba(255,255,255,0.1);
    top: 40%;
    left: 40%;
    background: transparent;
    border-top: none;
    border-top-color: transparent;
    border-right-color: transparent;
    border-left-color: transparent;
}

.math-formula {
    position: absolute;
    color: rgba(255,255,255,0.8);
    font-size: 2rem;
    font-family: monospace;
    font-weight: bold;
}

.f-2 { top: 15%; left: 30%; font-size: 1.5rem; }
.f-3 { bottom: 15%; right: 30%; font-size: 2.5rem; }

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==================================
   CONTACT SECTION
   ================================== */
.contact-container {
    display: flex;
    background: var(--bg-card);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.contact-info {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 50px;
}

.contact-info h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 15px;
}

.contact-info > p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.info-icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.info-item h4 {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.info-item a {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
}

.info-item a:hover {
    color: var(--primary-light);
}

.social-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.social-link:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

.contact-form {
    flex: 1.5;
    padding: 50px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 1rem;
    background-color: var(--bg-light);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background-color: white;
}

/* ==================================
   FOOTER
   ================================== */
.footer {
    background-color: #111827; /* Gray 900 */
    color: white;
    padding-top: 70px;
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.footer-logo i {
    color: var(--primary-light);
}

.footer-desc {
    color: var(--text-light);
    max-width: 400px;
    line-height: 1.8;
}

.footer-heading {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background-color: var(--primary-light);
    border-radius: 3px;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: white;
    transform: translateX(-5px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ==================================
   ANIMATIONS & EFFECTS
   ================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ==================================
   RESPONSIVE DESIGN (MOBILE)
   ================================== */
@media (max-width: 992px) {
    .hero-container {
        flex-direction: column;
        text-align: center;
        padding-top: 40px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-container {
        flex-direction: column;
    }
    
    .featured-card {
        flex-direction: column;
    }
    
    .featured-image {
        height: 300px;
    }
    
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: start;
        padding-top: 50px;
        gap: 30px;
        transition: right 0.4s ease;
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    }

    .nav-menu.active {
        right: 0;
    }

    .contact-container {
        flex-direction: column;
    }
    
    .footer-container {
        grid-template-columns: 1fr;
    }

    .featured-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .contact-info, .contact-form, .featured-content, .card {
        padding: 30px 20px;
    }
    
    .experience-badge {
        right: 0;
        bottom: 0;
        transform: scale(0.8);
        transform-origin: bottom right;
    }
}
