/*
Theme Name: Ainola Terveystalo
Description: Modern Bootstrap theme for Ainola Terveystalo health center
Version: 1.0
Author: Custom Theme
*/

/* Bootstrap CSS */
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css');

/* Custom Styles */
:root {
    --primary-color: #577770;
    --secondary-color: #F1EDED;
    --accent-color: #AA9A8A;
    --neutral-color: #A9BCB4;
    --text-dark: #261E1E;
    --text-light: #AA9A8A;
}

@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');

* {
    font-family: 'Lato', sans-serif;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    padding-top: 0;
}

/* Header Styles */
header {
    width: 100%;
}

.top-bar {
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: #577770 !important;
    color: white !important;
}

.top-bar.bg-primary {
    background: #577770 !important;
}

.top-bar-mobile {
    font-size: 0.85rem;
    text-align: center;
    background: #577770 !important;
    color: white !important;
}

.top-bar-mobile.bg-primary {
    background: #577770 !important;
}

.notification-text {
    color: #FFB3F1;
    font-weight: 500;
}

.top-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 1rem;
    white-space: nowrap;
}

.top-info span {
    white-space: nowrap;
    color: white;
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
    color: white !important;
}

.navbar-brand img {
    width: 163px;
    height: auto;
}

.navbar-nav {
    margin-left: auto !important;
    justify-content: flex-end;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: white !important;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Header Action Button Styles */
.header-actions .btn {
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.header-actions .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Sticky Navbar Effects */
.navbar.sticky-navbar.scrolled {
    background: #577770 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sticky-navbar.scrolled {
    background: #577770 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sticky-navbar {
    background: transparent !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1020 !important;
    transition: all 0.3s ease;
    width: 100%;
}

/* Override any Bootstrap conflicts */
.navbar.sticky-navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1020 !important;
}

.navbar {
    padding: 1rem 0;
}

/* Mobile Navigation */
@media (max-width: 991.98px) {
    .navbar-collapse {
        display: none !important;
    }
    
    .sticky-navbar {
        position: sticky !important;
        top: 0 !important;
        z-index: 1020 !important;
    }
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Sidebar */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: var(--primary-color);
    z-index: 99999;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.mobile-sidebar.active {
    left: 0;
}

.mobile-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-bottom: 1px solid #eee;
    min-height: 60px;
}

.mobile-sidebar-logo img {
    width: 163px;
    height: auto;
}

.mobile-logo-text {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: bold;
    line-height: 1.2;
    text-decoration: none;
}

.mobile-logo-text:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.mobile-sidebar-close {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.mobile-sidebar-close:hover {
    background-color: rgba(44, 90, 160, 0.1);
}

.mobile-sidebar-content {
    padding: 0;
    background: var(--primary-color);
    height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
}

.mobile-nav {
    padding: 1rem 0;
    flex-grow: 1;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.mobile-nav-link {
    display: block;
    padding: 1.2rem 1.5rem;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: white;
    text-decoration: none;
}

.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: rgba(0, 0, 0, 0.1);
}

.mobile-submenu-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-submenu-item:last-child {
    border-bottom: none;
}

.mobile-submenu .mobile-nav-link {
    padding-left: 3rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.mobile-sidebar-actions {
    padding: 2rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    background: var(--primary-color);
}

.mobile-sidebar-actions .btn {
    width: 100%;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 1.1rem;
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-sidebar-actions .btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Mobile Sidebar Overlay */
.mobile-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Prevent body scroll when sidebar is open */
body.sidebar-open {
    overflow: hidden;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a5f 100%);
    color: white;
    padding: 80px 0;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 2rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.card-header {
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: bold;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #1e3a5f;
    border-color: #1e3a5f;
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 500;
}

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

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 40px 0 20px;
}

.footer h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
}

/* 404 Page Styles */
.error-404 {
    text-align: center;
    padding: 80px 0;
}

.error-404 h1 {
    font-size: 6rem;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 1rem;
}

.error-404 h2 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.error-404 p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* Services Section */
.services-section {
    padding: 60px 0;
    background-color: var(--secondary-color);
}

.service-card {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Contact Section */
.contact-section {
    padding: 60px 0;
}

.contact-info {
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .error-404 h1 {
        font-size: 4rem;
    }
}

/* WordPress Specific Styles */
.wp-block-image {
    margin: 2rem 0;
}

.wp-block-quote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    font-style: italic;
    margin: 2rem 0;
}

.alignwide {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
}

/* FORCE STICKY NAVBAR SCROLLED STATE - HIGHEST PRIORITY */
.navbar.navbar-expand-lg.navbar-light.sticky-navbar.scrolled {
    background: #577770 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    padding: 0.5rem 0 !important;
}

.navbar.sticky-navbar.scrolled {
    background: #577770 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
    padding: 0.5rem 0 !important;
}

/* Top Bar - Keep at top and visible */
.elementor-element-71bca89,
div[data-id="71bca89"],
.elementor-section[data-id="71bca89"] {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    background: #577770 !important;
    display: block !important;
    visibility: visible !important;
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    padding: 0px 0px 0px 0px !important;
    transition: background 0.3s, border 0.3s, border-radius 0.3s, box-shadow 0.3s !important;
}

/* Header - Sticky below top bar, transparent initially */
#header,
.elementor-element-584819b,
div[data-id="584819b"],
.elementor-element[data-id="584819b"] {
    position: sticky !important;
    top: 60px !important; /* Stick below top bar when scrolling */
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 10001 !important; /* Higher than top bar */
    background: transparent !important; /* Transparent initially */
    transition: all 0.3s ease !important;
}

/* Header becomes green when scrolled - use JavaScript class */
#header.scrolled,
.elementor-element-584819b.scrolled,
div[data-id="584819b"].scrolled,
.elementor-element[data-id="584819b"].scrolled {
    background: #577770 !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* Force inner containers to be transparent initially */
#header .e-con-inner,
.elementor-element-584819b .e-con-inner,
div[data-id="584819b"] .e-con-inner,
.elementor-element[data-id="584819b"] .e-con-inner {
    background: transparent !important;
}

/* Inner containers become green when scrolled */
#header.scrolled .e-con-inner,
.elementor-element-584819b.scrolled .e-con-inner,
div[data-id="584819b"].scrolled .e-con-inner,
.elementor-element[data-id="584819b"].scrolled .e-con-inner {
    background: #577770 !important;
}

/* Target the specific containers from your HTML */
.elementor-element-4c52cc0,
.elementor-element-0110c7b {
    background: transparent !important;
}

/* Containers become green when scrolled */
.scrolled .elementor-element-4c52cc0,
.scrolled .elementor-element-0110c7b {
    background: #577770 !important;
}

/* No body padding needed with sticky positioning */

/* Ainola Pricing Widget Styles */
.ainola-pricing-widget {
    font-family: 'Lato', sans-serif;
    margin: 2rem 0;
}

/* Category header row styling */
.ainola-pricing-widget .category-header-row {
    background: var(--primary-color, #577770) !important;
    color: white !important;
    font-weight: bold;
    border-top: 2px solid var(--accent-color, #AA9A8A);
}

.ainola-pricing-widget .category-header-row .table-cell {
    color: white !important;
    font-weight: bold;
}

.ainola-pricing-widget .category-name {
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pricing-container {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Left Column - Categories (30%) */
.pricing-categories {
    flex: 0 0 30%;
    background: var(--primary-color, #577770);
    padding: 2rem 1.5rem;
    min-height: 500px;
}

.categories-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

.category-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.category-tab {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: left;
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateX(5px);
}

.category-tab.active {
    background: var(--secondary-color, #A9BCB4);
    border-color: white;
    color: var(--text-color, #261E16);
    font-weight: 600;
}

.tab-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.tab-text {
    flex: 1;
}

/* Right Column - Pricing Table (70%) */
.pricing-content {
    flex: 0 0 70%;
    padding: 2rem;
}

.pricing-category {
    display: none;
}

.pricing-category.active {
    display: block;
}

.category-header {
    margin-bottom: 2rem;
}

.category-header h2 {
    color: var(--primary-color, #577770);
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 2rem 0;
    border-bottom: 3px solid var(--accent-color, #AA9A8A);
    padding-bottom: 0.5rem;
}


.pricing-table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    background: var(--primary-color, #577770);
    color: white;
    font-weight: 600;
}

.header-cell {
    padding: 1rem;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.header-cell:last-child {
    border-right: none;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    border-bottom: 1px solid var(--neutral-color, #F1EDED);
    transition: background-color 0.3s ease;
}

.table-row:hover {
    background: var(--neutral-color, #F1EDED);
}

.table-row:last-child {
    border-bottom: none;
}

.table-cell {
    padding: 1rem;
    text-align: center;
    color: var(--text-color, #261E16);
    border-right: 1px solid var(--neutral-color, #F1EDED);
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-cell:last-child {
    border-right: none;
}

.table-cell.service {
    text-align: left;
    justify-content: flex-start;
    font-weight: 500;
}

.table-cell.price-after {
    font-weight: 600;
    color: var(--primary-color, #577770);
    font-size: 1.1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .pricing-container {
        flex-direction: column;
        gap: 0;
    }
    
    .pricing-categories {
        flex: none;
        padding: 1.5rem 1rem;
        min-height: auto;
    }
    
    .categories-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }
    
    .category-tabs {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.75rem;
        padding-bottom: 0.5rem;
    }
    
    .category-tab {
        flex-shrink: 0;
        min-width: 120px;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .pricing-content {
        flex: none;
        padding: 1.5rem 1rem;
    }
    
    .category-header h2 {
        font-size: 1.5rem;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .header-cell,
    .table-cell {
        border-right: none;
        border-bottom: 1px solid var(--neutral-color, #F1EDED);
        padding: 0.75rem;
        text-align: left;
        justify-content: flex-start;
    }
    
    .header-cell:before,
    .table-cell:before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--primary-color, #577770);
        margin-right: 0.5rem;
        min-width: 120px;
    }
    
    .header-cell.service:before { content: "Teenus:"; }
    .header-cell.price-after:before { content: "Hinta Kela-korvauksen jälkeen:"; }
    .header-cell.price-before:before { content: "Hinta ilman Kela-korvausta:"; }
    .header-cell.kela:before { content: "Kela-korvaus:"; }
    
    .table-cell.service:before { content: "Teenus:"; }
    .table-cell.price-after:before { content: "Hinta Kela-korvauksen jälkeen:"; }
    .table-cell.price-before:before { content: "Hinta ilman Kela-korvausta:"; }
    .table-cell.kela:before { content: "Kela-korvaus:"; }
}

@media (max-width: 480px) {
    .pricing-container {
        margin: 1rem;
        border-radius: 8px;
    }
    
    .pricing-categories,
    .pricing-content {
        padding: 1rem;
    }
    
    .category-tab {
        min-width: 100px;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .tab-icon {
        font-size: 1rem;
    }
}
#rek-link a{
	color;#fffff !important;
}