/*
Theme Name: Semola Theme
Theme URI: https://semola.com.vn
Author: Semola Development Team
Author URI: https://semola.com.vn
Description: Custom theme for Semola company - Professional English training and NLP Master solutions
Version: 1.0.0
License: GPL v2 or later
Text Domain: semola
*/

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

/* Variables - Based on Semola Logo */
:root {
    /* Primary Blue Tones from Logo */
    --primary-color: #2E5C8A;        /* Deep Navy Blue */
    --secondary-color: #4A90C2;      /* Medium Blue */
    --accent-color: #7AB8E8;         /* Light Blue */
    --bright-blue: #5CB3E8;          /* Bright Blue */
    
    /* Supporting Colors */
    --text-color: #2C3E50;           /* Dark Blue-Gray */
    --light-bg: #F8FBFF;             /* Very Light Blue */
    --border-color: #E3F2FD;         /* Light Blue Border */
    
    /* Legacy Variables (updated) */
    --orange: #FF8C42;               /* Warm Orange for CTA */
    --red: #2E5C8A;                  /* Replaced with Primary Blue */
    --yellow: #FFC107;               /* Keep Yellow for highlights */
    --dark-red: #1E3A5F;             /* Replaced with Dark Blue */
    
    /* System */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --shadow-light: 0 2px 8px rgba(46,92,138,0.1);
    --shadow-medium: 0 4px 16px rgba(46,92,138,0.15);
    --shadow-blue: 0 4px 20px rgba(123,184,232,0.3);
}

/* Base Styles */
html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-primary);
    color: var(--text-color);
    line-height: 1.6;
    font-size: 16px;
}

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

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

/* Site Branding */
.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    flex-shrink: 0;
}

.site-logo img {
    max-height: 70px;
    width: auto;
    display: block;
}

.site-logo a {
    display: block;
    line-height: 0;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
}

.site-title a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
}

.site-description {
    margin: 0;
    font-size: 0.875rem;
    color: #666;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: var(--light-bg);
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Course Grid */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.course-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

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

.course-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.course-content {
    padding: 1.5rem;
}

.course-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Values Section */
.values-section {
    padding: 4rem 0;
    background: var(--light-bg);
}

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

.value-item {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
}

.value-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Footer */
.site-footer {
    background: #333;
    color: #fff;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-widget h3 {
    margin-bottom: 1rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
}

/* Contact Page */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

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

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: inherit;
}

.contact-form .required {
    color: red;
}

.google-map {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

/* About Page */
.about-page section {
    margin-bottom: 4rem;
}

.principles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    justify-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.principle-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    max-width: 350px;
}

.principle-number {
    background: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

/* Single Course */
.course-details {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.course-info-box {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    position: sticky;
    top: 100px;
}

.course-info-box > div {
    margin-bottom: 1.5rem;
}

.course-info-box h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.price-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
}

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

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
    font-weight: 500;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background: #1557b0;
}

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

.btn-secondary:hover {
    background: #2d8b47;
}

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

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

/* Alert Messages */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.menu-icon {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-color);
    position: relative;
    transition: background 0.3s;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background: var(--text-color);
    transition: transform 0.3s;
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    bottom: -8px;
}

.menu-toggle.active .menu-icon {
    background: transparent;
}

.menu-toggle.active .menu-icon::before {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active .menu-icon::after {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Sticky Header */
.site-header.sticky {
    position: fixed;
    width: 100%;
    top: 0;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Header */
    .header-inner {
        position: relative;
        flex-wrap: wrap;
    }
    
    /* Site branding mobile fix */
    .site-branding {
        flex: 1;
        min-width: 0;
    }
    
    .site-logo img {
        max-height: 50px;
        max-width: 180px;
        height: auto;
        width: auto;
    }
    
    .site-title {
        font-size: 1.2rem;
    }
    
    /* Remove conflicting menu-toggle style from here */
    
    .main-navigation {
        display: none;
    }
    
    .main-navigation.menu-open {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 9999;
    }
    
    .main-navigation ul {
        display: flex;
        flex-direction: column;
        background: white;
        box-shadow: 0 5px 20px rgba(0,0,0,0.15);
        padding: 0;
        margin: 0;
        list-style: none;
        width: 100%;
    }
    
    .main-navigation ul.show {
        display: flex !important;
    }
    
    .main-navigation li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .main-navigation li:last-child {
        border-bottom: none;
    }
    
    .main-navigation a {
        display: block;
        padding: 15px 20px;
        color: #333;
        text-decoration: none;
        font-size: 16px;
        transition: background 0.3s ease;
    }
    
    .main-navigation a:hover,
    .main-navigation a:focus {
        background: #f8f8f8;
        color: var(--primary-color);
    }
    
    .main-navigation a::after {
        display: none;
    }
    
    /* Typography */
    .hero-title {
        font-size: 2rem;
    }
    
    h2.section-title {
        font-size: 1.75rem;
    }
    
    /* Grid Layouts */
    .courses-grid,
    .values-grid,
    .news-grid,
    .clients-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
    
    /* Contact Page */
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    /* About Page */
    .principles-grid {
        grid-template-columns: 1fr;
    }
    
    /* Course Details */
    .course-details {
        grid-template-columns: 1fr;
    }
    
    .course-info-box {
        position: static;
        margin-top: 2rem;
    }
    
    /* Sections */
    section {
        padding: 2rem 0;
    }
    
    .site-footer {
        padding: 2rem 0 1rem;
    }
}

@media (max-width: 480px) {
    /* Typography */
    body {
        font-size: 14px;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    h2.section-title {
        font-size: 1.5rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 14px;
    }
    
    /* Forms */
    .contact-form input,
    .contact-form textarea {
        padding: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .main-navigation,
    .pagination,
    .btn,
    .form-submit {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .container {
        max-width: 100%;
    }
}

/* Additional Styles */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

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

.hero-slide {
    display: none;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-slide.active,
.hero-slide:first-child {
    display: block;
}

/* Removed background overlay to show banner images clearly */
.hero-slide::before {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 100px 20px;
    color: white;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.news-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
}

.news-meta {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.5rem;
}

/* Clients Grid */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    align-items: center;
}

.client-item {
    text-align: center;
    padding: 1rem;
}

.client-logo {
    margin-bottom: 1rem;
}

.client-logo img {
    max-width: 150px;
    height: auto;
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.client-item:hover .client-logo img {
    filter: grayscale(0);
}


/* Section Styles */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.section-footer {
    text-align: center;
    margin-top: 2rem;
}

/* NLP Section */
.nlp-section {
    background: var(--light-bg);
    padding: 4rem 0;
}

.nlp-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.nlp-image img {
    width: 100%;
    border-radius: 8px;
}

/* 404 Page */
.error-404 {
    text-align: center;
    padding: 4rem 0;
}

.error-404 .page-title {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.error-actions {
    margin: 2rem 0;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.search-form-404 {
    max-width: 500px;
    margin: 3rem auto;
}

/* Search Form */
.search-form {
    display: flex;
    position: relative;
}

.search-field {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.search-submit:hover {
    background: #1557b0;
}

/* Search Results */
.search-result {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.search-result:last-child {
    border-bottom: none;
}

.post-type {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.75rem;
    margin-right: 1rem;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 1rem 0;
    font-size: 0.875rem;
    color: #666;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Icons */
.icon-location::before,
.icon-phone::before,
.icon-email::before {
    font-family: 'Dashicons';
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.icon-location::before {
    content: '\f230';
}

.icon-phone::before {
    content: '\f525';
}

.icon-email::before {
    content: '\f465';
}

/* Fix for 5T values */
.value-icon {
    font-size: 3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nlp-wrapper {
        grid-template-columns: 1fr;
    }
    
    .hero-content {
        padding: 50px 20px;
    }
    
    .hero-slide {
        min-height: 400px;
    }
    
    .error-404 .page-title {
        font-size: 2rem;
    }
}