/* ========================================
   eiMaths - Custom CSS Stylesheet
   ======================================== */

/* CSS Variables */
:root {
    --primary-color: #f97316;
    --primary-dark: #ea580c;
    --secondary-color: #1e40af;
    --text-color: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --light-bg: #f8fafc;
    --gray-bg: #f1f5f9;
    --shadow: 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);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Kanit', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

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

ul {
    list-style: none;
}

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

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

/* ========================================
   Header & Navigation
   ======================================== */
.header {
    background-color: var(--primary-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    color: var(--white);
}

.logo-highlight {
    color: var(--white);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: var(--white);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav-link:hover {
    opacity: 0.9;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--white);
    transition: var(--transition);
}

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

.btn-register {
    background-color: var(--white);
    color: var(--primary-color) !important;
    padding: 10px 25px !important;
    border-radius: 25px;
    font-weight: 600;
}

.btn-register:hover {
    background-color: var(--gray-bg);
    transform: translateY(-2px);
}

.btn-register::after {
    display: none;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    position: relative;
    transition: var(--transition);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    transition: var(--transition);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

/* Mobile Menu Active State */
.mobile-menu-btn.active .hamburger {
    background-color: transparent;
}

.mobile-menu-btn.active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-btn.active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-wave {
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    z-index: 1;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: 150px;
}

.hero-wave path {
    fill: var(--white);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.4;
    margin-bottom: 30px;
}

.hero-title .highlight {
    color: #fde047;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.hero-img {
    width: 400px;
    height: 400px;
    object-fit: cover;
    border-radius: 50%;
    border: 8px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--gray-bg);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

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

.btn-white:hover {
    background-color: var(--gray-bg);
    transform: translateY(-3px);
}

.btn-facebook {
    background-color: #1877f2;
    color: var(--white);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-facebook:hover {
    background-color: #166fe5;
    transform: translateY(-3px);
}

/* ========================================
   Sections
   ======================================== */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 50px;
}

.text-center {
    text-align: center;
}

/* ========================================
   Articles Section
   ======================================== */
.articles {
    background-color: var(--light-bg);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.article-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.article-card:hover .article-image img {
    transform: scale(1.1);
}

.article-content {
    padding: 20px;
}

.article-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-content p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ========================================
   Awards Section
   ======================================== */
.awards {
    background-color: var(--white);
}

.awards-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.award-item {
    text-align: center;
}

.award-icon {
    width: 100px;
    height: auto;
    transition: var(--transition);
}

.award-item:hover .award-icon {
    transform: scale(1.1);
}

/* ========================================
   About Section
   ======================================== */
.about {
    background-color: var(--light-bg);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.about-card {
    background-color: var(--white);
    padding: 40px 25px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.about-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.about-icon i {
    font-size: 2rem;
    color: var(--white);
}

.about-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
}

.about-card p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ========================================
   Help Section
   ======================================== */
.help-section {
    background-color: var(--white);
}

.help-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.help-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.help-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* ========================================
   Strategy Section
   ======================================== */
.strategy {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.strategy .section-title {
    color: var(--white);
}

.strategy-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
}

.strategy-card {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.strategy-card:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
}

.strategy-letter {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.strategy-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.strategy-card p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ========================================
   Registration Section
   ======================================== */
.registration {
    background-color: var(--light-bg);
}

.benefits-list {
    max-width: 600px;
    margin: 0 auto;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background-color: var(--white);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.benefit-item:hover {
    transform: translateX(10px);
}

.benefit-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.benefit-item span {
    font-size: 1.1rem;
    font-weight: 500;
}

/* ========================================
   Reviews Section
   ======================================== */
.reviews {
    background-color: var(--white);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.review-card {
    background-color: var(--light-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.reviewer-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.reviewer-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.stars {
    color: #fbbf24;
}

.stars i {
    font-size: 0.9rem;
}

.review-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-light);
    font-style: italic;
}

/* ========================================
   Media Section
   ======================================== */
.media {
    background-color: var(--light-bg);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.media-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.media-card:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.media-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* ========================================
   Facebook Section
   ======================================== */
.facebook-section {
    background-color: var(--white);
    text-align: center;
}

.facebook-btn-wrapper {
    margin-top: 30px;
}

/* ========================================
   CTA Section
   ======================================== */
.cta {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 30px;
}

/* ========================================
   Contact Info Section
   ======================================== */
.contact-info {
    background-color: var(--light-bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

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

.contact-item h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 5px;
}

.contact-item p {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-color);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: #1e293b;
    color: var(--white);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand .logo {
    margin-bottom: 15px;
}

.footer-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.footer h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

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

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}

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

.footer-bottom {
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-img {
        width: 300px;
        height: 300px;
    }

    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .strategy-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Large */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        flex-direction: column;
        padding: 30px;
        gap: 20px;
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 10px 0;
    }

    .btn-register {
        width: 100%;
        text-align: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-image {
        order: -1;
    }

    .hero-img {
        width: 250px;
        height: 250px;
    }

    .section-title {
        font-size: 1.6rem;
    }

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

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

    .help-content {
        grid-template-columns: 1fr;
    }

    .strategy-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-contact p {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-img {
        width: 200px;
        height: 200px;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.4rem;
        margin-bottom: 30px;
    }

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

    .strategy-letter {
        font-size: 2.5rem;
    }

    .btn {
        padding: 12px 25px;
        font-size: 1rem;
    }

    .cta-content h2 {
        font-size: 1.5rem;
    }
}
