/*
Theme Name: Fjellro
Description: Theme of a fictional site for Atrium's tests (written by hand, modelled on WordPress themes with a Swiper hero slider).
Version: 2.3.1
*/
:root { --blue: #23415f; --rust: #b5523b; --ink: #1f2a33; --muted: #5d6b76; --sand: #f6f1ea; --line: #e2dcd3; }
* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.65 Georgia, "Times New Roman", serif; color: var(--ink); background: #fff; }
a { color: var(--rust); }
img { max-width: 100%; height: auto; }
.container { width: min(1180px, 100% - 40px); margin: 0 auto; }
.narrow { max-width: 760px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: static; width: auto; height: auto; clip: auto; }

/* Top bar and header */
.topbar { background: var(--blue); color: #fff; font: 14px/1.4 system-ui, sans-serif; }
.topbar a { color: #fff; }
.topbar__inner { display: flex; gap: 24px; justify-content: flex-end; padding: 6px 0; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; }
.custom-logo { display: block; width: 220px; height: auto; }
.nav-menu { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; font: 600 16px/1 system-ui, sans-serif; }
.nav-menu a { color: var(--ink); text-decoration: none; }
.nav-menu .current-menu-item a { color: var(--rust); }
.menu-toggle { display: none; }

/* Hero slider: fades between full-width slides */
.hero-slider { position: relative; height: min(86vh, 760px); min-height: 520px; overflow: hidden; color: #fff; background: #1d2b4a; }
.hero-slider .swiper-wrapper { position: absolute; inset: 0; }
.hero-slider .swiper-slide { position: absolute; inset: 0; display: flex; align-items: center; background: #1d2b4a center / cover no-repeat; opacity: 0; transition: opacity .9s ease; }
.hero-slider:not(.swiper-initialized) .swiper-slide:first-child, .hero-slider .swiper-slide-active { opacity: 1; z-index: 1; }
.hero-slide__overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 20, 35, .62), rgba(10, 20, 35, .1)); }
.hero-slide__content { position: relative; }
.hero-slide__title { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.1; margin: 0 0 16px; max-width: 14em; font-weight: 700; }
.hero-slide__text { font-size: 1.25rem; max-width: 34em; margin: 0 0 28px; }
.swiper-pagination { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; gap: 8px; z-index: 3; }
.swiper-pagination-bullet { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .55); border: 0; padding: 0; cursor: pointer; }
.swiper-pagination-bullet-active { background: #fff; }
.swiper-button-prev, .swiper-button-next { position: absolute; top: 50%; z-index: 3; width: 44px; height: 44px; margin-top: -22px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .35); cursor: pointer; }
.swiper-button-prev { left: 16px; }
.swiper-button-next { right: 16px; }
.swiper-button-prev::after, .swiper-button-next::after { content: ""; display: block; width: 12px; height: 12px; margin: 0 auto; border: solid #fff; border-width: 0 0 3px 3px; transform: rotate(45deg); }
.swiper-button-next::after { transform: rotate(-135deg); }
.swiper-lazy-preloader { display: none; }

.btn { display: inline-block; padding: 13px 24px; border-radius: 4px; font: 600 16px/1 system-ui, sans-serif; text-decoration: none; }
.btn--primary { background: var(--rust); color: #fff; }
.btn--ghost { border: 2px solid #fff; color: #fff; }
.btn--outline { border: 2px solid var(--rust); color: var(--rust); }

/* Sections */
.section { padding: 72px 0; }
.section h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 18px; color: var(--blue); }
.section__lead { color: var(--muted); max-width: 46em; }
.section__more { margin-top: 32px; }
.section--rooms, .section--find { background: var(--sand); }

.room-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 32px; }
.room-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(0, 0, 0, .06); }
.room-card__body { padding: 20px 22px 24px; }
.room-card__title { margin: 0 0 8px; font-size: 1.35rem; }
.room-card__price { font-weight: 700; color: var(--blue); }
.room-slider { position: relative; overflow: hidden; aspect-ratio: 3 / 2; }
.room-slider .swiper-wrapper { display: flex; height: 100%; transition: transform .5s ease; }
.room-slider .swiper-slide { flex: 0 0 100%; height: 100%; background: #e8e1d6; }
.room-slider img { display: block; width: 100%; height: 100%; object-fit: cover; }
.room-slider .swiper-button-prev, .room-slider .swiper-button-next { width: 34px; height: 34px; margin-top: -17px; }
.room-slider .swiper-button-prev::after, .room-slider .swiper-button-next::after { width: 9px; height: 9px; }

.cafe { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.cafe__image { margin: 0; }
.cafe__image img { display: block; border-radius: 8px; }

.wp-block-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 28px 0 0; }
.wp-block-gallery .wp-block-image { margin: 0; aspect-ratio: 1; overflow: hidden; border-radius: 4px; }
.wp-block-gallery .wp-block-image img { display: block; width: 100%; height: 100%; object-fit: cover; }

.page-content { padding: 56px 0 72px; max-width: 880px; }
.entry-title { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--blue); }
.wp-block-media-text { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center; margin: 40px 0; }
.wp-block-media-text__media { margin: 0; }
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table td, .wp-block-table th { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.wpcf7-form input[type="text"], .wpcf7-form input[type="email"], .wpcf7-form textarea { width: 100%; padding: 10px; border: 1px solid #b9b2a8; border-radius: 4px; font: inherit; }
.wpcf7-submit { background: var(--rust); color: #fff; border: 0; padding: 12px 26px; border-radius: 4px; font: 600 16px system-ui, sans-serif; }

.site-footer { background: var(--blue); color: #dfe6ee; padding: 48px 0 20px; font: 15px/1.6 system-ui, sans-serif; }
.site-footer a { color: #fff; }
.site-footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-title { font-weight: 700; color: #fff; }
.social-links { list-style: none; padding: 0; margin: 0; }
.site-info { margin-top: 32px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 13px; }

@media (max-width: 900px) {
  .room-grid { grid-template-columns: 1fr 1fr; }
  .cafe, .wp-block-media-text { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .menu-toggle { display: block; width: 44px; height: 44px; border: 0; background: none; }
  .menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after { display: block; width: 26px; height: 3px; background: var(--ink); position: relative; content: ""; }
  .menu-toggle__bars::before { position: absolute; top: -8px; }
  .menu-toggle__bars::after { position: absolute; top: 8px; }
  .nav-menu { display: none; }
  .main-navigation.toggled .nav-menu { display: flex; flex-direction: column; position: absolute; left: 0; right: 0; top: 100%; background: #fff; padding: 20px; }
  .topbar__inner { justify-content: center; font-size: 13px; gap: 14px; }
  .custom-logo { width: 170px; }
  .room-grid, .site-footer__grid { grid-template-columns: 1fr; }
  .wp-block-gallery { grid-template-columns: 1fr 1fr; }
  .hero-slider { min-height: 460px; }
}
