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

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Sarabun', sans-serif;
}

body {
    font-size: 14px;
    font-family: 'Sarabun', sans-serif;
    /* font-weight: 200; */
    background-color: #f9f9fa;
}

h2 {
    font-size: 24px;
    color: #fff;
    font-weight: bold;
    margin: 0;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
}

/* Header */
header {
    background-color: #fff;
    height: 80px;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 160px;
    position: relative;
}

.logo-nav {
    display: flex;
    align-items: center;
    gap: 66px;
}

.logo {
    height: 42px;
    position: relative;
}

.logo-top {
    height: 26px;
    width: 123px;
    background-color: #67568C;
    margin-bottom: 5px;
}

.logo-middle {
    height: 4px;
    width: 123px;
    background-color: #000;
    margin: 3px 0;
}

.logo-line {
    width: 123px;
    height: 1px;
    background-color: #000;
}

/* Desktop Navigation */
.desktop-nav ul {
    display: flex;
    list-style: none;
    gap: 16px;
}

.desktop-nav li {
    padding: 8px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
}

.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.hamburger-btn:hover {
    background-color: #f8f8f8;
}

.hamburger-btn:active {
    background-color: #f0f0f0;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background-color: #000;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-top: 1px solid #eee;
    z-index: 99;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.mobile-nav.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.mobile-nav-link {
    display: block;
    padding: 16px 20px;
    text-decoration: none;
    color: #000;
    font-weight: 500;
    font-size: 16px;
    transition: background-color 0.3s ease;
    position: relative;
}

.mobile-nav-link:hover {
    background-color: #f8f8f8;
    color: #67568C;
}

.mobile-nav-link:active {
    background-color: #f0f0f0;
}

.mobile-nav-link.external-link {
    color: #67568C;
}

.mobile-nav-link.external-link::after {
    content: "↗";
    margin-left: 8px;
    font-size: 14px;
}

/* Legacy nav styles - keeping for backward compatibility */
nav ul {
    display: flex;
    list-style: none;
    gap: 16px;
}

nav li {
    padding: 8px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

ul
{
    list-style-type: none;
}

ul.definition-list {
    list-style: none; /* Or none, or your preferred list style */
    padding-left: 20px; /* Adjust default list indentation if needed */
}

ul.definition-list li {
    display: flex;
    margin-bottom: 1.5em;
    align-items: baseline;
}

ul.definition-list .term {
    flex: 0 0 260px;
    font-weight: bold;
    padding-right: 5em;
    word-break: break-word;
}

ul.definition-list .subterm {
    flex: 0 0 260px;
    font-weight: bold;
    padding-right: 0em;
    word-break: break-word;
}

ul.definition-list .definition {
    flex: 1 1 auto; /* Allow definition to grow and shrink */
    /* Definitions will now start at the same horizontal position */
}

/* nav li.dropdown::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 8px;
    background-color: #000;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    margin-left: 8px;
} */

.auth-buttons {
    display: flex;
    gap: 16px;
}

.btn {
    padding: 8px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: inline-block;
    text-align: center;
}

.btn-outline {
    background-color: transparent;
    color: #67568C;
    border: 1.5px solid #67568C;
}

.btn-primary {
    background-color: #67568C;
    color: #f9f9fa;
    border: none;
}

.btn-yellow {
    background-color: #f4c542;
    color: #000;
    border: none;
}

/* Hero Section */
.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0;
    max-width: 1121px;
    margin: 0 auto;
    gap: 127px;
}

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

.hero-title {
    margin-bottom: 246px;
}

.hero-title h1 {
    font-size: 66px;
    line-height: 1.2;
    margin-bottom: 45px;
}

.subtitle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 45px;
}

.subtitle-line {
    flex: 1;
    height: 2px;
    background-color: #000;
}

.subtitle h2 {
    font-size: 24px;
    white-space: nowrap;
}

.hero-description {
    font-size: 16px;
    line-height: 1.5;
    color: #000;
}

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

.button-group {
    width: 256px;
}

.button-group .btn {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 8px;
}

.button-description {
    font-size: 14px;
    color: #000;
    text-align: center;
}

.hero-image {
    flex: 1;
    max-width: 448px;
}

.hero-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Tools Section */
.tools-section {
    padding: 60px 160px;
}

.tools-header {
    width: 256px;
    height: 216px;
    background-color: #67568C;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);
}

.tools-header-icon {
    width: 96px;
    height: 96px;
    margin-bottom: 8px;
}

.tools-header-title {
    color: #f9f9fa;
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
}

.tools-grid {
    display: flex;
    gap: 32px;
    margin-bottom: 40px;
}

.tool-card {
    width: 256px;
    height: 216px;
    background-color: #fff;
    border-radius: 8px;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);
}

.tool-number {
    font-size: 64px;
    font-weight: 700;
    color: #67568C;
    font-family: 'Tahoma', sans-serif;
    margin-bottom: 24px;
    text-align: center;
}

.tool-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    text-align: center;
}

.tool-description {
    font-size: 14px;
    text-align: center;
    padding: 0 16px;
    line-height: 1.5;
}

.citation-box {
    background-color: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);
}

.citation-title {
    font-size: 24px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.citation-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.citation-text {
    font-size: 14px;
}

/* Books Section */
.books-section {
    padding: 60px 160px;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.4px;
}

.books-grid {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.book-card {
    width: 352px;
    height: 416px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);
}

.book-image {
    width: 100%;
    height: 176px;
    background-color: #333;
    background-size: cover;
    background-position: center;
}

.book-info {
    padding: 24px;
}

.book-info-content {
    margin-bottom: 32px;
}

.book-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.book-author, .book-year {
    font-size: 14px;
    margin-bottom: 8px;
}

.book-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.book-tag {
    background-color: #f7df9e;
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 12px;
}

.book-button {
    display: flex;
    justify-content: flex-end;
}

/* Partners Section */
.partners-section {
    padding: 60px 160px;
    background-color: #fff;
}

/* Account Section */
.account-section {
    padding: 60px 160px;
    display: flex;
    gap: 32px;
}

.account-card, .contribute-card {
    width: 100%; /* 544px; */
    /* height: 200px; */
    background-color: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.25);
    display: flex;
}

.account-content {
    display: flex;
    gap: 88px;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.account-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.4px;
}

.account-description {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.account-benefits {
    margin-top: 8px;
}

.benefits-title {
    font-size: 14px;
    font-weight: 700;
    color: #67568C;
    margin-bottom: 16px;
}

.benefits-description {
    font-size: 14px;
    line-height: 1.5;
}

.account-icon-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

.account-icon {
    width: 80px;
    height: 80px;
    background-color: #67568C;
    border-radius: 50%;
}

.contribute-content {
    display: flex;
    flex-direction: column;
}

.contribute-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: -0.4px;
}

.contribute-description {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: auto;
}

.contribute-button {
    align-self: flex-end;
}

/* Sponsors Section */
.sponsors {
    background-color: #fff;
    border-top: 1px solid #bdbdbd;
    padding: 24px 448px;
    text-align: center;
}

.sponsors-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 24px;
}

.sponsors-logos {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.sponsor-logo {
    width: 160px;
    height: 160px;
    background-color: #333;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Footer */
footer {
    background: linear-gradient(to right, #67568C, rgba(60, 42, 78, 0.9), #67568C);
    padding: 24px 160px;
    color: #f9f9fa;
}

.footer-content {
    display: flex;
    justify-content: space-between;
}

.footer-logo-info {
    width: 352px;
}

.footer-logo {
    margin-bottom: 16px;
}

.footer-info {
    margin-bottom: 10px;
    font-size: 14px;
}

.footer-contact {
    width: 352px;
}

.contact-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.contact-item {
    display: flex;
    gap: 20px;
    margin-bottom: 14px;
    font-size: 14px;
}

.contact-icon {
    width: 32px;
    height: 32px;
    color: #f9f9fa;
}

.contact-text {
    width: 240px;
}

.footer-map {
    width: 352px;
    height: 192px;
    background-color: #333;
    background-size: cover;
    background-position: center;
}

.footer-gradient {
    width: 100%;
    background: linear-gradient(90deg, #675693 0%, #603f7d 75%, #675693 100%);
    border-top: 1px solid #bdbdbd;
    color: #f9f9fa;
    padding: 0;
  }
  .footer-container {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 32px;
    padding: 24px 0;
    align-items: flex-start;
  }
  .footer-col {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
  }
  .footer-logo {
    width: 194px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 8px;
  }
  .footer-info div {
    color: #f9f9fa;
    font-size: 1rem;
    margin-bottom: 4px;
  }
  .footer-contact-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 8px;
    color: #f9f9fa;
  }
  .footer-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
    color: #f9f9fa;
    font-size: 1rem;
    word-break: break-word;
  }
  .footer-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(0) invert(1);
  }
  .footer-map {
    width: 100%;
    max-width: 352px;
    height: 192px;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
  }
  @media (max-width: 900px) {
    .footer-container {
      flex-direction: column;
      gap: 24px;
      padding: 24px 16px;
    }
    .footer-map {
      max-width: 100%;
      height: 160px;
    }
  }

/* Responsive */
@media (max-width: 1440px) {
    .header-content, .hero, .tools-section, .books-section, .account-section, footer {
        padding-left: 40px;
        padding-right: 40px;
    }
    
    .sponsors {
        padding-left: 120px;
        padding-right: 120px;
    }
}

@media (max-width: 1200px) {
    .hero {
        flex-direction: column;
        gap: 60px;
    }
    
    .tools-grid, .books-grid {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .account-section {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-content {
        flex-wrap: wrap;
        gap: 40px;
    }
}

@media (max-width: 900px) {
    /* Show hamburger menu on tablets and smaller */
    .desktop-nav {
        display: none;
    }
    
    .hamburger-menu {
        display: block;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 20px;
    }
    
    .logo-nav {
        gap: 20px;
    }
    
    /* Hide desktop navigation on mobile */
    .desktop-nav {
        display: none;
    }
    
    /* Show hamburger menu on mobile */
    .hamburger-menu {
        display: block;
    }
    
    /* Legacy nav styles - hide on mobile */
    nav ul {
        display: none;
    }
    
    .hero, .tools-section, .books-section, .account-section {
        padding: 40px 20px;
    }
    
    .hero-content {
        gap: 60px;
    }
    
    .hero-title h1 {
        font-size: 36px;
        text-align: center;
    }
    
    .subtitle {
        flex-direction: column;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-image {
        width: 100%;
        height: 300px;
    }
    
    .sponsors {
        padding: 24px 20px;
    }
    
    .sponsors-logos {
        flex-direction: column;
        align-items: center;
    }
    
    footer {
        padding: 24px 20px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-logo-info, .footer-contact, .footer-map {
        width: 100%;
    }
}

.writing-type-title {
  font-weight: bold;
  text-decoration: underline;
  margin-bottom: 8px;
  color: #000;
  display: block;
}
.writing-type-list > li {
  margin-bottom: 14px;
  display: block;
}
.writing-type-list ul {
  margin-left: 32px;
  margin-top: 0;
  padding-left: 20px;
  list-style: disc;
  display: block;
}

.expandable-section {
  margin-bottom: 0px;
}
.expandable-header {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
}
.expandable-arrow {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  font-size: 18px;
  margin-left: 8px;
}
.expandable-arrow.down {
  transform: rotate(0deg);
}
.expandable-arrow.up {
  transform: rotate(180deg);
}
.expandable-content {
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1), padding 0.35s cubic-bezier(0.4,0,0.2,1);
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  display: block !important;
}
.expandable-content.expanded {
  max-height: 1000px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.definition-list .definition .expandable-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.definition-list .definition .expandable-header {
  width: 100%;
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 8px;
}
.definition-list .definition .writing-type-list {
  width: 100%;
  margin-top: 8px;
}

.search-tab {
    flex: 1;
    background: #B0A7C3;
    color: #fff;
    font-weight: 500;
    font-size: 12px;
    border-radius: 8px 8px 0 0;
    text-align: center;
    padding: 12px 0;
}

.search-tab.active {
    background: #67568C;
}
