/* ============================================================
   ISSARAPON SCHOOL - Faithful Reproduction of issarapon.com
   Based on Flavor-Education / EduLine WordPress Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
    --primary-blue: #4a90a4;
    --primary-dark: #3a7a94;
    --header-bg: #ffffff;
    --top-bar-bg: #5a9eb5;
    --top-bar-text: #ffffff;
    --text-dark: #333333;
    --text-body: #555555;
    --text-muted: #888888;
    --bg-light: #f9f9f9;
    --bg-white: #ffffff;
    --border-light: #e0e0e0;
    --accent-gold: #f0c040;
    --footer-bg: #2c3e50;
    --footer-dark: #1a252f;
    --nav-active-bg: #5a9eb5;
    --nav-hover: #5a9eb5;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* --- Reset --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- Base --- */
body {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-body);
    background: var(--bg-white);
    overflow-x: hidden;
}

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

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

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.3;
}

/* ============================================================
   TOP BAR - Dark blue/teal bar with contact info & flags
   ============================================================ */
.top-bar {
    background: var(--top-bar-bg);
    color: var(--top-bar-text);
    font-size: 13px;
    padding: 8px 0;
    position: relative;
    z-index: 1001;
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-bar-left span,
.top-bar-right span {
    font-size: 13px;
}

.flag-icon {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    vertical-align: middle;
}

.separator {
    opacity: 0.5;
    margin: 0 4px;
}

.lang-flags {
    display: flex;
    gap: 4px;
    margin-left: 15px;
}

.lang-flags img {
    width: 28px;
    height: 20px;
    cursor: pointer;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 2px;
    transition: var(--transition);
}

.lang-flags img:hover {
    border-color: #fff;
    transform: scale(1.1);
}

/* ============================================================
   MAIN HEADER - Logo & Navigation
   ============================================================ */
.main-header {
    background: var(--header-bg);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: inline-flex;
    align-items: center;
}

.header-logo {
    height: 70px;
    width: auto;
    object-fit: contain;
}

/* --- Main Navigation --- */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-item {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.nav-item > a,
a.nav-item {
    display: block;
    padding: 12px 22px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dark);
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.nav-item > a:hover,
a.nav-item:hover,
.nav-item.active > a,
a.nav-item.active {
    background: var(--nav-active-bg);
    color: #ffffff;
}

/* --- Dropdown --- */
.dropdown-nav {
    position: relative;
}

.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 220px;
    box-shadow: var(--shadow-md);
    border-top: 3px solid var(--primary-blue);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    z-index: 100;
}

.dropdown-nav:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-light);
}

.dropdown-content a:hover {
    background: var(--primary-blue);
    color: #ffffff;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

/* --- Language Selector --- */
.lang-select {
    margin-left: 15px;
    padding: 5px 10px;
    border: 1px solid var(--border-light);
    border-radius: 3px;
    font-size: 13px;
    color: var(--text-dark);
    background: #fff;
    cursor: pointer;
}

/* ============================================================
   PAGE BANNER - Full-width hero with breadcrumbs
   ============================================================ */
.page-banner {
    position: relative;
    height: 350px;
    background: url('output/pages/home/images/Issarapon-featured-pic-edited.jpg') center center / cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(90, 158, 181, 0.7), rgba(44, 62, 80, 0.6));
}

.banner-content {
    position: relative;
    z-index: 1;
    color: #ffffff;
}

.breadcrumb {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.breadcrumb a {
    color: #ffffff;
    font-weight: 500;
}

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

.banner-content h1 {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ============================================================
   PAGE LAYOUT - Content + Sidebar
   ============================================================ */
.page-main {
    padding: 60px 0;
    background: var(--bg-white);
}

.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

/* --- Content Area --- */
.content-area {
    min-width: 0;
}

.page-article {
    background: var(--bg-white);
}

.article-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-light);
}

.article-content {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-body);
}

.article-content h2 {
    font-size: 24px;
    color: var(--primary-blue);
    margin: 30px 0 15px;
}

.article-content h3 {
    font-size: 20px;
    color: var(--text-dark);
    margin: 25px 0 12px;
}

.article-content p {
    margin-bottom: 15px;
}

.article-content ul, .article-content ol {
    margin: 15px 0;
    padding-left: 25px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 15px 0;
}

.article-content a {
    color: var(--primary-blue);
    font-weight: 500;
}

.article-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}

.article-content table th,
.article-content table td {
    padding: 10px 15px;
    border: 1px solid var(--border-light);
    text-align: left;
}

.article-content table th {
    background: var(--primary-blue);
    color: #ffffff;
    font-weight: 600;
}

.article-content table tr:nth-child(even) {
    background: #f5f8fa;
}

/* WordPress Block Styles */
.article-content .wp-block-columns {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.article-content .wp-block-column {
    flex: 1;
}

.article-content .wp-block-image {
    margin: 15px 0;
}

.article-content .wp-block-image img {
    width: 100%;
}

.article-content .wp-block-image figcaption {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
}

.article-content .has-text-align-center {
    text-align: center;
}

.article-content blockquote {
    border-left: 4px solid var(--primary-blue);
    padding: 15px 20px;
    margin: 20px 0;
    background: #f5f8fa;
    font-style: italic;
    color: var(--text-dark);
}

/* --- Sidebar --- */
.sidebar {
    min-width: 0;
}

.widget {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    margin-bottom: 25px;
    padding: 20px;
    border-radius: 4px;
}

.widget-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-blue);
}

/* Search Widget */
.search-widget {
    display: flex;
    gap: 8px;
}

.search-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: 3px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--primary-blue);
}

.search-btn {
    padding: 10px 18px;
    background: var(--primary-blue);
    color: #ffffff;
    border: none;
    border-radius: 3px;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Calendar Widget */
.calendar-widget {
    text-align: center;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.calendar-table th {
    padding: 8px 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-light);
}

.calendar-table td {
    padding: 8px 4px;
    font-size: 13px;
    color: var(--text-body);
}

.calendar-table td.today {
    background: var(--primary-blue);
    color: #ffffff;
    border-radius: 50%;
    font-weight: 600;
}

/* ============================================================
   HOMEPAGE-SPECIFIC STYLES
   ============================================================ */
/* Hero Slider */
.hero-section {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #333;
}

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

.hero-slide.active {
    opacity: 1;
}

.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(90, 158, 181, 0.5), rgba(44, 62, 80, 0.4));
}

.hero-slide-content {
    position: absolute;
    bottom: 100px;
    left: 100px;
    color: #ffffff;
    z-index: 2;
    max-width: 600px;
}

.hero-slide-content .hero-flags {
    margin-bottom: 10px;
}

.hero-slide-content .hero-flags img {
    width: 24px;
    height: 18px;
    margin-right: 4px;
}

.hero-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.hero-heading {
    font-size: 52px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 25px;
    line-height: 1.1;
}

.hero-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #ffffff;
    color: var(--primary-blue);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.hero-btn:hover {
    background: var(--primary-blue);
    color: #ffffff;
}

/* Stats Section */
.stats-section {
    background: var(--primary-blue);
    padding: 50px 0;
}

.stats-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-item {
    color: #ffffff;
}

.stat-number {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* Info Cards Section */
.info-section {
    padding: 70px 0;
    background: var(--bg-light);
}

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

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

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.section-header p {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

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

.info-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.info-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

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

.info-card-body {
    padding: 25px;
}

.info-card-body h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.info-card-body p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--footer-bg);
    color: #ffffff;
}

.footer-top {
    padding: 50px 0 35px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.footer-logo-area {
    text-align: center;
}

.footer-logo {
    height: 50px;
    margin-bottom: 10px;
    filter: brightness(0) invert(1);
}

.footer-tagline {
    font-size: 14px;
    opacity: 0.7;
}

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

.footer-col h4 {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-blue);
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

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

.footer-col p {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
}

.footer-bottom {
    background: var(--footer-dark);
    padding: 18px 0;
}

.footer-bottom .footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

.footer-social {
    display: flex;
    gap: 10px;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #ffffff;
    font-size: 14px;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--primary-blue);
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    text-decoration: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
}

/* ============================================================
   RESPONSIVE DESIGN
   ============================================================ */
@media (max-width: 992px) {
    .page-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 2;
    }

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

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

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

    .hero-heading {
        font-size: 36px;
    }

    .hero-slide-content {
        left: 40px;
        bottom: 60px;
    }
}

@media (max-width: 768px) {
    .top-bar-inner {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-item > a,
    a.nav-item {
        padding: 8px 14px;
        font-size: 12px;
    }

    .banner-content h1 {
        font-size: 28px;
    }

    .page-banner {
        height: 250px;
    }

    .article-title {
        font-size: 22px;
    }

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

    .stats-inner {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .stat-number {
        font-size: 30px;
    }

    .hero-section {
        height: 400px;
    }

    .hero-heading {
        font-size: 28px;
    }

    .hero-slide-content {
        left: 20px;
        right: 20px;
        bottom: 40px;
    }

    .footer-bottom .footer-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .top-bar {
        font-size: 11px;
    }

    .nav-item > a,
    a.nav-item {
        padding: 6px 10px;
        font-size: 11px;
    }

    .hero-heading {
        font-size: 22px;
    }
}

/* ============================================================
   WORDPRESS BLOCK STYLES
   ============================================================ */
/* Text Colors */
.has-vivid-cyan-blue-color { color: var(--primary-blue) !important; }
.has-black-color { color: #000000 !important; }
.has-white-color { color: #ffffff !important; }

/* Font Sizes */
.has-large-font-size { font-size: 28px !important; line-height: 1.4; }
.has-medium-font-size { font-size: 18px !important; line-height: 1.6; }
.has-small-font-size { font-size: 13px !important; }

/* Block Separator */
.wp-block-separator {
    border: none;
    border-top: 2px solid var(--border-light);
    margin: 20px 0;
    opacity: 0.6;
}

.wp-block-separator.has-css-opacity {
    opacity: 0.4;
}

/* Block Code */
.wp-block-code {
    background: #f5f8fa;
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--primary-blue);
    padding: 20px;
    margin: 20px 0;
    border-radius: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    white-space: pre-wrap;
    overflow-x: auto;
}

/* Block Embed (YouTube etc.) */
.wp-block-embed {
    margin: 25px 0;
}

.wp-block-embed__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.wp-block-embed__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Block Image */
.wp-block-image {
    margin: 20px 0;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.wp-block-image figcaption {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

/* Block Quote */
.wp-block-quote {
    border-left: 4px solid var(--primary-blue);
    padding: 15px 20px;
    margin: 20px 0;
    background: #f5f8fa;
}

.wp-block-quote cite {
    display: block;
    margin-top: 10px;
    font-style: normal;
    font-weight: 600;
    color: var(--text-dark);
}

/* Block Columns */
.wp-block-columns {
    display: flex;
    gap: 20px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.wp-block-column {
    flex: 1;
    min-width: 200px;
}

/* Block Table */
.wp-block-table {
    margin: 20px 0;
    overflow-x: auto;
}

.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
}

.wp-block-table th,
.wp-block-table td {
    padding: 10px 15px;
    border: 1px solid var(--border-light);
    text-align: left;
}

.wp-block-table th {
    background: var(--primary-blue);
    color: #ffffff;
    font-weight: 600;
}

/* Block Gallery */
.wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.wp-block-gallery .wp-block-image {
    margin: 0;
}

.wp-block-gallery .wp-block-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Text alignment */
.has-text-align-center { text-align: center; }
.has-text-align-left { text-align: left; }
.has-text-align-right { text-align: right; }

/* WP Block List */
.wp-block-list {
    padding-left: 25px;
    margin: 15px 0;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-primary { color: var(--primary-blue); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }
.p-2 { padding: 2rem; }

/* ============================================================
   MOBILE MENU TOGGLE
   ============================================================ */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-dark);
    cursor: pointer;
    padding: 5px;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        background: #ffffff;
        border-top: 1px solid var(--border-light);
    }

    .main-nav.open {
        display: flex;
    }

    .nav-item > a,
    a.nav-item {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-light);
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border-top: none;
        transform: none;
        opacity: 1;
        visibility: visible;
        display: none;
    }

    .dropdown-nav.open .dropdown-content {
        display: block;
    }
}
/* --- Google Translate Cleanup --- */
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-icon,
.goog-te-gadget-simple span,
#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
}
body {
    top: 0px !important;
}
.goog-te-menu-value {
    display: none !important;
}
