/* ==========================================================================
   style.css — Unified stylesheet for Artist Educational Consult
   - Covers: homepage (index.php), post.php, and admin panel
   - Theme: refined white-blue frosted glass, accent = blue
   - Font: Poppins (clean, professional)
   - Footer: solid dark-blue (static)
   ========================================================================== */

/* Import font (Poppins). If your environment blocks Google Fonts, self-host and update accordingly. */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap');

:root{
  --bg-100: #f7fbff;
  --bg-200: #e8f4ff;
  --text-900: #06263a;
  --muted: #456074;
  --card-border: rgba(11,41,73,0.04);
  --glass: rgba(255,255,255,0.92);
  --glass-strong: rgba(255,255,255,0.98);
  --accent: #0d6efd; /* primary blue accent */
  --accent-2: #5b8cff;
  --accent-soft: rgba(13,110,253,0.08);
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-1: 0 8px 30px rgba(11,41,73,0.06);
  --shadow-2: 0 12px 40px rgba(11,41,73,0.09);
  --header-h: 80px;
  --nav-h: 48px;
  --max-width: 1200px;
  --container-padding: 20px;
  --ui-transition: 220ms ease;
  --footer-bg: #042b56; /* solid dark blue footer */
  --footer-text: #f4fbff;
  --reveal-duration: 520ms; /* slightly smoother reveal */
}

/* ============================
   Base / Reset
   ============================ */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html,body { height: 100%; }
html { scroll-behavior: smooth; }
body{
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  background: linear-gradient(180deg, var(--bg-200) 0%, var(--bg-100) 60%);
  color: var(--text-900);
  /* leave room for fixed header + nav */
  padding-top: calc(var(--header-h) + var(--nav-h));
  line-height: 1.6;
}

/* Utility container */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* Visually hidden helper */
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* Links/buttons */
a { color: var(--accent); text-decoration: none; transition: color var(--ui-transition), transform var(--ui-transition); }
a:hover { color: var(--accent-2); transform: translateY(-1px); }
button { font-family: inherit; cursor: pointer; }

/* Accessibility focus */
a:focus, button:focus, input:focus, textarea:focus {
  outline:none;
  box-shadow:0 6px 20px rgba(3,8,12,0.08), 0 0 0 3px rgba(13,110,253,0.08);
  border-radius:8px;
}

/* ============================
   Header (site-wide)
   ============================ */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  height: var(--header-h);
  width: 100%;
  z-index: 1000;
  background: var(--footer-bg); /* solid dark blue background */
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 30px;
  transition: box-shadow 320ms ease, transform 320ms ease;
}

/* Ensure header inner elements space correctly */
.header-inner {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: var(--max-width);
  padding: 0 var(--container-padding);
  transition: transform 320ms ease, opacity 320ms ease;
}

/* Brand */
.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: flex-start;
  min-width: 0; /* allow truncation */
  transition: transform 320ms ease, opacity 320ms ease;
}
.site-name {
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ffffff; /* visible white text on dark background */
  text-decoration: none;
}
.site-tagline {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.9);
  margin: 0;
  font-weight: 600;
}

/* Header-right: date/time + search */
.right-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  transition: transform 320ms ease;
}

/* Search box */
.search-box {
  position: relative;
  display: flex;
  align-items: center;
}
.search-box input {
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(11,41,73,0.06);
  padding: 8px 36px 8px 12px;
  border-radius: 999px;
  width: 220px;
  font-size: 0.95rem;
  color: #06263a;
  transition: box-shadow .22s ease, transform .18s ease;
}
.search-box input::placeholder { color: #7b8a95; }
.search-box input:focus {
  box-shadow: 0 8px 26px rgba(11,105,255,0.12);
  transform: translateY(-2px);
  outline: none;
}
.search-icon {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 14px;
  color: #0d3f66;
  cursor: pointer;
}

/* Datetime */
.datetime {
  font-size: 0.88rem;
  color: var(--text-900);
  background: var(--glass);
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
  font-weight: 600;
  text-align: center;
}

/* Menu toggle (mobile) */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 8px;
}
.menu-toggle:focus { outline: none; box-shadow: 0 6px 20px rgba(11,105,255,0.08); }

/* ============================
   Slim navigation bar
   ============================ */
.nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  height: var(--nav-h);
  z-index: 1550;
  background: linear-gradient(180deg, rgba(255,255,255,0.86), rgba(255,255,255,0.82));
  border-bottom: 1px solid rgba(11,41,73,0.03);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(11,41,73,0.03);
}
.nav .nav-links{
  display:flex;
  gap:18px;
  align-items:center;
  list-style:none;
  padding:6px 12px;
  max-width: 1000px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav .nav-links::-webkit-scrollbar{ display: none; }

/* Target anchors with explicit class used in index.php */
.nav .nav-links a,
.nav .nav-links a.nav-link {
  padding:6px 10px;
  border-radius:10px;
  font-weight:700;
  color: #0b3b60;
  font-size: 0.94rem;
  transition: all var(--ui-transition);
}
.nav .nav-links a:hover{ background: var(--accent-soft); transform: translateY(-3px); }
.nav .nav-links a.active, .nav .nav-links a.nav-link.active{ background: linear-gradient(90deg,var(--accent-2),var(--accent)); color: #fff; }

/* Make nav full-screen when JS toggles styles; fallback class */
.nav.fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  background: #002b55 !important;
  padding-top: 100px !important;
  z-index: 998 !important;
}
/* when fullscreen, center the links */
.nav.fullscreen .nav-links {
  display:flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 18px !important;
  height: 100% !important;
}

/* ============================
   Blog grid & cards (homepage)
   ============================ */
.blog-section { padding: 28px 0 80px; display:flex; justify-content:center; }
.blog-content-wrapper { width:100%; max-width: var(--max-width); padding: 0 var(--container-padding); }
.section-title {
  font-size: 1.9rem;
  color: var(--text-900);
  font-weight: 800;
  margin: 8px 0 18px;
  text-align:center;
}

/* Grid responsive */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Card / glass */
.glass {
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,251,255,0.96));
  border-radius: var(--radius-lg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-1);
  overflow: hidden;
  transition: transform var(--ui-transition), box-shadow var(--ui-transition), opacity 360ms ease, visibility 360ms ease;
}

/* Blog card specifics */
.blog-post {
  display:flex;
  flex-direction: column;
  height:100%;
  opacity: 0;
  transform: translateY(18px);
  will-change: transform, opacity;
  transition: opacity  var(--reveal-duration) ease, transform var(--reveal-duration) ease;
}
.blog-post.visible {
  opacity: 1;
  transform: translateY(0);
}
.blog-post img { width:100%; height:180px; object-fit:cover; display:block; }
.blog-content { padding:16px; display:flex; flex-direction:column; gap:10px; flex:1; }
.blog-content h3{ font-size:1.05rem; color: var(--text-900); margin:0; font-weight:700; }
.blog-date{ color:var(--muted); font-size:0.82rem; }
.excerpt{ color:#274a5b; font-size:0.95rem; flex:1; }
.read-more{
  display:inline-block;
  padding:8px 14px;
  border-radius:999px;
  background: linear-gradient(90deg,var(--accent),var(--accent-2));
  color:#fff;
  font-weight:700;
  text-decoration:none;
  align-self:flex-start;
  transition: transform var(--ui-transition), box-shadow var(--ui-transition);
}
.read-more:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(11,105,255,0.12); }

/* Hover card lift */
.blog-post:hover{ transform: translateY(-6px); box-shadow: var(--shadow-2); }

/* No-posts fallback */
.no-posts {
  text-align: center;
  padding: 28px;
  color: var(--muted);
  font-weight: 700;
}

/* Pagination */
.pagination { margin-top:20px; display:flex; justify-content:center; gap:8px; flex-wrap:wrap; padding:6px 0; }
.pagination button{
  background: transparent;
  border: 1px solid rgba(11,41,73,0.06);
  padding:8px 12px;
  border-radius:8px;
  cursor:pointer;
  font-weight:700;
}
.pagination button.active{
  background: linear-gradient(90deg,var(--accent),var(--accent-2));
  color:#fff;
  border:none;
}

/* Search results message */
.search-results-message{ text-align:center; margin:8px 0 12px; color:var(--muted); font-weight:600; }

/* ============================
   Post page (single article)
   - centered title, datetime right, no overlap
   ============================ */
.post-page .main-header .site-title h1 {
  color: #ffffff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.35rem;
  margin: 0;
  text-align: center;
  width: 100%;
}

/* Header layout: full width row with space for title & datetime */
.post-page .header-top {
  display: flex;
  justify-content: center; /* keeps title centered */
  align-items: center;
  position: relative;
  width: 100%;
  padding: 12px 20px;
  box-sizing: border-box;
}

/* datetime fixed safely to right side */
.post-page .header-top .header-right {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
}

/* Hide nav on post page */
.post-page .nav { display: none; }

/* Datetime style (same as homepage but compact) */
.post-page .datetime {
  font-size: 0.85rem;
  color: var(--text-900);
  background: var(--glass);
  border-radius: 6px;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.05);
  padding: 4px 8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Post content area */
.post-main {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px 80px;
  min-height: calc(100vh - 220px);
}

.post-wrapper {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 12px;
}

.single-post-container {
  background: linear-gradient(180deg, var(--glass-strong), rgba(248,253,255,0.96));
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-1);
  border: 1px solid var(--card-border);
}

.post-title {
  font-size: 1.9rem;
  color: var(--text-900);
  text-align: center;
  font-weight: 800;
  margin-bottom: 8px;
}

.post-image img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 18px;
  display: block;
}

.post-content {
  color: #123046;
  font-size: 1rem;
  line-height: 1.8;
}

.post-content h4 {
  color: #0a4a99;
  margin-top: 20px;
}

.post-actions {
  text-align: center;
  margin-top: 20px;
}

.back-home {
  display: inline-block;
  padding: 10px 18px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(11, 105, 255, 0.08);
}

/* ============================
   Admin panel styles (upload form, list, inputs, buttons)
   - Keep admin UI clean and aligned with main theme
   ============================ */
.admin-wrap { width:100%; max-width:1100px; margin: 20px auto; padding: 20px; }
.admin-card {
  background: linear-gradient(180deg, var(--glass), rgba(255,255,255,0.98));
  border-radius: 12px;
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-1);
  padding: 20px;
}
.admin-card h2 { font-size:1.25rem; color:var(--text-900); margin-bottom:12px; }
.form-row { display:flex; gap:12px; margin-bottom:12px; flex-wrap:wrap; }
.form-field { flex:1; min-width:200px; display:flex; flex-direction:column; gap:8px; }
label { font-weight:600; color:var(--muted); font-size:0.9rem; }
input[type="text"], input[type="file"], textarea, select {
  padding:10px 12px;
  border-radius:8px;
  border: 1px solid rgba(11,41,73,0.06);
  background: rgba(255,255,255,0.98);
  font-size:0.95rem;
  color:var(--text-900);
  width:100%;
}
textarea { min-height:160px; resize:vertical; }
.admin-actions { display:flex; gap:12px; justify-content:flex-end; margin-top:8px; }
.btn {
  padding:10px 16px;
  border-radius:10px;
  font-weight:700;
  border:none;
  background: linear-gradient(90deg,var(--accent),var(--accent-2));
  color:#fff;
  cursor:pointer;
  transition: transform var(--ui-transition), box-shadow var(--ui-transition);
}
.btn.secondary {
  background: transparent;
  color: var(--text-900);
  border: 1px solid rgba(11,41,73,0.06);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(11,105,255,0.08); }

/* Admin list (uploaded posts preview) */
.upload-list { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap:14px; margin-top:16px; }
.upload-card { padding:12px; border-radius:10px; background:rgba(255,255,255,0.96); border:1px solid rgba(11,41,73,0.04); box-shadow: 0 6px 18px rgba(11,41,73,0.04); }
.upload-card h4 { font-size:1rem; margin-bottom:6px; }
.upload-card small { color:var(--muted); }

/* ============================
   WhatsApp float (global)
   ============================ */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 999;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.whatsapp-float img {
  width: 35px;
  height: 35px;
}

/* ============================
   Footer (solid dark blue, static)
   ============================ */
.site-footer {
  margin-top: 40px;
  padding: 36px 20px;
  text-align: center;
  color: var(--footer-text);
  background: var(--footer-bg);
  border-top: none;
}
.footer-container { display:flex; flex-wrap:wrap; justify-content:center; gap:20px; margin-bottom:14px; }
.footer-about, .footer-contact { max-width: 360px; color: var(--footer-text); }
.footer-about h3, .footer-contact h3 { color: var(--footer-text); margin-bottom:8px; }
.footer-bottom { margin-top: 8px; padding-top: 6px; color: rgba(255,255,255,0.85); font-size:0.95rem; }

/* Footer links */
.site-footer a { color: #cfe6ff; }
.site-footer a:hover { color: #ffffff; }

/* ============================
   Animations & reveal helpers
   ============================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in-up { animation: fadeInUp var(--reveal-duration) ease forwards; }

/* Provide a small utility to mark visible cards */
.blog-post.fade-in-up,
.blog-post.visible { animation: fadeInUp var(--reveal-duration) ease forwards; }

/* ============================
   Misc utilities & responsive
   ============================ */
.hidden { display:none !important; }
.center { text-align:center; }

/* ============================= */
/* 📱 RESPONSIVE MEDIA QUERIES   */
/* ============================= */

/* ========== TABLET (≤1024px) ========== */
@media (max-width: 1024px){
  .blog-post img { height:180px; }
  .post-title { font-size:1.6rem; }
  .admin-wrap { padding:12px; }
  .header-top { padding: 0 16px; }
  .nav .nav-links a { font-size:0.92rem; }
}

/* ========== SMALL TABLET (≤768px) ========== */
@media (max-width: 768px){
  body { padding-top: calc(var(--header-h) + 10px); }

  header {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    padding:8px 14px;
  }

  .site-logo { flex:1; }

  .menu-toggle {
    display:inline-flex;
    font-size:1.4rem;
    color:#fff;
    margin-left:8px;
  }

  .search-form {
    flex:1;
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:6px;
  }

  .search-form input {
    width:100%;
    max-width:150px;
    font-size:0.9rem;
  }

  .datetime {
    font-size:0.8rem;
    opacity:0.85;
    display:block;
    width:100%;
    text-align:center;
    margin-top:4px;
  }

  /* Mobile nav is hidden until toggled by JS; .nav.active or .nav.fullscreen set by JS */
  .nav { display:none; }
  .nav.active { display:block; }
  .nav .nav-links {
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
    padding:12px;
  }
  .nav .nav-links a {
    font-size:0.9rem;
    padding:4px 0;
  }

  .blog-grid { grid-template-columns:1fr; }
  .post-main { padding:28px 12px 80px; }
  .single-post-container { padding:18px; }
}

/* ========== PHONES (≤467px) ========== */
@media (max-width: 467px) {
  header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 12px;
    background: var(--header-bg, #003366);
    position: relative;
    z-index: 10;
  }

  .header-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .brand {
    text-align: center;
    width: 100%;
  }

  .site-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    display: block;
    margin-bottom: 2px;
    line-height: 1.2;
  }

  .site-tagline {
    font-size: 0.7rem;
    color: #dfe6f2;
    text-align: center;
    margin: 0;
    line-height: 1.1;
  }

  .datetime {
    font-size: 0.75rem;
    color: #e8ecf5;
    text-align: center;
    width: 100%;
    margin-top: 3px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.08);
    padding: 4px 0;
    border-radius: 4px;
    opacity: 0.95;
  }

  .right-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 6px;
    margin-top: 6px;
  }

  .search-box {
    display: flex;
    align-items: center;
    flex: 1;
    background: #f8f9fb;
    border-radius: 6px;
    padding: 4px 6px;
  }

  .search-box input {
    flex: 1;
    border: none;
    outline: none;
    min-width: 130px;
    max-width: 180px;
    font-size: 0.8rem;
    padding: 4px;
    border-radius: 4px;
    background: transparent;
    color: #003366;
  }

  .search-icon {
    font-size: 0.9rem;
    padding: 4px 7px;
    background: #fff;
    border-radius: 4px;
    color: #003366;
    border: none;
    cursor: pointer;
  }

  .menu-toggle {
  font-size: 1.3rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.menu-toggle.active {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.35);
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.25);
}

  .nav {
    display: none;
    width: 100%;
    background: #00264d;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 10px;
  }

  .nav-link,
  .nav-links a {
    font-size: 0.78rem;
    color: #fff;
    text-transform: uppercase;
    text-decoration: none;
    padding: 5px 8px;
  }
  
  .show-nav {
  display: block !important;
}

  .main-header {
    min-height: 180px;
  }

  .whatsapp-float {
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
}

/* ==========================================================================
   End of style.css
   ========================================================================== */
