/* =============================================
   Fuji Inter Hotel - Luxury Redesign
   ============================================= */

:root {
  --primary: #0F172A;       /* Deep Slate Blue - Main Text/Dark Backgrounds */
  --primary-rgb: 15, 23, 42;
  --secondary: #C5A059;     /* Elegant Gold - Accents */
  --secondary-hover: #B08D4B;
  --text-body: #334155;     /* Slate Gray - Body Text */
  --light-bg: #F8FAFC;      /* Very Light Gray - Section Backgrounds */
  --white: #FFFFFF;
  --transition: all 0.3s ease-in-out;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Lato', sans-serif;
  --navbar-height: 80px; 
}

/* Base Styles */
html {
  /* Prevent accidental horizontal scrolling + Safari "rubber band" drift */
  width: 100%;
  max-width: 100%;
  overflow-x: clip; /* stronger than hidden when supported */
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

body {
  font-family: var(--font-body);
  color: var(--text-body);
  line-height: 1.7;
  background-color: var(--white);
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  position: relative; /* Needed for overflow-x fix on iOS */
}

@supports not (overflow-x: clip) {
  html,
  body {
    overflow-x: hidden; /* iOS Safari / legacy fallback */
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
}

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

a:hover {
  color: var(--secondary);
}

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

/* Utilities */
.text-gold { color: var(--secondary) !important; }
.bg-gold { background-color: var(--secondary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.text-primary { color: var(--primary) !important; }
.bg-light { background-color: var(--light-bg) !important; }

.section-padding { padding: 100px 0; }
@media (max-width: 768px) {
    .section-padding { padding: 60px 0; }
}

/* ---- Navbar ---- */
.navbar {
    padding: 20px 0;
    transition: var(--transition);
    background: transparent;
    z-index: 1030;
}

.navbar.scrolled, 
.navbar.navbar-dark-scrolled {
    background: rgba(15, 23, 42, 0.95);
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-family: "DM Serif Text", serif;
    font-size: 1.8rem;
    font-weight: 400;
    color: #fff !important;
    letter-spacing: 2px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    padding: 10px 15px !important;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--secondary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px; left: 15px; right: 15px;
    height: 1px;
    background: var(--secondary);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.nav-link:hover::after, .nav-link.active::after {
    transform: scaleX(1);
}

.btn-nav-book {
    background: var(--secondary);
    color: #fff !important;
    padding: 10px 25px !important;
    border-radius: 0;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    border: 1px solid var(--secondary);
}

.btn-nav-book:hover {
    background: transparent;
    color: var(--secondary) !important;
}

.navbar-toggler {
    border: none;
    color: rgba(255,255,255,0.8);
}
.navbar-toggler:focus {
    box-shadow: none;
}

/* Mobile Nav Overlay Fix */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--primary);
        padding: 20px;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }
    .btn-nav-book {
        margin-top: 10px;
        text-align: center;
    }
}


/* ---- Hero Section ---- */
/* Standard Hero for Pages */
.hero-section {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    margin-top: 0; /* Important for fixed navbar */
}

/* Specific Hero Heights */
.hero-section.hero-home { height: 100vh; min-height: 600px; }
.hero-section.hero-sm { height: 200px; min-height: 200px; padding-top: 40px; }
.hero-section.hero-sm .hero-content { color: #fff; }
.hero-section.hero-sm .hero-title { font-size: 2rem; margin-bottom: 4px; color: #fff; }
.hero-section.hero-sm .lead { font-size: 0.9rem; opacity: 0.85; margin-bottom: 0; }

.hero-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4); 
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    display: block;
    font-size: 1rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: var(--secondary);
    font-weight: 700;
}

.hero-title {
    font-family: "DM Serif Text", serif;
    font-weight: 400;
    font-size: 4rem;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
}


/* ---- Custom Buttons ---- */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    padding: 15px 40px;
    border-radius: 0;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    padding: 12px 30px;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: #fff;
}


/* ---- Cards ---- */
.card-modern {
    background: #fff;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    transition: var(--transition);
}
.card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

/* Room Cards */
.room-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: var(--transition);
    height: 100%;
}
.room-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}
.room-card-img {
    height: 300px;
    overflow: hidden;
}
.room-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s;
}
.room-card:hover .room-card-img img {
    transform: scale(1.1);
}
.room-card-body {
    padding: 30px;
}

/* Feature Box */
.feature-box {
    padding: 40px;
    text-align: center;
    border: 1px solid #eee;
    transition: var(--transition);
}
.feature-box:hover {
    border-color: var(--secondary);
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.feature-icon {
    font-size: 3rem;
    color: var(--secondary);
    margin-bottom: 20px;
    display: block;
}


/* ---- Footer ---- */
.site-footer {
    background-color: #0B1120;
    color: #fff;
    font-size: 0.9rem;
}
.footer-title {
    color: #fff;
    font-family: var(--font-heading);
    margin-bottom: 25px;
    font-size: 1.5rem;
}
.footer-links a {
    color: #94A3B8;
    display: block;
    margin-bottom: 10px;
    transition: var(--transition);
}
.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}
.social-icon {
    width: 45px; height: 45px;
    background: rgba(255,255,255,0.05);
    display: inline-flex;
    align-items: center; justify-content: center;
    border-radius: 50%;
    color: #fff;
    margin-right: 10px;
    transition: var(--transition);
}
.social-icon:hover {
    background: var(--secondary);
    transform: rotate(360deg);
}

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

/* ---- Section Labels ---- */
.section-subtitle {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--secondary);
    font-weight: 700;
    margin-bottom: 12px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--primary);
    line-height: 1.2;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .section-title { font-size: 1.8rem; }
}

/* ---- Hero Year ---- */
.hero-year {
    font-size: 0.85rem;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

/* ---- Room Card Modern ---- */
.room-card-modern {
    background: #fff;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    transition: var(--transition);
    height: 100%;
    overflow: hidden;
}

.room-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.room-img-container {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.room-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.room-card-modern:hover .room-img-container img {
    transform: scale(1.07);
}

.room-details {
    padding: 24px;
}

.room-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.room-price small {
    font-size: 0.75rem;
    font-weight: 400;
    color: #94A3B8;
}

/* ---- Parallax Section (iOS safe) ---- */
.parallax-section {
    background-attachment: fixed;
}

@media (max-width: 991px) {
    /* iOS Safari doesn't support background-attachment: fixed properly */
    .parallax-section {
        background-attachment: scroll;
    }
}

/* ---- Bootstrap g-5 overflow fix ----
   .row.g-5 sets margin-x: -1.5rem (-24px) but .container has only 12px padding.
   This causes 12px horizontal overflow on mobile. Clamp to g-4 on mobile. */
@media (max-width: 991px) {
    .row.g-5 {
        --bs-gutter-x: 1.5rem;
    }
}

/* ---- Flash Messages ---- */
.flash-container {
    position: fixed;
    top: 100px;
    right: 20px;
    z-index: 9999;
    max-width: calc(100vw - 40px);
    width: 320px;
}
