/*
Theme Name: RistnaSadam
Theme URI: https://www.ristnasadam.ee/
Author: Migration
Author URI: https://www.ristnasadam.ee/
Description: Custom theme for Ristna Sadam migrated from Joomla.
Version: 1.0.0
Text Domain: ristnasadam
*/

/* Align SP Page Builder rows with Helix container width. */
.sppb-row-container {
    max-width: 1170px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

html,
body {
    height: 100%;
}

body {
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.body-wrapper {
    flex: 1 0 auto;
}

#sp-main-body {
    padding-top: 24px;
}

.ristna-home#sp-main-body {
    padding-top: 0;
}

.page-content > :not(.sppb-section) {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
}

.page-content:not(.page-content--home) {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 20px;
    width: 100%;
}

.page-content > .alignwide {
    max-width: 1240px;
}

.page-content > .alignfull {
    max-width: none;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: 0;
    padding-right: 0;
}



.page-content:not(.page-content--home) .foogallery,
.page-content:not(.page-content--home) .wp-block-gallery,
.page-content:not(.page-content--home) .blocks-gallery-grid,
.page-content:not(.page-content--home) .gallery {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
}

.page-content--home > section {
    margin-bottom: 32px;
}

.page-content--home .wp-block-image {
    text-align: center;
}

.page-content--home p {
    text-align: center;
}

.page-content--home .wp-block-image img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.page-content--home .wp-block-image .wp-image-133 {
    margin-top: 20px;
    margin-bottom: 20px;
}

.page-content--home .wp-block-image .wp-image-134 {
    margin-top: 35px;
    margin-bottom: 45px;
}

.ristna-home > .row {
    margin-left: 0;
    margin-right: 0;
}

.ristna-home > .row > #sp-component {
    padding-left: 0;
    padding-right: 0;
}

.ristna-map iframe {
    width: 100%;
    height: 450px;
    border: 0;
    display: block;
}

.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
    font-family: "Open Sans", sans-serif;
    color: #0430a0;
    margin-top: 24px;
    margin-bottom: 12px;
    text-transform: none;
}

.page-content h1 {
    font-weight: 800;
}

.page-content h2 {
    font-weight: 600;
}

.page-content h3,
.page-content h4 {
    font-weight: 400;
}

.page-content h5,
.page-content h6 {
    font-weight: 600;
}

.page-content h3 {
    margin-bottom: 10px;
}

.page-content > .wp-block-heading {
    text-align: center;
}

.foogallery {
    margin-top: 15px;
    margin-bottom: 15px;
}

.ristna-topbar {
    background: #ebebeb;
    color: #243865;
    font-size: 14px;
}

.ristna-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 3px 0;
}

.ristna-topbar__left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ristna-lang {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ristna-lang img,
.ristna-topbar__social img {
    display: block;
    width: 24px;
    height: 24px;
}

.ristna-topbar__email {
    color: #000203;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ristna-topbar__email:hover {
    color: #243865;
}

.ristna-header {
    background: #243865;
    color: #ffffff;
}

#sp-header.ristna-header {
    background: #243865;
    color: #d9d6d6;
}

#sp-header.ristna-header a {
    color: #ffffff;
}

#sp-header.ristna-header a:hover {
    color: #f5bc11;
}

.ristna-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 90px;
    padding: 0;
}

.ristna-header__brand,
.ristna-header__nav {
    display: flex;
    align-items: center;
    height: 100%;
}

.ristna-header__brand img {
    display: block;
    max-height: 80px;
    height: auto;
}

.ristna-header__nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ristna-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ristna-nav > li > a {
    color: #ffffff;
    font-weight: 600;
    display: flex;
    align-items: center;
    height: 90px;
}

.ristna-nav > li.sp-has-child > a::after {
    margin-left: 3px;
}

@media (max-width: 767px) {
    .ristna-topbar__inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .ristna-header__inner {
        min-height: 70px;
    }

    .ristna-nav > li > a {
        height: auto;
    }
}

/* Match contact page font sizes to original (12pt in content spans). */
.ristna-page-contact .sppb-addon-content {
    font-size: 16px;
    line-height: 1.7;
}

.ristna-404-message {
    max-width: 900px;
    margin: 60px auto;
    padding: 60px 30px;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(36, 56, 101, 0.15);
}

.ristna-404-message p {
    margin: 12px 0;
    font-size: 30px;
    line-height: 1.3;
}

.ristna-footer {
    background: #243865;
    color: #ffffff;
    padding: 48px 0 28px;
    margin-top: 125px;
    font-size: 16px;
    line-height: 1.6;
    text-align: left;
}

body.page-template-page-home .ristna-footer {
    margin-top: 5px;
}

#sp-footer.ristna-footer {
    background: #243865;
    color: #ffffff;
    text-align: left;
}

#sp-footer.ristna-footer a {
    color: #ffffff;
}

#sp-footer.ristna-footer a:hover {
    color: #c7b377;
}

.ristna-footer__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 36px;
}

.ristna-footer__col h3 {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: #ffffff;
}

.ristna-footer__quote {
    margin: 0 0 8px;
    font-style: italic;
    font-size: 16px;
}

.ristna-footer__author {
    margin: 0;
    font-size: 16px;
}

.ristna-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ristna-footer__links li {
    margin-bottom: 6px;
}

.ristna-footer__partners {
    text-align: center;
}

.ristna-footer__partners-grid {
    display: grid;
    gap: 12px;
}

.ristna-footer__partners-grid img {
    display: block;
    max-width: 100%;
    height: auto;
}

.ristna-footer__email {
    margin: 0 0 8px;
}

.ristna-footer__contact address {
    margin: 0 0 8px;
    font-style: normal;
    line-height: 1.6;
}

.ristna-footer__coords {
    margin: 0;
}

.ristna-footer__widgets {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.ristna-footer__bottom {
    margin-top: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 991px) {
    .ristna-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ristna-footer__grid {
        grid-template-columns: 1fr;
    }
}

/*  ============ NEW =========== */
.ristna-rooms-cols {
    gap: 16px;
}

.ristna-gallery-col .foogallery,
.ristna-gallery-col .foogallery-container,
.ristna-gallery-col .foogallery-wrap {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
}

/* Center the list vertically and align it to the left edge (closer to gallery) */
.ristna-list-col {
    display: flex;
    flex-direction: column;
    justify-content: center;   /* vertical centering */
    align-items: flex-start;   /* left align */
}

.ristna-list-col .wp-block-list {
    margin: 0;
    padding-left: 18px;        /* reduce default indent */
}

/* Таблица Sadama hinnakiri: оформление без поломки валидации Gutenberg */
.wp-block-table.sadama-hinnakiri-table table{
  max-width: 664px;          /* как в вашем HTML */
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  border-collapse: collapse;
  border: 1px solid #000000;
}

.wp-block-table.sadama-hinnakiri-table th,
.wp-block-table.sadama-hinnakiri-table td{
  border: 1px solid #000000;
}

/* Шапка */
.wp-block-table.sadama-hinnakiri-table thead th{
  background: #043379;
  color: #c7b377;
  font-weight: 700;
  text-align: center;
}

/* 3-й столбец по центру (как у вас) */
.wp-block-table.sadama-hinnakiri-table tbody td:nth-child(3){
  text-align: center;
  vertical-align: middle;
}

/*  ============ END NEW ======== */
