/* Math Love Institute - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e5a96;
    --secondary: #e91e63;
    --accent: #ff6b35;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --success: #28a745;
    --purple: #8b2c8a;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    overflow-x: hidden;
}

/* Navigation */
nav {
    background: linear-gradient(135deg, var(--primary), #2874b8);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main {
    font-size: 1.8rem;
    color: white;
}

.logo-sub {
    font-size: 0.9rem;
    color: white;
    font-weight: 400;
}

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

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.enroll-btn {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    padding: 0.7rem 2rem;
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.3);
}

.enroll-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(233, 30, 99, 0.5);
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 650px;
    overflow: hidden;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
}

.slide.active {
    opacity: 1;
}

.slide-1 {
    background: linear-gradient(135deg, rgba(30, 90, 150, 0.95), rgba(233, 30, 99, 0.9)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23f1f5f9" width="1200" height="600"/><path fill="%23e2e8f0" d="M0 400Q300 250 600 400T1200 400V600H0Z"/></svg>');
}

.slide-2 {
    background: linear-gradient(135deg, rgba(139, 44, 138, 0.95), rgba(30, 90, 150, 0.9)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23e8f4f8" width="1200" height="600"/><circle cx="200" cy="200" r="150" fill="%23d0e8f2" opacity="0.5"/><circle cx="1000" cy="400" r="200" fill="%23c8e0ec" opacity="0.5"/></svg>');
}

.slide-3 {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.95), rgba(30, 90, 150, 0.9)),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23fff5f0" width="1200" height="600"/><path fill="%23ffe8dc" d="M0 300Q300 150 600 300T1200 300V600H0Z"/></svg>');
}

.slide-content {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8rem 2rem;
    color: white;
    text-align: center;
    z-index: 10;
}

.slide h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.slide p {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    animation: fadeInUp 1s 0.2s backwards;
}

.slider-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 20;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
}

.slider-dot.active {
    background: white;
    width: 30px;
    border-radius: 10px;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.3);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 20;
}

.arrow:hover {
    background: rgba(255,255,255,0.5);
}

.arrow-left { left: 30px; }
.arrow-right { right: 30px; }

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 1s 0.4s backwards;
    flex-wrap: wrap;
}

.btn {
    padding: 1.2rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.4s;
    cursor: pointer;
    border: none;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #ff8c42);
    color: white;
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    box-shadow: 0 5px 20px rgba(255, 255, 255, 0.3);
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
}

/* Announcement Banner */
.announcement {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    animation: slideInDown 0.5s;
}

.announcement i {
    animation: pulse 1.5s infinite;
}

/* Stats Section */
.stats {
    background: linear-gradient(135deg, var(--primary), #2874b8);
    color: white;
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

.stats::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="white" opacity="0.05"/></svg>');
    background-size: 100px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s;
}

.stat-item:hover {
    transform: translateY(-10px);
}

.stat-item i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.stat-item h2 {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

/* Sections */
.section {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 4rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: all 0.4s;
    text-align: center;
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 60px rgba(30, 90, 150, 0.2);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Leadership Messages */
.leadership-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 6rem 2rem;
}

.messages-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 4rem;
    max-width: 1400px;
    margin: 3rem auto 0;
}

.message-card {
    background: white;
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.message-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 8rem;
    color: var(--primary);
    opacity: 0.1;
    font-family: Georgia, serif;
}

.message-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.message-info h3 {
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 0.3rem;
}

.message-info p {
    color: var(--secondary);
    font-weight: 600;
    font-size: 1.1rem;
}

.message-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    position: relative;
    z-index: 1;
}

/* Courses Section */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.course-card {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
    transition: all 0.4s;
    position: relative;
}

.course-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 70px rgba(0,0,0,0.2);
}

.course-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-weight: bold;
    z-index: 10;
    font-size: 0.9rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.course-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--primary), #2874b8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.course-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.3));
}

.course-content {
    padding: 2rem;
}

.course-content h3 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.6rem;
}

.course-content p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.course-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.course-features li {
    padding: 0.5rem 0;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.course-features li i {
    color: var(--success);
}

.course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 2px solid var(--light);
}

.course-price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
}

.course-price span {
    font-size: 1rem;
    color: #999;
    text-decoration: line-through;
    display: block;
    font-weight: normal;
}

.enroll-course-btn {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    display: inline-block;
}

.enroll-course-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.4);
}

/* Why Choose Section */
.why-choose {
    background: linear-gradient(135deg, var(--primary), #2874b8);
    color: white;
    padding: 6rem 2rem;
}

.why-choose .section-title {
    color: white;
}

.why-choose .section-title::after {
    background: linear-gradient(90deg, var(--accent), white);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 3rem auto 0;
}

.why-item {
    background: rgba(255,255,255,0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    transition: all 0.3s;
    text-align: center;
}

.why-item:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-10px);
}

.why-item i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.why-item h4 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-section {
    background: var(--light);
    padding: 6rem 2rem;
}

.contact-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    background: linear-gradient(135deg, var(--primary), #2874b8);
    color: white;
    padding: 3rem;
    border-radius: 25px;
    height: 100%;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-item i {
    font-size: 2rem;
    color: var(--accent);
}

.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 25px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 90, 150, 0.1);
}

/* Success/Error Messages */
.success-message,
.error-message {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: none;
    animation: slideInDown 0.5s;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.success-message.show,
.error-message.show {
    display: block;
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 4rem 2rem 2rem;
}

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

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: var(--accent);
    font-size: 1.5rem;
}

.footer-links {
    list-style: none;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 0.8rem;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 10px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    background: var(--accent);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #999;
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(233, 30, 99, 0.4);
}

.scroll-top.show {
    display: flex;
}

.scroll-top:hover {
    background: var(--accent);
    transform: translateY(-5px);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    
    .messages-container,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .slide h1 {
        font-size: 2.5rem;
    }
    
    .slide p {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .courses-grid,
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .arrow {
        display: none;
    }
}