/*
Theme Name: Mamur School
Theme URI: https://mamurschool.com
Author: Mamur School Team
Author URI: https://mamurschool.com
Description: An immersive 3D gallery-style WordPress theme for Mamur School - a primary and secondary institution with two branches. Features 3D room gallery, particle animations, video sections, and school life gallery. All content is editable through the WordPress Customizer.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mamur-school
Tags: education, school, gallery, 3d, responsive, customizer
*/

/* ============================================
   MAMUR SCHOOL - WORDPRESS THEME
   Primary & Secondary School | Two Branches
   ============================================ */

/* ---- CSS Variables ---- */
:root {
  --bg: #0a0a0a;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --accent: #c9a050;
  --accent-secondary: #8b6914;
  --room-primary: #8b2525;
  --room-secondary: #1a3a5c;
  --room-accent: #2d4a3e;
  --room-highlight: #5c4a2a;
  --glass-overlay: rgba(20, 30, 40, 0.4);
  --particle-glow: #c9a050;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ---- Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Space+Mono:wght@400;700&family=Inter:wght@300;400;500;600&display=swap');

.font-serif {
  font-family: 'Playfair Display', Georgia, serif;
}

.font-mono {
  font-family: 'Space Mono', monospace;
}

.font-sans {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ---- Typography ---- */
.text-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.text-hero-title {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: clamp(3rem, 7vw, 6rem);
  text-transform: uppercase;
  line-height: 1.1;
}

.text-section-title {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.2;
}

.text-gallery-title {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.2;
}

.text-section-label {
  font-family: 'Space Mono', monospace;
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.text-quote {
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.4;
}

.text-nav {
  font-family: 'Space Mono', monospace;
  font-weight: 400;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.text-caption {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 14px;
  color: var(--text-secondary);
}

.text-body {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ============================================
   NAVIGATION
   ============================================ */

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 64px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.site-nav--scrolled {
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Brand Link */
.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* Logo Image */
.brand-logo {
  max-height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.brand-link:hover .brand-logo {
  opacity: 0.85;
  transform: scale(1.02);
}

/* Text Brand Name */
.brand-name {
  display: flex;
  cursor: pointer;
}

.brand-name span {
  display: inline-block;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.brand-name:hover span {
  transform: translateY(-4px);
}

.brand-name:hover span:nth-child(1) { transition-delay: 0ms; }
.brand-name:hover span:nth-child(2) { transition-delay: 30ms; }
.brand-name:hover span:nth-child(3) { transition-delay: 60ms; }
.brand-name:hover span:nth-child(4) { transition-delay: 90ms; }
.brand-name:hover span:nth-child(5) { transition-delay: 120ms; }

.menu-btn {
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 16px;
  transition: color 0.3s ease;
}

.menu-btn:hover {
  color: var(--accent);
}

/* ============================================
   FULLSCREEN MENU
   ============================================ */

.fullscreen-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 60px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.fullscreen-menu.active {
  opacity: 1;
  visibility: visible;
}

.fullscreen-menu__close {
  position: absolute;
  top: 20px;
  right: 40px;
}

.fullscreen-menu__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.fullscreen-menu__links a {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--text-primary);
  display: inline-block;
  transition: transform 0.3s ease, color 0.3s ease;
}

.fullscreen-menu__links a:hover {
  transform: translateX(20px);
  color: var(--accent);
}

.fullscreen-menu__info {
  text-align: right;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  line-height: 2.5;
}

/* ============================================
   HERO ROOM GALLERY
   ============================================ */

.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.room-container {
  position: absolute;
  inset: 0;
  perspective: 2000px;
  perspective-origin: 50% 50%;
}

.room {
  position: absolute;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.room.active {
  opacity: 1;
}

/* Room walls */
.wall {
  position: absolute;
  backface-visibility: hidden;
}

.wall--floor {
  width: 200vw;
  height: 200vh;
  top: 50%;
  left: -50%;
  transform: rotateX(90deg) translateZ(-50vh);
  background: linear-gradient(to bottom, #1a1a1a, #0a0a0a);
}

.wall--back {
  width: 100vw;
  height: 100vh;
  transform: translateZ(-200vw);
  background-size: cover;
  background-position: center;
}

.wall--left {
  width: 200vw;
  height: 100vh;
  left: 0;
  transform-origin: 0 50%;
  transform: rotateY(90deg);
  background-size: cover;
  background-position: center;
}

.wall--right {
  width: 200vw;
  height: 100vh;
  right: 0;
  transform-origin: 100% 50%;
  transform: rotateY(-90deg);
  background-size: cover;
  background-position: center;
}

/* Room color themes */
.room--waves .wall--floor { background: linear-gradient(to bottom, #5c1a1a, #3a0f0f); }
.room--lighthouse .wall--floor { background: linear-gradient(to bottom, #0d2540, #061520); }
.room--orlando .wall--floor { background: linear-gradient(to bottom, #6b5820, #4a3d16); }
.room--monk .wall--floor { background: linear-gradient(to bottom, #8a8578, #5c584e); }

/* Wall image styling */
.wall-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
}

/* Navigation arrows */
.room-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: transparent;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.3s ease, transform 0.3s ease, background 0.3s ease;
  z-index: 10;
}

.room-nav:hover {
  border-color: var(--accent);
  transform: translateY(-50%) scale(1.1);
  background: rgba(201, 160, 80, 0.1);
}

.room-nav--prev { left: 40px; }
.room-nav--next { right: 40px; }

/* Room counter */
.room-counter {
  position: absolute;
  bottom: 40px;
  left: 40px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
  z-index: 10;
}

/* Hero text overlay */
.hero-text {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 10;
  width: 90%;
  max-width: 800px;
}

.hero-text__name {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-secondary);
  margin-top: 16px;
  transition: opacity 0.4s ease;
}

.hero-text__meta {
  margin-top: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  transition: opacity 0.4s ease;
}

/* ============================================
   MISSION SECTION (PARTICLES)
   ============================================ */

.mission-section {
  min-height: 100vh;
  padding: 120px 40px;
  background: var(--bg);
  display: flex;
  align-items: center;
}

.mission-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 55% 45%;
  gap: 60px;
  align-items: center;
}

.mission-content {
  opacity: 0;
  transform: translateX(-50px);
}

.mission-content.visible {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.mission-content p {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.mission-content em {
  color: var(--accent);
  font-style: italic;
}

.mission-quote {
  border-left: 3px solid var(--accent);
  padding-left: 24px;
  margin-top: 40px;
}

.mission-quote__text {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--text-primary);
  line-height: 1.4;
}

.mission-quote__attribution {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 16px;
}

/* Particle canvas */
.particle-canvas {
  width: 100%;
  height: 500px;
  position: relative;
}

.particle-canvas canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ============================================
   PRIMARY VIDEO SECTION
   ============================================ */

.primary-video-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.primary-video-section video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.primary-video-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.glass-panel {
  position: relative;
  z-index: 2;
  max-width: 480px;
  padding: 48px;
  background: var(--glass-overlay);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  text-align: center;
  opacity: 0;
  transform: scale(0.95);
}

.glass-panel.visible {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.glass-panel__divider {
  width: 60px;
  height: 1px;
  background: rgba(255, 255, 255, 0.3);
  margin: 24px auto;
}

.glass-panel__data {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  color: white;
  line-height: 2;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.glass-panel__description {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 24px;
}

/* ============================================
   GALLERY SECTION
   ============================================ */

.gallery-section {
  padding: 120px 40px;
  background: var(--bg);
}

.gallery-container {
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-header {
  margin-bottom: 60px;
}

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

.gallery-item {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.gallery-item__image-wrapper {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 2px;
}

.gallery-item__image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

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

.gallery-item__caption {
  margin-top: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.3s ease;
}

.gallery-item:hover .gallery-item__caption {
  color: var(--text-primary);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__content {
  display: flex;
  max-width: 90vw;
  max-height: 90vh;
  gap: 40px;
  align-items: center;
}

.lightbox__image {
  max-width: 60vw;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox__info {
  max-width: 400px;
}

.lightbox__caption {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin-bottom: 16px;
}

.lightbox__description {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.lightbox__close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 32px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.lightbox__close:hover {
  color: var(--accent);
}

.lightbox__hint {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   SECONDARY VIDEO SECTION
   ============================================ */

.secondary-video-section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.secondary-video-section video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.secondary-video-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
  z-index: 1;
}

.secondary-video__content {
  position: relative;
  z-index: 2;
  padding: 0 60px 120px 60px;
  max-width: 700px;
  opacity: 0;
  transform: translateY(30px);
}

.secondary-video__content.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.secondary-video__cta {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: white;
  margin-top: 32px;
  transition: letter-spacing 0.3s ease;
  cursor: pointer;
}

.secondary-video__cta:hover {
  letter-spacing: 0.15em;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: var(--bg);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-links {
  padding: 80px 40px;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.footer-column__heading {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: white;
  margin-bottom: 20px;
}

.footer-column__list {
  list-style: none;
}

.footer-column__list li {
  margin-bottom: 12px;
}

.footer-column__list a {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: var(--text-secondary);
  display: inline-block;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-column__list a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

/* Terminal ticker */
.ticker-bar {
  width: 100%;
  height: 48px;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: white;
  overflow: hidden;
}

.ticker-bar__cursor {
  display: inline-block;
  width: 10px;
  height: 18px;
  background: white;
  margin-left: 8px;
  animation: blink 0.5s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Copyright */
.footer-copyright {
  padding: 24px 40px;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .site-nav {
    padding: 0 20px;
  }

  .mission-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

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

  .room-nav {
    width: 40px;
    height: 40px;
  }

  .room-nav--prev { left: 20px; }
  .room-nav--next { right: 20px; }

  .footer-links {
    grid-template-columns: 1fr;
    padding: 60px 20px;
  }

  .fullscreen-menu {
    padding: 60px 30px;
    flex-direction: column;
    justify-content: center;
    gap: 40px;
  }

  .fullscreen-menu__info {
    text-align: left;
  }

  .secondary-video__content {
    padding: 0 30px 80px 30px;
  }

  .lightbox__content {
    flex-direction: column;
    gap: 20px;
  }

  .lightbox__image {
    max-width: 90vw;
    max-height: 50vh;
  }

  .lightbox__info {
    max-width: 90vw;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .text-hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-text {
    bottom: 60px;
  }
}

/* ============================================
   ADMIN BAR FIX
   ============================================ */

body.admin-bar .site-nav {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-nav {
    top: 46px;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fade-up, .mission-content, .glass-panel, .secondary-video__content {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================
   WORDPRESS SPECIFIC
   ============================================ */

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 8px;
}
