/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-text: #1e293b;       /* Deep slate for readability */
  --color-text-light: #64748b;
  --color-accent: #dc2626;     /* Aikido Red */
  --color-accent-hover: #b91c1c;
  --color-dark: #0f172a;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
  --radius: 8px;
  --max-width: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-main); color: var(--color-text); line-height: 1.6; background: var(--color-bg); }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
ul { list-style: none; }

.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }
.text-center { text-align: center; }
.text-accent { color: var(--color-accent); }
.bg-light { background-color: var(--color-bg-alt); }

/* =========================================
   2. TYPOGRAPHY & BUTTONS
   ========================================= */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; color: var(--color-dark); margin-bottom: 1rem; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title.text-left { text-align: left; }

.btn-primary, .btn-secondary {
  display: inline-block; padding: 0.85rem 1.75rem; border-radius: var(--radius);
  font-weight: 600; text-align: center; transition: all 0.2s ease; cursor: pointer;
}
.btn-primary { background: var(--color-accent); color: white; border: 2px solid var(--color-accent); }
.btn-primary:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); transform: translateY(-2px); }
.btn-secondary { background: transparent; color: var(--color-dark); border: 2px solid var(--color-dark); }
.btn-secondary:hover { background: var(--color-dark); color: white; }
.btn-large { padding: 1rem 2.5rem; font-size: 1.1rem; }

/* =========================================
   3. HEADER & ULTRAFAST MENU
   ========================================= */
.site-header { background: var(--color-bg); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 1000; }
.header-inner { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.5rem; }
.logo img { height: 45px; width: auto; }

.primary-nav ul { display: flex; gap: 2rem; align-items: center; }
.primary-nav a { font-weight: 500; font-size: 0.95rem; }
.primary-nav a:hover, .primary-nav a.active { color: var(--color-accent); }

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: 100%; left: 0; background: var(--color-bg);
  box-shadow: var(--shadow-md); border-radius: var(--radius);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: all 0.2s ease; min-width: 220px; padding: 0.5rem 0; z-index: 1001;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 0.75rem 1.5rem; font-size: 0.9rem; }
.dropdown a:hover { background: var(--color-bg-alt); }

/* Mobile Menu Toggle */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; z-index: 1002; }
.hamburger { display: block; width: 26px; height: 3px; background: var(--color-dark); position: relative; transition: all 0.3s; }
.hamburger::before, .hamburger::after { content: ''; position: absolute; width: 26px; height: 3px; background: var(--color-dark); transition: all 0.3s; left: 0; }
.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
  background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.9)), url('../img/hero-bg.webp') center/cover no-repeat;
  color: white; padding: 6rem 0 5rem; text-align: center;
}
.hero-content { max-width: 800px; }
.hero-subtitle { font-size: 1.2rem; color: #cbd5e1; margin-bottom: 2rem; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero .btn-secondary { border-color: white; color: white; }
.hero .btn-secondary:hover { background: white; color: var(--color-dark); }
.trust-badge { display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.1); padding: 0.5rem 1rem; border-radius: 50px; font-size: 0.9rem; backdrop-filter: blur(4px); }
.stars { color: #fbbf24; letter-spacing: 2px; }

/* =========================================
   5. SECTIONS & CARDS
   ========================================= */
.section { padding: 5rem 0; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }

.card { background: var(--color-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform 0.3s, box-shadow 0.3s; border: 1px solid #e2e8f0; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-image img { width: 100%; height: 220px; object-fit: cover; }
.card-content { padding: 1.5rem; }
.card-content h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.card-tag { font-size: 0.85rem; font-weight: 600; color: var(--color-accent); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 1rem; }
.card-content p { color: var(--color-text-light); font-size: 0.95rem; margin-bottom: 1rem; }
.schedule-mini { font-size: 0.85rem; color: var(--color-text); background: var(--color-bg-alt); padding: 0.75rem; border-radius: var(--radius); margin-bottom: 1rem; }
.schedule-mini li { padding: 0.2rem 0; border-bottom: 1px solid #e2e8f0; }
.schedule-mini li:last-child { border-bottom: none; }
.link-arrow { color: var(--color-accent); font-weight: 600; font-size: 0.95rem; }
.link-arrow:hover { text-decoration: underline; }

/* =========================================
   6. SPLIT LAYOUT (ABOUT) & FAQ
   ========================================= */
.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.split-image img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.review-quote { border-left: 4px solid var(--color-accent); padding-left: 1.5rem; margin: 2rem 0; font-style: italic; color: var(--color-text-light); }
.review-quote cite { display: block; margin-top: 0.5rem; font-weight: 600; color: var(--color-dark); font-style: normal; }

.faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }
.faq-item h4 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.faq-item p { color: var(--color-text-light); font-size: 0.95rem; }

/* =========================================
   7. CTA & FOOTER
   ========================================= */
.cta-section { background: var(--color-dark); color: white; }
.cta-section h2 { color: white; }
.cta-section p { color: #cbd5e1; margin-bottom: 1.5rem; }
.contact-details { margin-bottom: 2rem; font-size: 1.1rem; }

.site-footer { background: #020617; color: #94a3b8; padding: 4rem 0 0; font-size: 0.9rem; }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; margin-bottom: 3rem; }
.footer-col h4 { color: white; font-size: 1.1rem; margin-bottom: 1rem; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a:hover { color: white; }
.footer-bottom { border-top: 1px solid #1e293b; padding: 1.5rem 0; color: #64748b; }

/* =========================================
   8. MOBILE RESPONSIVE (Phone Optimized)
   ========================================= */
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .primary-nav {
    position: fixed; top: 0; right: -100%; width: 80%; max-width: 300px; height: 100vh;
    background: var(--color-bg); box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    padding: 5rem 1.5rem 2rem; transition: right 0.3s ease-in-out; z-index: 999;
  }
  .primary-nav.is-open { right: 0; }
  .primary-nav ul { flex-direction: column; align-items: flex-start; gap: 0; }
  .primary-nav li { width: 100%; border-bottom: 1px solid #e2e8f0; }
  .primary-nav a { display: block; padding: 1rem 0; font-size: 1.1rem; }
  
  /* Mobile Dropdown */
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; padding-left: 1rem; display: none; background: var(--color-bg-alt); }
  .has-dropdown.active .dropdown { display: block; }
  .has-dropdown > a::after { content: ' +'; float: right; }
  .has-dropdown.active > a::after { content: ' -'; }

  /* Hamburger Animation */
  .menu-toggle[aria-expanded="true"] .hamburger { background: transparent; }
  .menu-toggle[aria-expanded="true"] .hamburger::before { transform: rotate(45deg); top: 0; }
  .menu-toggle[aria-expanded="true"] .hamburger::after { transform: rotate(-45deg); top: 0; }

  .split-layout { grid-template-columns: 1fr; gap: 2rem; }
  .split-layout .split-image { order: -1; } /* Image on top on mobile */
  .hero { padding: 4rem 0 3rem; }
}

/* =========================================
   Footer Social Media Links
   ========================================= */
.footer-social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.footer-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  color: inherit;
}

.footer-social-links a:hover {
  background: var(--accent-color, #d32f2f);
  transform: translateY(-3px);
}

.footer-social-links svg {
  width: 18px;
  height: 18px;
}

/* =========================================
   Header Social Links (Mobile / Hamburger Mode Only)
   ========================================= */
.header-social-links {
  display: none;
}

@media (max-width: 768px) {
  .header-social-links {
    display: flex !important;
    flex-direction: row !important; /* Force horizontal */
    flex-wrap: nowrap !important;   /* Prevent dropping to next line */
    align-items: center !important;
    gap: 0.4rem !important;
    margin: 0 0.5rem 0 0 !important; /* top, right, bottom, left */
  }

  .header-social-links a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important; /* Slightly smaller to guarantee fit */
    height: 30px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.06) !important;
    color: var(--text-color, #333) !important;
    flex-shrink: 0 !important; /* Prevent icons from squishing */
    text-decoration: none !important;
  }

  .header-social-links a:hover {
    background: var(--accent-color, #d32f2f) !important;
    color: #ffffff !important;
  }

  .header-social-links svg {
    width: 16px !important;
    height: 16px !important;
  }
}

/* =========================================
   KİTAP KAPAK DÖNDÜRME (FLIP) EFEKTİ
   ========================================= */
.book-flip-container {
  perspective: 1000px;
  width: 100%;
  height: 340px; /* Kartın yüksekliğini sabitler */
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9f9f9;
  padding: 2rem;
  border-radius: 8px;
}

.book-flip-inner {
  position: relative;
  width: 200px;  /* Kitap genişliği */
  height: 300px; /* Kitap yüksekliği */
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
  cursor: pointer;
}

.book-flip-container:hover .book-flip-inner {
  transform: rotateY(180deg);
}

.book-flip-front, 
.book-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden; /* Arkası dönükken görünmez */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.15);
  overflow: hidden;
  background: #fff;
}

.book-flip-front img, 
.book-flip-back img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Resmi kutuya sığdırır */
  border-radius: 6px;
}

.book-flip-back {
  transform: rotateY(180deg); /* Arka kapak başlangıçta ters çevrilidir */
}

/* Mobilde dokunarak döndürme desteği */
@media (hover: none) {
  .book-flip-inner:active {
    transform: rotateY(180deg);
  }
}

/* =========================================
   CERTIFICATE CARDS STYLING
   ========================================= */
.certificate-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.certificate-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.certificate-card .card-image {
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: #ffffff;
}

.certificate-card .card-image img {
  width: 100%;
  height: 400px;
  object-fit: contain;
  padding: 1rem;
  transition: transform 0.3s ease;
  background: #fafafa;
}

.certificate-card:hover .card-image img {
  transform: scale(1.03);
}

.certificate-card .card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.certificate-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-color, #333);
}

.certificate-card .card-tag {
  font-size: 0.875rem;
  color: var(--accent-color, #d32f2f);
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive adjustments for certificates */
@media (max-width: 768px) {
  .certificate-card .card-image img {
    height: 280px;
  }
}

/* Student Login Button */
.student-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  margin-right: 1rem;
  background: transparent;
  border: 2px solid var(--text-color, #333);
  border-radius: 6px;
  color: var(--text-color, #333);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.student-login-btn:hover {
  background: var(--accent-color, #d32f2f);
  border-color: var(--accent-color, #d32f2f);
  color: white;
}

/* On mobile, hide the text but keep the icon */
@media (max-width: 900px) {
  .student-login-btn span {
    display: none;
  }
  
  .student-login-btn {
    padding: 0.5rem;
    margin-right: 0.5rem;
  }
}