/* ──────────────────────────────────────────────────────
   RSA – Custom Styles
   ────────────────────────────────────────────────────── */

/* ─── Hide page title (handled by Elementor layouts) ─── */
.page-header {
    display: none;
}

/* ─── Wave utility classes ───────────────────────────────
   Lisää Elementor-containerin "CSS Classes" -kenttään:

   rsa-wave-bottom        → aalto alas, valkoinen
   rsa-wave-top           → aalto ylös, valkoinen
   rsa-wave-bottom-soft   → aalto alas, #F5F9FF
   rsa-wave-top-soft      → aalto ylös, #F5F9FF
   rsa-wave-bg            → vaaleansininen tausta + aallot ylös ja alas (valkoinen)
   ─────────────────────────────────────────────────────── */

:is(
  .rsa-wave-bottom,
  .rsa-wave-top,
  .rsa-wave-bottom-soft,
  .rsa-wave-top-soft,
  .rsa-wave-bg
) {
    position: relative;
    overflow: visible !important;
}

/* Wave SVG helpers — bottom (flipped for top variants) */
.rsa-wave-bottom::after,
.rsa-wave-bg::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 70px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath d='M0,35 C240,70 480,0 720,35 C960,70 1200,0 1440,35 L1440,70 L0,70 Z' fill='%23FFFFFF'/%3E%3C/svg%3E") no-repeat bottom center;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}

.rsa-wave-bottom-soft::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 70px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath d='M0,35 C240,70 480,0 720,35 C960,70 1200,0 1440,35 L1440,70 L0,70 Z' fill='%23F5F9FF'/%3E%3C/svg%3E") no-repeat bottom center;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}

.rsa-wave-top::before,
.rsa-wave-bg::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 70px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath d='M0,35 C240,0 480,70 720,35 C960,0 1200,70 1440,35 L1440,0 L0,0 Z' fill='%23FFFFFF'/%3E%3C/svg%3E") no-repeat top center;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}

.rsa-wave-top-soft::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 70px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 70' preserveAspectRatio='none'%3E%3Cpath d='M0,35 C240,0 480,70 720,35 C960,0 1200,70 1440,35 L1440,0 L0,0 Z' fill='%23F5F9FF'/%3E%3C/svg%3E") no-repeat top center;
    background-size: 100% 100%;
    pointer-events: none;
    z-index: 2;
}

.rsa-wave-bg {
    background-color: #EAF2FB;
}

/* Extra padding so content isn't hidden under the waves */
.rsa-wave-bg { padding-top: 80px !important; padding-bottom: 80px !important; }
.rsa-wave-top, .rsa-wave-top-soft { padding-top: 80px !important; }
.rsa-wave-bottom, .rsa-wave-bottom-soft { padding-bottom: 80px !important; }

/* ─── Base ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body,
.elementor-widget-container,
.elementor-element {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--rsa-text);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.elementor-heading-title,
.elementor-widget-heading .elementor-heading-title {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--rsa-dark);
    line-height: 1.15;
}

/* Nav, buttons, labels stay Manrope */
.site-navigation a,
.elementor-button,
.rsa-topbar,
.rsa-footer {
    font-family: 'Manrope', sans-serif;
}

a { color: var(--rsa-blue); }
a:hover { color: var(--rsa-blue-dark); }

/* ─── Topbar ─────────────────────────────────────────── */
.rsa-topbar {
    background: var(--rsa-dark);
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    padding: 8px 0;
}
.rsa-topbar__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}
.rsa-topbar__item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.rsa-topbar__item svg {
    width: 12px;
    height: 12px;
    fill: rgba(255,255,255,0.6);
    flex-shrink: 0;
}
.rsa-topbar__item a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}
.rsa-topbar__item a:hover { color: #fff; }

/* ─── Header ─────────────────────────────────────────── */
#site-header,
.site-header {
    background: var(--rsa-white);
    box-shadow: 0 2px 16px rgba(27,79,155,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-wrap,
.site-header .header-wrap {
    max-width: 1200px;
    padding: 0 24px;
}

/* Logo */
.site-branding img,
.custom-logo {
    max-height: 52px;
    width: auto;
}

/* Nav */
.main-nav a,
.nav-menu a,
.site-navigation a {
    font-size: 15px;
    font-weight: 500;
    color: var(--rsa-dark);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--rsa-radius);
    transition: background var(--rsa-transition), color var(--rsa-transition);
}
.main-nav a:hover,
.nav-menu a:hover,
.site-navigation a:hover,
.main-nav .current-menu-item > a,
.nav-menu .current-menu-item > a {
    color: var(--rsa-blue);
    background: var(--rsa-blue-light);
}

/* Dropdown menus */
.main-nav .sub-menu,
.nav-menu .sub-menu {
    background: var(--rsa-white);
    border-radius: var(--rsa-radius);
    box-shadow: var(--rsa-shadow-md);
    border: 1px solid var(--rsa-border);
    padding: 8px 0;
    min-width: 220px;
}
.main-nav .sub-menu a,
.nav-menu .sub-menu a {
    padding: 10px 20px;
    border-radius: 0;
    font-size: 14px;
}

/* Language switcher */
.rsa-lang-switcher {
    display: flex;
    gap: 4px;
    margin-left: 16px;
}
.rsa-lang-switcher a {
    font-size: 12px;
    font-weight: 600;
    color: var(--rsa-muted);
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--rsa-border);
    transition: all var(--rsa-transition);
}
.rsa-lang-switcher a:hover,
.rsa-lang-switcher a.active {
    background: var(--rsa-blue);
    color: var(--rsa-white);
    border-color: var(--rsa-blue);
}

/* ─── Buttons ────────────────────────────────────────── */
.elementor-button {
    font-family: 'Manrope', sans-serif !important;
    font-weight: 600 !important;
    border-radius: var(--rsa-radius) !important;
    letter-spacing: 0.01em !important;
    transition: all var(--rsa-transition) !important;
}

/* Primary blue button */
.rsa-btn-primary .elementor-button,
.elementor-element.rsa-btn-primary .elementor-button {
    background-color: var(--rsa-blue) !important;
    color: var(--rsa-white) !important;
}
.rsa-btn-primary .elementor-button:hover,
.elementor-element.rsa-btn-primary .elementor-button:hover {
    background-color: var(--rsa-blue-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(27,79,155,0.3) !important;
}

/* Secondary orange button */
.rsa-btn-secondary .elementor-button,
.elementor-element.rsa-btn-secondary .elementor-button {
    background-color: var(--rsa-orange) !important;
    color: var(--rsa-white) !important;
}
.rsa-btn-secondary .elementor-button:hover,
.elementor-element.rsa-btn-secondary .elementor-button:hover {
    background-color: var(--rsa-orange-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(232,98,42,0.3) !important;
}

/* Ghost/outline button */
.rsa-btn-outline .elementor-button,
.elementor-element.rsa-btn-outline .elementor-button {
    background-color: transparent !important;
    color: var(--rsa-blue) !important;
    border: 2px solid var(--rsa-blue) !important;
}
.rsa-btn-outline .elementor-button:hover {
    background-color: var(--rsa-blue) !important;
    color: var(--rsa-white) !important;
}

/* ─── Feature cards ──────────────────────────────────── */
.rsa-feature-card {
    background: var(--rsa-white);
    border-radius: var(--rsa-radius-lg);
    box-shadow: var(--rsa-shadow-sm);
    border: 1px solid var(--rsa-border);
    transition: box-shadow var(--rsa-transition), transform var(--rsa-transition);
}
.rsa-feature-card:hover {
    box-shadow: var(--rsa-shadow-md);
    transform: translateY(-3px);
}

/* ─── Icon boxes ─────────────────────────────────────── */
.elementor-icon-box-icon .elementor-icon {
    transition: transform var(--rsa-transition);
}
.elementor-widget-icon-box:hover .elementor-icon-box-icon .elementor-icon {
    transform: scale(1.1);
}

/* ─── Icon list ──────────────────────────────────────── */
.elementor-icon-list-item > a {
    color: var(--rsa-text) !important;
    text-decoration: none;
    transition: color var(--rsa-transition);
}
.elementor-icon-list-item > a:hover {
    color: var(--rsa-blue) !important;
}

/* ─── Section backgrounds ────────────────────────────── */
.rsa-section-blue-light {
    background-color: var(--rsa-blue-light) !important;
}
.rsa-section-soft {
    background-color: var(--rsa-bg-soft) !important;
}

/* ─── Wave SVG shape ─────────────────────────────────── */
.elementor-shape svg {
    fill: inherit;
}

/* ─── Hero section ───────────────────────────────────── */
.rsa-hero-section {
    background: linear-gradient(135deg, var(--rsa-blue) 0%, var(--rsa-blue-mid) 100%);
    position: relative;
    overflow: hidden;
}
.rsa-hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(20, 40, 80, 0.15);
}

/* ─── Property cards ─────────────────────────────────── */
.rsa-property-card {
    background: var(--rsa-white);
    border-radius: var(--rsa-radius-lg);
    overflow: hidden;
    box-shadow: var(--rsa-shadow-sm);
    border: 1px solid var(--rsa-border);
    transition: box-shadow var(--rsa-transition), transform var(--rsa-transition);
}
.rsa-property-card:hover {
    box-shadow: var(--rsa-shadow-md);
    transform: translateY(-4px);
}
.rsa-property-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.rsa-property-card__body {
    padding: 20px;
}
.rsa-property-card__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--rsa-dark);
    margin: 0 0 8px;
}
.rsa-property-card__meta {
    font-size: 13px;
    color: var(--rsa-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rsa-property-card__meta span {
    background: var(--rsa-blue-light);
    color: var(--rsa-blue);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

/* ─── Contact section ────────────────────────────────── */
.rsa-contact-section {
    background: var(--rsa-bg-soft);
    border-top: 1px solid var(--rsa-border);
}

/* ─── Footer ─────────────────────────────────────────── */
.rsa-footer {
    background: var(--rsa-dark);
    color: rgba(255,255,255,0.7);
    font-family: 'Manrope', sans-serif;
}

.rsa-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 56px 24px 48px;
    display: flex;
    gap: 64px;
    flex-wrap: wrap;
}

.rsa-footer__col {
    flex: 1;
    min-width: 200px;
}

.rsa-footer__logo img { max-height: 48px; width: auto; filter: brightness(0) invert(1); }
.rsa-footer__logo-text a { color: #fff; text-decoration: none; font-size: 20px; font-weight: 700; }
.rsa-footer__tagline { font-size: 13px; color: rgba(255,255,255,0.45); margin: 8px 0 24px; }

.rsa-footer__contact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}
.rsa-footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: rgba(255,255,255,0.7);
}
.rsa-footer__contact svg {
    width: 13px;
    height: 13px;
    fill: rgba(255,255,255,0.4);
    flex-shrink: 0;
    margin-top: 2px;
}
.rsa-footer__contact a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color var(--rsa-transition);
}
.rsa-footer__contact a:hover { color: #fff; }

.rsa-footer__heading {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 18px;
}

.rsa-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rsa-footer__links a {
    font-size: 14px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    transition: color var(--rsa-transition);
}
.rsa-footer__links a:hover { color: #fff; }

.rsa-footer__bar {
    border-top: 1px solid rgba(255,255,255,0.08);
}
.rsa-footer__bar .rsa-footer__inner {
    padding-top: 20px;
    padding-bottom: 20px;
    font-size: 13px;
    color: rgba(255,255,255,0.35);
}

/* ─── Asumisopas accordion layout ───────────────────────── */
.rsa-acc-img-wrap {
    position: sticky;
    top: 100px;
    align-self: flex-start;
}
.rsa-acc-img-wrap img {
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(27,79,155,0.13);
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: opacity .3s ease, transform .3s ease;
    display: block;
}
.rsa-acc-img-wrap img.rsa-img-fading {
    opacity: 0;
    transform: scale(.97);
}

/* Style the native Elementor accordion to match RSA brand */
#rsa-acc-widget .elementor-accordion-item {
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: 10px;
}
#rsa-acc-widget .elementor-tab-title {
    transition: background .2s !important;
}
#rsa-acc-widget .elementor-tab-title:focus-visible {
    outline: 2px solid #1B4F9B;
    outline-offset: -2px;
}

@media (max-width: 768px) {
    .rsa-acc-img-wrap {
        position: static;
        order: -1;
        width: 100% !important;
    }
}

/* ─── Staff cards ───────────────────────────────────────── */
.rsa-staff-card .elementor-widget-image img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 16px;
    border: 3px solid var(--rsa-blue-light);
}
.rsa-staff-card .elementor-widget-heading { margin-bottom: 4px; }
.rsa-staff-card .elementor-widget-text-editor { margin-bottom: 12px; }

/* ─── Property images ───────────────────────────────────── */
.rsa-property-img img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 14px;
}

/* ─── Illustration cards ─────────────────────────────────── */
.rsa-illus-card .elementor-widget-image img {
    max-width: 160px;
    height: auto;
    margin-bottom: 8px;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
    .rsa-topbar__inner {
        gap: 12px;
    }
    .rsa-topbar__item:first-child {
        display: none; /* hide address on mobile */
    }

    /* Feature cards: stack to single column on mobile */
    .rsa-features-row {
        flex-direction: column !important;
    }
    .rsa-feature-card-wrap {
        width: 100% !important;
    }
}
