/* Modern Design System for Akita Pet Clinic */
:root {
  --primary: #00897B;
  --primary-light: #E0F2F1;
  --secondary: #26A69A;
  --accent: #FF7043;
  --text-dark: #263238;
  --text-light: #546E7A;
  --white: #FFFFFF;
  --bg-light: #F8FBFB;
  --glass-bg: rgba(255, 255, 255, 0.85);
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  --font-main: 'Noto Sans JP', sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3 {
  font-weight: 700;
  color: var(--primary);
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
}

/* Header & Nav */
header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 1rem 5%;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.logo {
  display: flex;
  align-items: center;
}

.logo-img {
  height: 50px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a:hover {
  color: var(--accent);
}

.btn-emergency {
  background: linear-gradient(135deg, #FF7043 0%, #FF5722 100%);
  color: var(--white);
  padding: 0.7rem 1.8rem;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1.05rem;
  box-shadow: 0 4px 15px rgba(255, 112, 67, 0.3);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-emergency:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(255, 112, 67, 0.4);
  filter: brightness(1.1);
}

.btn-emergency:active {
  transform: translateY(0) scale(0.98);
}

/* Hero Section */
.hero {
  height: 90vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  text-align: left;
  background: 
    linear-gradient(270deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 50%, transparent 100%), 
    url('assets/PYchan.png');
  background-size: cover;
  background-position: center 25%;
  color: var(--white);
  padding: 80px 10% 0;
  border-bottom: 8px solid var(--primary-light);
}

.hero-content {
  max-width: 800px;
  padding: 2.5rem;
  border-radius: 20px;
}

.hero-content h1 {
  font-size: 3.5rem;
  color: var(--white);
  text-shadow: 0 2px 15px rgba(0,0,0,0.5);
  margin-bottom: 1.5rem;
  font-weight: 900;
}

.hero-content p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.badge-morning {
  background: var(--white);
  color: var(--accent);
  display: inline-block;
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-weight: 800;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-md);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Schedule / Calendar */
.calendar-container {
  max-width: 900px;
  margin: 0 auto;
  background: var(--white);
  padding: 1rem;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: relative;
  height: 0;
  padding-bottom: 75%; /* Aspect ratio 4:3 (matches 800x600) */
}

.calendar-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

/* Info Cards */
.section { padding: 5rem 10%; }
.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.2rem;
}

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

.card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: 0.4s;
  border-bottom: 4px solid transparent;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-bottom: 4px solid var(--primary);
}

.icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  display: block;
}

/* Table Stylings */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

th, td {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid var(--primary-light);
}

th {
  background: var(--primary);
  color: var(--white);
}

/* Google Maps Styling */
.access-layout {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  align-items: center;
}

.pet-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.pet-profile-img-wrap {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--primary-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-pet-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.pet-name {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
}

.map-container {
  flex-grow: 1;
  height: 250px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* FAQ Section */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: 8px; /* Fixed variable issue */
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  border: 1px solid var(--primary-light);
}

.faq-question {
  padding: 1.25rem 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  cursor: pointer;
  background: var(--white);
  transition: background 0.2s;
}

.faq-question:hover {
  background: var(--primary-light);
}

.faq-question::before {
  content: "Q.";
  color: var(--accent);
  margin-right: 0.75rem;
  font-size: 1.2rem;
}

.faq-answer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--primary-light);
  line-height: 1.6;
  color: var(--text-dark);
}

.faq-answer::before {
  content: "A.";
  color: var(--secondary);
  font-weight: 700;
  margin-right: 0.75rem;
}

/* Consultation Flow */
.flow-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.flow-step {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  position: relative;
  background: var(--white);
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: var(--shadow-sm);
  transition: 0.3s;
}

.flow-step:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow-md);
}

.flow-step::after {
  content: "";
  position: absolute;
  left: 35px;
  top: 60px;
  width: 2px;
  height: calc(100% - 30px);
  background: var(--primary-light);
  z-index: 0;
}

.flow-step:last-child::after {
  display: none;
}

.flow-number {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
  flex-shrink: 0;
  z-index: 1;
  box-shadow: var(--shadow-sm);
}

.flow-content h3 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.flow-content p {
  font-size: 0.95rem;
  color: var(--text-light);
}

@media (max-width: 768px) {
  .hero {
    height: 70vh;
    padding: 120px 5% 0; /* Increased top padding for mobile to clear fixed header */
    background-position: center 15%;
  }
  .hero-content {
    padding: 1.5rem;
  }
  .hero-content h1 { 
    font-size: 2.2rem;
    line-height: 1.2;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .nav-links { display: none; }
  header { padding: 1rem 5%; }
  .access-layout { flex-direction: column; text-align: center; }
  .pet-profile { margin-bottom: 1rem; }
  .section { padding: 3rem 5%; }
}

/* Animations and interactions */
.btn-emergency, .card, .nav-links a {
  cursor: pointer;
}

#schedule .calendar-container {
    border: 1px solid var(--primary-light);
}

/* Footer Section */
footer {
  background: var(--text-dark);
  color: var(--white);
  padding: 80px 10% 40px;
  text-align: center;
}

.footer-logo {
  margin-bottom: 30px;
}

.footer-logo img {
  height: 60px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

/* リアルタイム混雑状況バッジ */
.congestion-badge {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--surface, rgba(255, 255, 255, 0.95));
    backdrop-filter: blur(12px);
    border: 2px solid var(--accent);
    border-radius: 50px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    text-decoration: none;
    color: var(--text-dark);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.congestion-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}
.badge-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.live-blink {
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse-red 1.5s infinite;
}
@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}
.badge-text {
    display: flex;
    flex-direction: column;
}
.badge-text span {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-light);
}
.badge-text strong {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary);
}
@media (max-width: 768px) {
    .congestion-badge {
        bottom: 15px;
        right: 15px;
        padding: 8px 15px;
    }
    .badge-text span { font-size: 0.6rem; }
    .badge-text strong { font-size: 0.95rem; }
}

/* --- 【新設】リアルタイムステータスパネル --- */
.status-section { padding: 4rem 10%; background: var(--bg-light); text-align: center; }
.status-container { max-width: 900px; margin: 0 auto; }
.status-card { 
    display: flex; justify-content: space-around; align-items: center;
    background: var(--white); padding: 3rem; border-radius: 30px;
    box-shadow: var(--shadow-lg); border-top: 6px solid var(--primary);
}
.status-label { display: block; font-size: 1rem; color: var(--text-light); margin-bottom: 0.8rem; font-weight: 700; }
.status-value-wrap { display: flex; align-items: baseline; justify-content: center; }
.status-value-wrap strong { font-size: 4rem; color: var(--primary); line-height: 1; font-weight: 900; }
.status-unit { font-size: 1.2rem; margin-left: 8px; color: var(--text-light); font-weight: 700; }
.status-divider { width: 2px; height: 100px; background: var(--primary-light); }
.status-note { margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-light); }
@media (max-width: 768px) { 
    .status-card { flex-direction: column; gap: 2rem; padding: 2rem; } 
    .status-divider { width: 60%; height: 2px; } 
    .status-value-wrap strong { font-size: 3rem; }
}

/* --- Clinic Status Banner (Surgery, Visit, etc.) --- */
.clinic-status-banner {
    padding: 18px 25px;
    border-radius: 15px;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 900;
    margin-bottom: 25px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-md);
    display: none; /* Initially hidden, shown via JS */
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.clinic-status-banner.active {
    display: flex;
    animation: slideDownIn 0.5s ease;
}

@keyframes slideDownIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.status-normal { background: #e0f2fe; color: #0369a1; border: 2px solid #bae6fd; }
.status-surgery { background: #fee2e2; color: #b91c1c; border: 2px solid #fecaca; animation: urgent-pulse-glow 2s infinite; }
.status-visit   { background: #fffbeb; color: #b45309; border: 2px solid #fde68a; }
.status-break   { background: #f8fafc; color: #475569; border: 2px solid #e2e8f0; }

@keyframes urgent-pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); transform: scale(1); }
    50% { transform: scale(1.02); }
    70% { box-shadow: 0 0 0 15px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); transform: scale(1); }
}

.status-text-wrap {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.status-subtext {
    font-size: 0.9rem;
    display: block;
    font-weight: 700;
    margin-top: 4px;
    opacity: 0.85;
}

/* --- 【新設】AI予測（Wave）セクションのスタイル --- */
.ai-forecast-container {
    width: 100%;
    margin-bottom: 2rem;
}

.ai-bubble {
    background: #ecfdf5; /* Emerald 50 */
    border: 1px solid #d1fae5;
    padding: 1.2rem 1.5rem;
    border-radius: 20px;
    position: relative;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: var(--shadow-sm);
}
.ai-bubble::after {
    content: ""; position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
    width: 20px; height: 20px; background: #ecfdf5; border-right: 1px solid #d1fae5; border-bottom: 1px solid #d1fae5; transform: rotate(45deg);
}
.ai-bubble p {
    color: #065f46; font-size: 0.95rem; font-weight: 700; text-align: left; line-height: 1.5; margin: 0;
}
.sparkle-icon { font-size: 1.2rem; }

.forecast-wave-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--secondary);
}
.forecast-title {
    font-size: 1.1rem; color: var(--text-light); margin-bottom: 1.5rem; font-weight: 800;
}

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

@media (max-width: 768px) {
    .ai-bubble { padding: 1rem; }
    .ai-bubble p { font-size: 0.85rem; }
    .forecast-wave-card { padding: 1.5rem; }
}