/* =========================================
   KORACOL.COM — Global Stylesheet
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

:root {
  --primary:   #1a3c5e;
  --accent:    #e8732a;
  --light:     #f7f4ef;
  --white:     #ffffff;
  --text:      #1e1e1e;
  --muted:     #6b7280;
  --border:    #e2ddd6;
  --radius:    8px;
  --max-width: 860px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--light);
  color: var(--text);
  font-size: 17px;
  line-height: 1.75;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--accent); }

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

/* ── HEADER ── */
header {
  background: var(--primary);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  white-space: nowrap;
}

.logo img {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

nav a {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
}

nav a:hover { background: rgba(255,255,255,0.12); color: var(--white); }

/* Tools dropdown */
.dropdown { position: relative; }

.dropdown-toggle {
  color: rgba(255,255,255,0.85);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: background 0.2s;
}
.dropdown-toggle:hover { background: rgba(255,255,255,0.12); color: var(--white); }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 200px;
  z-index: 200;
  overflow: hidden;
}

.dropdown:hover .dropdown-menu,
.dropdown-menu:hover { display: block; }

.dropdown-menu a {
  display: block;
  color: var(--text);
  padding: 10px 16px;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
}

.dropdown-menu a:last-child { border-bottom: none; }
.dropdown-menu a:hover { background: var(--light); color: var(--accent); }

/* ── BREADCRUMB ── */
.breadcrumb {
  max-width: var(--max-width);
  margin: 20px auto 0;
  padding: 0 20px;
  font-size: 0.82rem;
  color: var(--muted);
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 6px; }

/* ── MAIN CONTENT ── */
main {
  max-width: var(--max-width);
  margin: 32px auto 60px;
  padding: 0 20px;
}

/* ── HERO IMAGE ── */
.hero-image {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 28px;
  background: linear-gradient(135deg, var(--primary) 0%, #2d6a9f 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.1rem;
  font-family: 'Playfair Display', serif;
  position: relative;
}

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

.hero-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, #2a6496 60%, var(--accent) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 28px;
  font-family: 'Playfair Display', serif;
  text-align: center;
  padding: 20px;
}

.hero-placeholder .icon { font-size: 3rem; margin-bottom: 12px; }
.hero-placeholder p { font-size: 1rem; opacity: 0.8; margin-top: 6px; font-family: 'DM Sans', sans-serif; }

/* ── TYPOGRAPHY ── */
h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.25;
  color: var(--primary);
  margin-bottom: 10px;
}

h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: var(--primary);
  margin: 36px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 20px 0 8px;
}

p { margin-bottom: 16px; }

.last-updated {
  font-style: italic;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 22px;
}

strong { color: var(--primary); }

/* ── BULLET LISTS ── */
ul, ol {
  padding-left: 22px;
  margin-bottom: 18px;
}

ul li, ol li {
  margin-bottom: 8px;
  padding-left: 4px;
}

/* ── TABLES ── */
.table-wrap { overflow-x: auto; margin: 24px 0; border-radius: var(--radius); border: 1px solid var(--border); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

thead { background: var(--primary); color: var(--white); }
thead th { padding: 12px 16px; text-align: left; font-weight: 600; }

tbody tr:nth-child(even) { background: #f0ebe3; }
tbody tr:hover { background: #e8e0d5; }
tbody td { padding: 11px 16px; border-bottom: 1px solid var(--border); }

/* ── TIPS / HIGHLIGHT BOX ── */
.tip-box {
  background: #fff8f2;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin: 24px 0;
}

.tip-box strong { color: var(--accent); }

/* ── CTA BOTTOM ── */
.cta-bottom {
  background: var(--primary);
  color: var(--white);
  border-radius: 12px;
  padding: 24px 28px;
  margin-top: 40px;
  text-align: center;
}

.cta-bottom a { color: var(--accent); font-weight: 600; }
.cta-bottom a:hover { text-decoration: underline; }

/* ── HOMEPAGE HERO ── */
.home-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1e5490 100%);
  color: var(--white);
  padding: 60px 24px;
  text-align: center;
}

.home-hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--white);
  margin-bottom: 16px;
}

.home-hero p {
  font-size: 1.1rem;
  opacity: 0.88;
  max-width: 600px;
  margin: 0 auto 28px;
}

.home-hero a.btn {
  background: var(--accent);
  color: var(--white);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s;
}

.home-hero a.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(232,115,42,0.4); color: var(--white); }

/* ── CATEGORY CARDS (homepage) ── */
.categories {
  max-width: 1100px;
  margin: 50px auto;
  padding: 0 20px;
}

.categories h2 {
  font-family: 'Playfair Display', serif;
  text-align: center;
  font-size: 1.7rem;
  margin-bottom: 30px;
  color: var(--primary);
  border: none;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.cat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.cat-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.09); }
.cat-card .emoji { font-size: 2.4rem; margin-bottom: 10px; }
.cat-card span { font-weight: 600; color: var(--primary); font-size: 0.95rem; }

/* ── FEATURED ARTICLES (homepage) ── */
.featured {
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

.featured h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  margin-bottom: 24px;
  color: var(--primary);
  border: none;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.article-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.09); }

.article-card-thumb {
  height: 160px;
  background: linear-gradient(135deg, var(--primary), #2d6a9f);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.article-card-body { padding: 18px; }
.article-card-body h3 { font-size: 1rem; color: var(--primary); margin: 0 0 8px; line-height: 1.4; }
.article-card-body p { font-size: 0.85rem; color: var(--muted); margin: 0 0 12px; }
.article-card-body a { font-size: 0.85rem; font-weight: 600; color: var(--accent); }

/* ── BLOG INDEX ── */
.blog-list { list-style: none; padding: 0; }
.blog-list li {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  counter-increment: blog-counter;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.blog-list li::before {
  content: counter(blog-counter) ".";
  font-weight: 700;
  color: var(--accent);
  min-width: 28px;
}

.blog-list { counter-reset: blog-counter; }
.blog-list a { font-weight: 500; font-size: 1rem; }
.blog-list a:hover { color: var(--accent); }

/* ── TOOLS PAGE ── */
.tool-box {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  margin: 24px 0;
}

.tool-box label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--primary);
}

.tool-box input,
.tool-box select,
.tool-box textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  margin-bottom: 14px;
  background: var(--light);
  color: var(--text);
  transition: border-color 0.2s;
}

.tool-box input:focus,
.tool-box select:focus { border-color: var(--primary); outline: none; }

.tool-box button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 11px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.tool-box button:hover { background: var(--accent); transform: translateY(-1px); }

.tool-result {
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 16px;
  font-size: 0.95rem;
  min-height: 60px;
  display: none;
}

.tool-result.visible { display: block; }

/* ── CONTACT FORM ── */
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  margin-bottom: 16px;
  background: var(--white);
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--primary); outline: none; }

.contact-form textarea { min-height: 140px; resize: vertical; }

.contact-form button {
  background: var(--primary);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.contact-form button:hover { background: var(--accent); }

/* ── FOOTER ── */
footer {
  background: var(--primary);
  color: rgba(255,255,255,0.75);
  padding: 20px 24px;
  text-align: center;
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 4px;
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255,255,255,0.75);
  padding: 2px 8px;
}

.footer-links a:hover { color: var(--accent); }
.footer-links span { opacity: 0.4; }

/* ── ABOUT ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 24px 0;
}

.about-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
}

.about-card .icon { font-size: 1.8rem; margin-bottom: 10px; }
.about-card h3 { font-size: 1rem; margin-bottom: 6px; color: var(--primary); }
.about-card p { font-size: 0.9rem; color: var(--muted); margin: 0; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .header-inner { height: auto; padding: 12px 0; flex-wrap: wrap; gap: 10px; }
  nav { gap: 2px; }
  nav a { padding: 5px 8px; font-size: 0.8rem; }
  .about-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.5rem; }
}
