/* ==========================================================================
   ESMO ART ACADEMY – FINAL DRAFT DESIGN SYSTEM
   Font: Quicksand (Google Fonts)
   Palette: #F7F1F0, #C3A6A0, #A15C38, #3C2415, #F7941D, #262220
   ========================================================================== */

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

:root {
  --bg-primary: #F7F1F0;
  --bg-surface: #FFFFFF;
  --bg-subtle: #F1EAE8;
  --color-clay: #C3A6A0;
  --color-terracotta: #A15C38;
  --color-walnut: #3C2415;
  --color-ochre: #F7941D;
  --color-charcoal: #262220;
  --color-muted: #7A726D;
  --border-fine: rgba(60, 36, 21, 0.10);
  --border-accent: rgba(161, 92, 56, 0.28);
  --shadow-soft: 0 8px 30px rgba(60, 36, 21, 0.05);
  --shadow-card: 0 14px 40px rgba(60, 36, 21, 0.08);
  --shadow-hover: 0 20px 50px rgba(60, 36, 21, 0.14);
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  color: var(--color-charcoal);
  font-family: 'Quicksand', sans-serif;
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

button, input, select, textarea {
  font-family: 'Quicksand', sans-serif;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ==========================================================================
   NAVIGATION & HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(247, 241, 240, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-fine);
  transition: var(--transition);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 20px rgba(60, 36, 21, 0.04);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-logo {
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.footer-logo {
  height: 44px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
}

.desktop-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-walnut);
  letter-spacing: 0.04em;
  padding: 0.4rem 0;
  position: relative;
}

.desktop-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--color-terracotta);
  transition: width 0.25s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--color-terracotta);
}

.desktop-nav a:hover::after,
.desktop-nav a.active::after {
  width: 100%;
}

/* Gallery Dropdown Menu */
.has-dropdown {
  position: relative;
}

.has-dropdown > a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.dropdown-arrow {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  margin-top: -3px;
  transition: transform 0.25s ease;
}

.has-dropdown:hover .dropdown-arrow {
  transform: rotate(-135deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-fine);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 0.6rem 0;
  min-width: 220px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1050;
}

.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(4px);
}

.dropdown-menu li a {
  display: block;
  padding: 0.6rem 1.25rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-walnut);
  white-space: nowrap;
  transition: all 0.2s ease;
}

.dropdown-menu li a:hover {
  background: var(--bg-subtle);
  color: var(--color-terracotta);
  padding-left: 1.5rem;
}

.dropdown-menu li a::after {
  display: none !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Sleek Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary {
  background-color: var(--color-terracotta);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--color-walnut);
  box-shadow: 0 6px 18px rgba(161, 92, 56, 0.25);
  transform: translateY(-1px);
}

.btn-outline {
  border-color: var(--color-terracotta);
  color: var(--color-terracotta);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--color-terracotta);
  color: #FFFFFF;
}

.btn-ochre {
  background-color: var(--color-ochre);
  color: #FFFFFF;
  font-weight: 700;
}

.btn-ochre:hover {
  background-color: #E28315;
  box-shadow: 0 6px 18px rgba(247, 148, 29, 0.3);
  transform: translateY(-1px);
}

.btn-login {
  background-color: #3C2415 !important;
  color: #FFFFFF !important;
  font-weight: 700;
  border: 1px solid #3C2415;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 14px rgba(60, 36, 21, 0.22);
  transition: var(--transition);
}

.btn-login:hover {
  background-color: #55331E !important;
  border-color: #55331E !important;
  color: #FFFFFF !important;
  box-shadow: 0 6px 20px rgba(60, 36, 21, 0.35);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
}

/* Mobile Hamburger */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-walnut);
  margin: 5px 0;
  transition: var(--transition);
}

/* Mobile Drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  height: 100%;
  background-color: var(--bg-surface);
  z-index: 2000;
  padding: 2.5rem 1.75rem;
  box-shadow: -10px 0 30px rgba(60, 36, 21, 0.15);
  transition: right 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.mobile-drawer.open {
  right: 0;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(38, 34, 32, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.mobile-overlay.open {
  opacity: 1;
  visibility: visible;
}

.drawer-close {
  align-self: flex-end;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--color-walnut);
  cursor: pointer;
  margin-bottom: 2rem;
}

.mobile-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-nav-list a {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-walnut);
  display: block;
}

.mobile-nav-list a:hover {
  color: var(--color-terracotta);
}

/* ==========================================================================
   PAGE HERO & HEADERS
   ========================================================================== */
.page-hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
  position: relative;
}

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(161, 92, 56, 0.08);
  border: 1px solid var(--border-accent);
  color: var(--color-terracotta);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.pill-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-ochre);
}

.hero-headline {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-walnut);
  line-height: 1.2;
  margin-bottom: 1.25rem;
  letter-spacing: -0.01em;
}

.hero-headline em {
  font-style: normal;
  color: var(--color-terracotta);
}

.hero-subhead {
  font-size: 1.15rem;
  color: var(--color-muted);
  max-width: 680px;
  margin: 0 auto 2.25rem;
  font-weight: 400;
  line-height: 1.8;
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-fine);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-accent);
}

.card-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-terracotta);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-walnut);
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.card-desc {
  font-size: 0.92rem;
  color: var(--color-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   HOMEPAGE SPECIFIC SECTIONS
   ========================================================================== */
.editorial-intro {
  padding: 4.5rem 0;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-fine);
  border-bottom: 1px solid var(--border-fine);
}

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: center;
}

.framed-visual {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-fine);
  background-color: #FFFFFF;
}

.framed-visual img {
  width: 100%;
  height: auto;
  transition: transform 0.6s ease;
}

.framed-visual:hover img {
  transform: scale(1.03);
}

.framed-caption {
  padding: 1rem 1.5rem;
  background: #FFFFFF;
  border-top: 1px solid var(--border-fine);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-walnut);
}

/* ==========================================================================
   GALLERY FILTER & LIGHTBOX
   ========================================================================== */
.filter-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 3rem;
}

.filter-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-fine);
  border-radius: var(--radius-pill);
  padding: 0.55rem 1.4rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--color-walnut);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  border-color: var(--color-terracotta);
  color: var(--color-terracotta);
}

.filter-btn.active {
  background-color: var(--color-terracotta);
  border-color: var(--color-terracotta);
  color: #FFFFFF;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.gallery-item {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-fine);
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.gallery-thumb {
  position: relative;
  width: 100%;
  padding-top: 75%;
  overflow: hidden;
  background-color: var(--bg-subtle);
}

.gallery-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-thumb img {
  transform: scale(1.05);
}

.gallery-info {
  padding: 1.25rem 1.5rem;
}

.gallery-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-walnut);
  margin-bottom: 0.25rem;
}

.gallery-meta {
  font-size: 0.82rem;
  color: var(--color-muted);
}

/* ==========================================================================
   STUDENT PORTAL (MY PROFILE)
   ========================================================================== */
.portal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  margin: 3rem 0 6rem;
}

.portal-sidebar {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-fine);
  padding: 1.75rem;
  height: fit-content;
  box-shadow: var(--shadow-soft);
}

.user-profile-badge {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-fine);
  margin-bottom: 1.5rem;
}

.user-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--bg-subtle);
  border: 2px solid var(--color-clay);
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--color-terracotta);
}

.portal-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.portal-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  text-align: left;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-walnut);
  cursor: pointer;
  transition: var(--transition);
}

.portal-nav-btn:hover {
  background-color: var(--bg-subtle);
  color: var(--color-terracotta);
}

.portal-nav-btn.active {
  background-color: var(--color-terracotta);
  color: #FFFFFF;
}

.portal-content-pane {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-fine);
  padding: 2.5rem;
  box-shadow: var(--shadow-soft);
  min-height: 500px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-fine);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.75rem;
  text-align: left;
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-walnut);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question .toggle-icon {
  font-size: 1.25rem;
  transition: transform 0.3s ease;
  color: var(--color-terracotta);
}

.faq-item.active .toggle-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 1.75rem;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

.faq-item.active .faq-answer {
  padding-bottom: 1.5rem;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  margin-top: auto;
  background-color: var(--color-walnut);
  color: #F7F1F0;
  padding: 4.5rem 0 2.5rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3.5rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  color: rgba(247, 241, 240, 0.7);
  font-size: 0.92rem;
  margin-top: 1rem;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 1.25rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: rgba(247, 241, 240, 0.75);
}

.footer-links a:hover {
  color: var(--color-ochre);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.84rem;
  color: rgba(247, 241, 240, 0.55);
}

/* ==========================================================================
   RESPONSIVE MEDIA QUERIES
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-headline { font-size: 2.5rem; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .intro-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .portal-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem; }
}

@media (max-width: 768px) {
  .desktop-nav, .header-actions { display: none; }
  .mobile-toggle { display: block; }
  .hero-headline { font-size: 2rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
