/*
Theme Name: Hotel Babylon Dades
Theme URI: https://hotelbabylondades.com/
Author: Hotel Babylon Dades
Author URI: https://hotelbabylondades.com/
Description: A charming, single-page theme for Hotel Babylon Dades — a family-run hotel in the Dades Gorges, Morocco. Features hero, rooms gallery with lightbox, restaurant, 360 video, reviews, blog, team carousel, location map and contact section.
Version: 1.0.0
Requires at least: 5.5
Tested up to: 6.5
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hotel-babylon
Tags: hotel, one-page, travel, restaurant, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

:root {
  --primary: #1abc9c;
  --primary-dark: #16a085;
  --gold: #c9a96e;
  --dark-bg: #1e1f26;
  --dark-section: #141418;
  --text-dark: #2c2c2c;
  --text-light: #f5f5f0;
  --text-muted: #909090;
  --white: #ffffff;
  --overlay: rgba(20, 20, 24, 0.62);

  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', 'Helvetica Neue', sans-serif;

  --shadow-card: 0 8px 40px rgba(0,0,0,0.12);
  --shadow-hover: 0 16px 60px rgba(0,0,0,0.2);

  --container: 1200px;
  --radius: 4px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.7;
  background: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.25; }

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

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

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

section { padding: 100px 0; }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 2000;
  background: var(--primary); color: #fff; padding: 12px 20px;
  border-radius: var(--radius);
}
.skip-link:focus { left: 12px; top: 12px; }

:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

/* ---------- Section titles ---------- */
.section-head { text-align: center; margin-bottom: 60px; }
.section-head h2 { font-size: 2.6rem; color: var(--text-dark); }
.section-head .rule {
  width: 70px; height: 3px; background: var(--primary);
  margin: 20px auto 0;
}
.section-head p { color: var(--text-muted); margin-top: 16px; font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 14px 34px; border-radius: var(--radius);
  font-family: var(--font-body); font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; font-size: 0.82rem; cursor: pointer;
  transition: all 0.3s ease; border: 2px solid transparent;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; color: #fff; border-color: #fff; }
.btn-outline:hover { background: #fff; color: var(--text-dark); transform: translateY(-2px); }

/* ---------- Navbar ---------- */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  padding: 18px 0; transition: background 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}
.navbar.scrolled { background: var(--dark-bg); padding: 10px 0; box-shadow: 0 4px 24px rgba(0,0,0,0.25); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.nav-logo img { height: 52px; width: auto; transition: height 0.4s ease; }
.navbar.scrolled .nav-logo img { height: 44px; }

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  color: #fff; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 400; position: relative; padding: 6px 0; transition: color 0.3s ease;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: 0; width: 0; height: 2px;
  background: var(--gold); transition: width 0.3s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary); }
.nav-links a.active::after { width: 100%; }

.nav-cta {
  background: var(--primary); color: #fff !important; padding: 10px 22px;
  border-radius: var(--radius); font-weight: 700;
}
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--primary-dark); }

.hamburger {
  display: none; flex-direction: column; gap: 5px; background: none;
  border: none; cursor: pointer; padding: 6px; z-index: 1100;
}
.hamburger span { width: 26px; height: 2px; background: #fff; transition: all 0.3s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; height: 100vh; min-height: 600px; display: flex;
  align-items: center; justify-content: center; text-align: center;
  overflow: hidden; padding: 0;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  background: url('https://hotelbabylondades.com/wp-content/uploads/2018/04/IMG_7561.jpg') center/cover no-repeat;
  animation: kenburns 14s ease-in-out infinite alternate;
}
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.08); } }
.hero::before { content: ''; position: absolute; inset: 0; background: rgba(20,20,24,0.55); z-index: -1; }
.hero-content { color: #fff; max-width: 800px; padding: 0 24px; }
.hero-content h1 { font-size: 4.5rem; font-weight: 700; margin-bottom: 10px; text-shadow: 0 2px 20px rgba(0,0,0,0.4); }
.hero-content .tagline { font-size: 1.4rem; color: var(--gold); letter-spacing: 0.1em; margin-bottom: 36px; font-weight: 300; }
.hero-btns { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

.scroll-down {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  color: #fff; animation: bounce 2s infinite; z-index: 2;
}
@keyframes bounce { 0%,100% { transform: translateX(-50%) translateY(0);} 50% { transform: translateX(-50%) translateY(10px);} }

/* ---------- Features ---------- */
#features { background: #fafaf8; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.feature-card {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-card); transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.feature-img { height: 200px; overflow: hidden; }
.feature-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.feature-card:hover .feature-img img { transform: scale(1.08); }
.feature-body { padding: 30px 26px 34px; text-align: center; }
.feature-icon {
  width: 60px; height: 60px; border-radius: 50%; background: rgba(26,188,156,0.12);
  color: var(--primary); display: flex; align-items: center; justify-content: center;
  margin: -60px auto 18px; position: relative; border: 4px solid #fff; background-color: var(--primary);
}
.feature-icon svg { width: 26px; height: 26px; stroke: #fff; }
.feature-body h3 { font-size: 1.4rem; margin-bottom: 12px; }
.feature-body p { color: var(--text-muted); font-size: 0.96rem; }

/* ---------- Rooms ---------- */
.masonry { columns: 4; column-gap: 16px; }
.masonry .tile { break-inside: avoid; margin-bottom: 16px; position: relative; overflow: hidden; border-radius: var(--radius); cursor: pointer; }
.masonry .tile img { width: 100%; transition: transform 0.6s ease; }
.masonry .tile:hover img { transform: scale(1.1); }
.tile-overlay {
  position: absolute; inset: 0; background: rgba(20,20,24,0.5); color: #fff;
  display: flex; align-items: center; justify-content: center; opacity: 0;
  transition: opacity 0.4s ease; font-size: 0.82rem; letter-spacing: 0.15em;
  text-transform: uppercase; font-weight: 700;
}
.masonry .tile:hover .tile-overlay { opacity: 1; }
.center-cta { text-align: center; margin-top: 50px; }

/* ---------- Restaurant ---------- */
#restaurant { background: #fafaf8; }
.restaurant-split { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.restaurant-text h3 { font-size: 1.8rem; color: var(--primary-dark); margin: 24px 0 14px; }
.restaurant-text .rule { width: 60px; height: 3px; background: var(--primary); margin-bottom: 24px; }
.restaurant-text p { margin-bottom: 18px; color: #555; }
.restaurant-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.restaurant-grid .tile { overflow: hidden; border-radius: var(--radius); cursor: pointer; }
.restaurant-grid img { width: 100%; height: 220px; object-fit: cover; transition: transform 0.6s ease; }
.restaurant-grid .tile:hover img { transform: scale(1.1); }

/* ---------- Video 360 ---------- */
#video360 { background: var(--dark-section); }
#video360 .section-head h2 { color: var(--gold); }
.video-wrap { max-width: 1000px; margin: 0 auto; position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Gallery ---------- */
.gallery-masonry { columns: 4; column-gap: 16px; }
.gallery-masonry .tile { break-inside: avoid; margin-bottom: 16px; position: relative; overflow: hidden; border-radius: var(--radius); cursor: pointer; }
.gallery-masonry img { width: 100%; transition: transform 0.6s ease; }
.gallery-masonry .tile:hover img { transform: scale(1.1); }
.gallery-masonry .tile-overlay { background: rgba(26,188,156,0.55); }
.gallery-masonry .tile-overlay svg { width: 34px; height: 34px; stroke: #fff; }

/* ---------- Reviews ---------- */
#reviews { background: var(--dark-bg); }
#reviews .section-head h2 { color: #fff; }
.reviews-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; max-width: 850px; margin: 0 auto; }
.review-card {
  background: #26272f; border-radius: var(--radius); padding: 40px 34px;
  text-align: center; color: #fff; border: 2px solid transparent;
}
.review-card.tripadvisor { border-color: var(--primary); }
.review-card .stars { color: var(--gold); font-size: 1.5rem; letter-spacing: 4px; margin-bottom: 10px; }
.review-card .big { font-family: var(--font-head); font-size: 3.4rem; color: var(--gold); line-height: 1; margin-bottom: 8px; }
.review-card h3 { font-size: 1.4rem; margin-bottom: 16px; }
.review-card p { color: #cfcfcf; margin-bottom: 8px; font-size: 0.95rem; }
.review-card .badge { display: inline-block; background: rgba(26,188,156,0.15); color: var(--primary); padding: 6px 16px; border-radius: 20px; font-size: 0.82rem; margin: 12px 0; }
.review-card a { color: var(--primary); font-weight: 700; display: inline-block; margin-top: 14px; }
.review-card a:hover { color: var(--gold); }

/* ---------- Blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.blog-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 34px 30px; transition: transform 0.4s ease, box-shadow 0.4s ease; }
.blog-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); }
.blog-date { display: inline-block; background: var(--primary); color: #fff; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; padding: 6px 14px; border-radius: var(--radius); margin-bottom: 18px; }
.blog-card h3 { font-size: 1.45rem; margin-bottom: 14px; }
.blog-card p { color: var(--text-muted); margin-bottom: 18px; font-size: 0.96rem; }
.read-more { color: var(--primary); font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.8rem; }
.read-more:hover { color: var(--primary-dark); }

/* ---------- Team ---------- */
#team { background: #fafaf8; }
.carousel-wrap { position: relative; }
.team-track { display: flex; gap: 24px; overflow-x: auto; scroll-behavior: smooth; padding: 10px 4px 30px; scrollbar-width: none; }
.team-track::-webkit-scrollbar { display: none; }
.team-card { flex: 0 0 240px; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-card); text-align: center; }
.team-card img { width: 100%; height: 290px; object-fit: cover; }
.team-card .info { padding: 20px 14px 24px; }
.team-card h3 { font-size: 1.15rem; margin-bottom: 4px; }
.team-card .role { color: var(--primary); font-style: italic; font-size: 0.95rem; }
.carousel-btn {
  position: absolute; top: 42%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-card); transition: background 0.3s ease;
}
.carousel-btn:hover { background: var(--primary-dark); }
.carousel-btn.prev { left: -10px; }
.carousel-btn.next { right: -10px; }
.carousel-btn svg { width: 22px; height: 22px; stroke: #fff; }

/* ---------- Location ---------- */
#location { padding: 0; position: relative; }
.map-wrap { position: relative; }
.map-wrap iframe { width: 100%; height: 480px; border: 0; display: block; filter: grayscale(0.1); }
.map-card {
  position: absolute; top: 40px; right: 40px; background: var(--dark-bg); color: #fff;
  padding: 30px 28px; border-radius: var(--radius); max-width: 300px; box-shadow: var(--shadow-hover);
}
.map-card h3 { color: var(--gold); font-size: 1.4rem; margin-bottom: 14px; }
.map-card p { font-size: 0.92rem; color: #d5d5d5; margin-bottom: 8px; }
.map-card a { color: var(--primary); }

/* ---------- Contact ---------- */
#contact { background: var(--dark-section); }
#contact .section-head h2 { color: #fff; }
.contact-split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 50px; }
.contact-form .field { margin-bottom: 26px; }
.contact-form label { display: block; font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.contact-form input, .contact-form textarea {
  width: 100%; background: transparent; border: none; border-bottom: 2px solid #3a3b42;
  color: #fff; font-family: var(--font-body); font-size: 1rem; padding: 10px 2px; transition: border-color 0.3s ease;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-bottom-color: var(--primary); }
.contact-form textarea { resize: vertical; min-height: 110px; }
.form-msg { margin-top: 16px; font-size: 0.92rem; display: none; }
.form-msg.success { color: var(--primary); display: block; }
.form-msg.error { color: #e74c3c; display: block; }

.contact-info { color: #d5d5d5; }
.contact-info h3 { color: #fff; font-size: 1.5rem; margin-bottom: 24px; }
.info-row { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.info-row .ico { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; background: rgba(26,188,156,0.15); display: flex; align-items: center; justify-content: center; }
.info-row .ico svg { width: 22px; height: 22px; stroke: var(--primary); }
.info-row a, .info-row span { color: #d5d5d5; }
.info-row a:hover { color: var(--primary); }

/* ---------- Awards ---------- */
#awards { text-align: center; background: #fafaf8; }
#awards p { color: var(--text-muted); margin-bottom: 30px; }
#awards img { max-width: 320px; margin: 0 auto; border-radius: var(--radius); box-shadow: var(--shadow-card); }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark-section); color: #cfcfcf; padding: 70px 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding-bottom: 40px; }
.site-footer h3 { color: var(--gold); font-size: 1.3rem; margin-bottom: 20px; }
.site-footer a { color: #cfcfcf; transition: color 0.3s ease; }
.site-footer a:hover { color: var(--primary); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 12px; }
.footer-divider { height: 2px; background: var(--gold); opacity: 0.4; margin: 0 0 30px; }
.footer-links { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; margin-bottom: 18px; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; }
.copyright { text-align: center; padding: 22px 0; border-top: 1px solid #2a2b31; color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; background: rgba(10,10,12,0.94); z-index: 3000;
  display: none; align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: var(--radius); box-shadow: 0 20px 80px rgba(0,0,0,0.6); }
.lb-btn {
  position: absolute; background: rgba(255,255,255,0.12); border: none; color: #fff;
  width: 54px; height: 54px; border-radius: 50%; cursor: pointer; font-size: 1.6rem;
  display: flex; align-items: center; justify-content: center; transition: background 0.3s ease;
}
.lb-btn:hover { background: var(--primary); }
.lb-close { top: 26px; right: 26px; }
.lb-prev { left: 26px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 26px; top: 50%; transform: translateY(-50%); }

/* ---------- Animations ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ---------- Generic content (index / single / page fallback) ---------- */
.page-wrap { max-width: var(--container); margin: 0 auto; padding: 140px 24px 80px; }
.page-wrap article { margin-bottom: 50px; padding-bottom: 40px; border-bottom: 1px solid #eee; }
.page-wrap h1, .page-wrap h2 { color: var(--text-dark); margin-bottom: 16px; }
.page-wrap a { color: var(--primary); }
.page-wrap .entry-meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 16px; }
.page-wrap .pagination { display: flex; gap: 16px; margin-top: 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .masonry { columns: 2; }
  .gallery-masonry { columns: 2; }
  .hero-content h1 { font-size: 3.4rem; }
}
@media (max-width: 768px) {
  section { padding: 70px 0; }
  .section-head h2 { font-size: 2rem; }
  .nav-links {
    position: fixed; top: 0; right: -100%; height: 100vh; width: 75%; max-width: 320px;
    background: var(--dark-bg); flex-direction: column; align-items: flex-start;
    padding: 100px 36px 40px; gap: 24px; transition: right 0.4s ease; box-shadow: -10px 0 40px rgba(0,0,0,0.4);
  }
  .nav-links.open { right: 0; }
  .hamburger { display: flex; }
  .navbar { background: var(--dark-bg); }
  .features-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .restaurant-split { grid-template-columns: 1fr; }
  .contact-split { grid-template-columns: 1fr; }
  .masonry { columns: 1; }
  .gallery-masonry { columns: 1; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-links { justify-content: center; }
  .map-card { position: static; max-width: none; margin: 0; border-radius: 0; }
  .hero-content h1 { font-size: 2.6rem; }
  .hero-content .tagline { font-size: 1.1rem; }
  .carousel-btn.prev { left: 0; }
  .carousel-btn.next { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
