/*
Theme Name: Tromsø Helse- og Idrettsklinikk
Description: Et spesialtilpasset WordPress-theme for Tromsø Helse- og Idrettsklinikk
Author: Sveinung Karlsen
Author URI: https://sfkarlsen.no
Version: 1.0
*/ 

/* Local Font Declarations */

/* Oswald Font Family */
@font-face {
    font-display: swap;
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 300;
    src: url('./assets/fonts/oswald/Oswald-ExtraLight.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 500;
    src: url('./assets/fonts/oswald/Oswald-Medium.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Oswald';
    font-style: normal;
    font-weight: 600;
    src: url('./assets/fonts/oswald/Oswald-SemiBold.woff2') format('woff2');
}

/* Fira Sans Font Family */
@font-face {
    font-display: swap;
    font-family: 'Fira Sans';
    font-style: normal;
    font-weight: 400;
    src: url('./assets/fonts/fira-sans/FiraSans-Regular.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Fira Sans';
    font-style: italic;
    font-weight: 400;
    src: url('./assets/fonts/fira-sans/FiraSans-Italic.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Fira Sans';
    font-style: normal;
    font-weight: 500;
    src: url('./assets/fonts/fira-sans/FiraSans-Medium.woff2') format('woff2');
}

@font-face {
    font-display: swap;
    font-family: 'Fira Sans';
    font-style: italic;
    font-weight: 500;
    src: url('./assets/fonts/fira-sans/FiraSans-MediumItalic.woff2') format('woff2');
}

/* Font Variables */
:root {
    --font-heading: 'Oswald', Arial, sans-serif;
    --font-body: 'Fira Sans', Arial, sans-serif;
    --header-height: 80px;
    --color-primary: #333;
    --color-secondary: #006E6A;
    --color-accent: #FF8900;
    --color-primary-hover: #1a1a1a;
    --color-white: #ffffff;
    --color-background: #fafafa;
    --color-text: #333333;
    --color-border: #e5e5e5;
}

/* Reset */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--color-background);
}

/* Typography */
body {
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600; /* SemiBold */
    line-height: 1.2;
}

/* Font weights and styles available:
   Oswald: 300 (ExtraLight), 500 (Medium), 600 (SemiBold)
   Fira Sans: 400 (Regular), 400 italic, 500 (Medium), 500 italic
   
   Usage examples:
   font-weight: 300; // Oswald ExtraLight for subtle headings
   font-weight: 500; // Oswald Medium for balanced headings
   font-weight: 600; // Oswald SemiBold for strong headings
   font-style: italic; // Available for Fira Sans 400 & 500 weights
*/

/* Booking Button Styles */
.booking-button {
    display: inline-block;
    background: var(--color-secondary);
    color: var(--color-white);
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 16px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.booking-button:hover {
    background: var(--color-accent);
    color: var(--color-white);
    text-decoration: none;
    transform: translateY(-1px);
}

.booking-button:focus {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

.booking-button:active {
    transform: translateY(0);
}

/* Desktop booking button */
/* .desktop-booking-button is visible on desktop by default */

/* Mobile booking button */
.mobile-booking-button {
    display: none;
    margin-top: 20px;
    width: calc(100% - 0px);
    text-align: center;
    box-sizing: border-box;
} 

/* Header Styles */
.site-header {
    background-color: var(--color-white);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height);
}

/* Site Branding */
.site-branding {
    display: flex;
    align-items: center;
}

.site-branding .custom-logo-link {
    display: inline-block;
    line-height: 1;
}

.site-branding .custom-logo {
    max-height: 60px;
    width: auto;
    vertical-align: middle;
}

.site-title {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 24px;
    line-height: 1.2;
}

.site-title a {
    color: var(--color-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title a:hover {
    color: var(--color-primary);
}

.site-description {
    margin: 0;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Header Navigation Container */
.header-navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.primary-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.primary-menu li {
    position: relative;
}

.primary-menu a {
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    padding: 10px 0;
    transition: color 0.3s ease;
    position: relative;
}

.primary-menu a:hover,
.primary-menu a:focus {
    color: var(--color-primary);
}

.primary-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.primary-menu a:hover::after,
.primary-menu a:focus::after {
    width: 100%;
}

/* Current menu item */
.primary-menu .current-menu-item > a,
.primary-menu .current-menu-ancestor > a {
    color: var(--color-primary);
}

.primary-menu .current-menu-item > a::after,
.primary-menu .current-menu-ancestor > a::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: var(--color-text);
    transition: all 0.3s ease;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 24px;
    height: 16px;
    position: relative;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    left: 0;
    transform-origin: center;
}

.hamburger span:nth-child(1) {
    top: 0;
}

.hamburger span:nth-child(2) {
    top: 7px;
}

.hamburger span:nth-child(3) {
    top: 14px;
}

/* Hamburger animation when menu is open */
.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
    transform: rotate(45deg);
    top: 7px;
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
    transform: rotate(-45deg);
    top: 7px;
}

.menu-toggle:hover .hamburger span {
    background-color: var(--color-primary);
}

.menu-toggle:hover {
    color: var(--color-primary);
}

/* Dropdown Menus */
.primary-menu .menu-item-has-children > a::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 8px;
    vertical-align: middle;
}

.primary-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--color-white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 6px;
    padding: 15px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.primary-menu .menu-item:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.primary-menu .sub-menu li {
    width: 100%;
}

.primary-menu .sub-menu a {
    display: block;
    padding: 8px 20px;
    font-size: 15px;
    border-radius: 0;
}

.primary-menu .sub-menu a:hover {
    background-color: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }
    
    .header-navigation {
        gap: 15px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    /* Hide desktop booking button on mobile */
    .desktop-booking-button {
        display: none;
    }
    
    /* Show mobile booking button inside menu */
    .mobile-booking-button {
        display: block;
    }
    
    .mobile-menu-container {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-white);
        border-top: 1px solid var(--color-border);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        padding: 20px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        max-height: 0;
        overflow: hidden;
    }
    
    .mobile-menu-container.toggled {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        max-height: 500px;
    }
    
    .mobile-menu-container .primary-menu {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 0;
    }
    
    .mobile-menu-container .primary-menu li {
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease;
    }
    
    .mobile-menu-container.toggled .primary-menu li {
        opacity: 1;
        transform: translateX(0);
    }
    
    /* Staggered animation for menu items */
    .mobile-menu-container.toggled .primary-menu li:nth-child(1) { transition-delay: 0.1s; }
    .mobile-menu-container.toggled .primary-menu li:nth-child(2) { transition-delay: 0.15s; }
    .mobile-menu-container.toggled .primary-menu li:nth-child(3) { transition-delay: 0.2s; }
    .mobile-menu-container.toggled .primary-menu li:nth-child(4) { transition-delay: 0.25s; }
    .mobile-menu-container.toggled .primary-menu li:nth-child(5) { transition-delay: 0.3s; }
    .mobile-menu-container.toggled .primary-menu li:nth-child(6) { transition-delay: 0.35s; }
    
    .mobile-booking-button {
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease 0.4s;
    }
    
    .mobile-menu-container.toggled .mobile-booking-button {
        opacity: 1;
        transform: translateY(0);
    }
    
    .primary-menu li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .primary-menu li:last-child {
        border-bottom: none;
    }
    
    .primary-menu a {
        display: block;
        padding: 15px 0;
        font-size: 16px;
    }
    
    .primary-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #f8f9fa;
        margin-top: 10px;
        border-radius: 6px;
    }
    
    .site-title {
        font-size: 20px;
    }
    
    .site-description {
        font-size: 12px;
    }
}

/* Hero Section */
.hero-section {
    min-height: 600px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-color: #f5f5f5; /* Fallback color */
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content {
    width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 40px 20px;
    text-align: left;
    position: relative;
    z-index: 2;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Hero Content Elements */
.hero-logo {
    margin-bottom: 30px;
}

.hero-logo-img {
    max-height: 80px;
    width: auto;
    filter: brightness(0) invert(1); /* Make logo white */
}

.hero-title {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 2.5rem;
    margin: 0 0 20px 0;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.25rem;
    font-weight: 400;
    font-style: normal;
    opacity: 0.9;
    margin: 0 0 30px 0;
    max-width: 600px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-button {
    margin-top: 25px;
}

.hero-booking-button {
    font-size: 1.1rem;
    padding: 15px 50px;
    background: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.hero-booking-button:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 500px;
    }
    
    .hero-content {
        padding: 30px 15px;
    }
    
    .hero-logo-img {
        max-height: 60px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }
    
    .hero-booking-button {
        font-size: 1rem;
        padding: 12px 40px;
    }
}

/* Message Card */
.message-card {
    background-color: var(--color-secondary);
    border-radius: 12px;
    padding: 40px 30px;
    margin-bottom: 50px;
    text-align: left;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.message-title {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 2rem;
    color: white;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.message-text {
    font-family: var(--font-body);
    font-size: 1rem;
    color: white;
    line-height: 1.6;
}

.message-text a {
    color: var(--color-accent);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.message-text a:hover,
.message-text a:focus {
    color: #ffb84d;
    text-decoration: none;
}

.message-text p {
    margin: 0 0 15px 0;
}

.message-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .message-card {
        padding: 30px 20px;
        margin-bottom: 40px;
        border-radius: 8px;
    }
    
    .message-title {
        font-size: 1.75rem;
        margin-bottom: 15px;
    }
}

/* Welcome Section */
.welcome-section {
    padding: 60px 20px;
    background-color: var(--color-background);
}

.welcome-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.welcome-title {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 2.5rem;
    color: var(--color-primary);
    margin: 0 0 30px 0;
    line-height: 1.2;
}

.welcome-text {
    font-family: var(--font-body);
    font-size: 1.125rem;
    color: var(--color-text);
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.welcome-text p {
    margin: 0 0 20px 0;
}

.welcome-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .welcome-section {
        padding: 60px 15px;
    }
    
    .welcome-title {
        font-size: 2rem;
        margin-bottom: 25px;
    }
    
    .welcome-text {
        font-size: 1rem;
    }
}

/* USP Section */
.usp-section {
    padding: 80px 20px;
    background-color: #2c2c2c;
    color: white;
}

.usp-content {
    max-width: 1200px;
    margin: 0 auto;
}

.usp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    align-items: start;
}

.usp-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.usp-icon {
    margin-bottom: 25px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.usp-icon svg {
    width: 100%;
    height: 100%;
    fill: white;
    color: white;
}

.usp-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.usp-title {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.5rem;
    color: white;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.usp-text {
    font-family: var(--font-body);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    max-width: 280px;
    text-align: left;
}

.usp-text p {
    margin: 0 0 15px 0;
}

.usp-text p:last-child {
    margin-bottom: 0;
}

/* Fix USP layout - single column for tablet and mobile */
@media (max-width: 1040px) {
    .usp-section {
        padding: 60px 15px;
    }
    
    .usp-grid {
        gap: 40px;
        grid-template-columns: 1fr;
    }
    
    .usp-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 20px;
    }
    
    .usp-title {
        font-size: 1.25rem;
    }
    
    .usp-text {
        max-width: 100%;
    }
}

/* Employees Section */
.employees-section {
    padding: 80px 20px;
    background-color: var(--color-background);
}

.employees-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.employees-title {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 2.5rem;
    color: var(--color-primary);
    margin: 0 0 30px 0;
    line-height: 1.2;
}

.employees-text {
    font-family: var(--font-body);
    font-size: 1.125rem;
    color: var(--color-text);
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

.employees-text p {
    margin: 0 0 20px 0;
}

.employees-text p:last-child {
    margin-bottom: 0;
}

/* Therapists Filters */
.therapists-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
    margin-bottom: 30px;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 10px 20px;
    border-radius: 25px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-primary);
    color: white;
}

.filter-btn:focus {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

/* Driftstilskudd Info Box */
.driftstilskudd-info-box {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 30px;
}

.driftstilskudd-info-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--color-secondary);
    color: var(--color-white);
    border-radius: 999px;
    font-family: 'Fira Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.driftstilskudd-info-link:hover,
.driftstilskudd-info-link:focus {
    opacity: 0.8;
    text-decoration: none;
    color: var(--color-white);
}

/* Therapists Grid */
.therapists-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 50px;
    justify-content: center;
}

.therapist-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 250px;
    flex-shrink: 0;
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

.therapist-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    visibility: hidden;
}

.therapist-image-link {
    display: block;
    text-decoration: none;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.therapist-image-link:hover {
    transform: translateY(-2px);
}

.therapist-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.therapist-image-link:hover .therapist-image {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.therapist-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.therapist-name {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.25rem;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.therapist-name-link {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.therapist-name-link:hover,
.therapist-name-link:focus {
    color: var(--color-secondary);
    text-decoration: none;
}

.therapist-title {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
    margin: 0;
    opacity: 0.8;
}

.therapist-away-status {
    margin-top: 10px;
    padding: 8px 16px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: #856404;
    text-align: center;
    line-height: 1.4;
}

.therapist-away-status-desktop {
    display: block;
}

.therapist-away-status-mobile {
    display: none;
}

@media (max-width: 768px) {
    .therapist-away-status-desktop {
        display: none;
    }
    
    .therapist-away-status-mobile {
        display: block;
    }
}

@media (max-width: 768px) {
    .employees-section {
        padding: 60px 15px;
    }
    
    .employees-title {
        font-size: 2rem;
        margin-bottom: 25px;
    }
    
    .employees-text {
        font-size: 1rem;
    }
    
    .therapists-filters {
        margin-top: 30px;
        margin-bottom: 25px;
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        min-width: 100px;
    }
}

/* Two columns on mobile (570px down to 315px) */
@media (max-width: 570px) and (min-width: 315px) {
    .therapists-grid {
        gap: 20px;
        margin-top: 40px;
    }
    
    .therapist-item {
        width: 140px;
    }
    
    .therapist-image-link {
        margin-bottom: 12px;
    }
    
    .therapist-image {
        width: 100px;
        height: 100px;
    }
    
    .therapist-name {
        font-size: 0.95rem;
    }
    
    .therapist-title {
        font-size: 0.8rem;
    }
}

/* Single column for very small screens */
@media (max-width: 314px) {
    .therapists-grid {
        gap: 25px;
        margin-top: 40px;
    }
    
    .therapist-item {
        width: 160px;
    }
    
    .therapist-image-link {
        margin-bottom: 15px;
    }
    
    .therapist-image {
        width: 120px;
        height: 120px;
    }
    
    .therapist-name {
        font-size: 1rem;
    }
    
    .therapist-title {
                 font-size: 0.85rem;
     }
 }

/* Training Section */
.training-section {
    padding: 80px 20px;
    background-color: #2c2c2c;
    color: white;
}

.training-content {
    max-width: 1200px;
    margin: 0 auto;
}

.training-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
}

.training-left {
    display: flex;
    flex-direction: column;
}

.training-posts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.training-post {
    display: flex;
    flex-direction: column;
    width: clamp(200px, 25vw, 320px);
}

.training-post-image {
    display: block;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    border-radius: 8px;
    width: clamp(200px, 25vw, 320px);
    height: clamp(250px, 31.25vw, 400px);
}

.training-post-image:hover {
    transform: translateY(-2px);
}

.training-post-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    padding: 25px 15px 15px 15px;
    display: flex;
    align-items: end;
}

.training-post-image img {
    width: clamp(200px, 25vw, 320px);
    height: clamp(250px, 31.25vw, 400px);
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.training-post-image:hover img {
    transform: scale(1.05);
}

.training-post-title {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.25rem;
    line-height: 1.3;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.training-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.training-title {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 2rem;
    color: white;
    margin: 0 0 25px 0;
    line-height: 1.2;
}

.training-text {
    font-family: var(--font-body);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.training-text p {
    margin: 0 0 15px 0;
}

.training-text p:last-child {
    margin-bottom: 0;
}

@media (max-width: 1040px) {
    .training-section {
        padding: 60px 15px;
    }
    
    .training-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .training-right {
        order: -1;
        text-align: center;
    }
    
    .training-posts {
        grid-template-columns: 1fr 1fr;
        gap: clamp(15px, 3vw, 25px);
        justify-content: center;
        justify-items: center;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .training-post {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: clamp(140px, 25vw, 280px);
    }
    
    .training-post-image img {
        width: clamp(140px, 25vw, 280px);
        height: clamp(175px, 31.25vw, 350px);
        border-radius: 8px;
    }
    
    .training-post-image {
        width: clamp(140px, 25vw, 280px);
        height: clamp(175px, 31.25vw, 350px);
    }
    
    .training-post-overlay {
        padding: 15px 10px 10px 10px;
    }
    
    .training-post-title {
        font-size: 1rem;
    }
    
    .training-title {
                 font-size: 1.75rem;
         margin-bottom: 20px;
     }
 }

/* Articles Section */
.articles-section {
    padding: 80px 20px;
    background-color: var(--color-background);
}

.articles-content {
    max-width: 1200px;
    margin: 0 auto;
}

.articles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
    justify-items: center;
}

.article-item {
    display: flex;
    flex-direction: column;
    max-width: 500px;
    width: 100%;
}

.article-image {
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.article-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.article-image:hover img {
    transform: scale(1.05);
}

.article-content {
    padding: 20px 0 0 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    margin: 0 0 15px 0;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.5rem;
    line-height: 1.3;
}

.article-title a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover,
.article-title a:focus {
    color: var(--color-secondary);
}

.article-excerpt {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.6;
    flex-grow: 1;
}

.article-excerpt p {
    margin: 0 0 15px 0;
}

.article-excerpt p:last-child {
    margin-bottom: 0;
}

@media (max-width: 1040px) {
    .articles-section {
        padding: 60px 15px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .article-item {
        max-width: 100%;
    }
    
    .article-image img {
        height: 200px;
    }
    
    .article-content {
        padding: 15px 0 0 0;
    }
    
         .article-title {
         font-size: 1.25rem;
     }
 }

/* Booking Section */
.booking-section {
    padding: 80px 20px;
    background-color: #2c2c2c;
    color: white;
}

.booking-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.booking-title {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 2.5rem;
    color: white;
    margin: 0 0 30px 0;
    line-height: 1.2;
}

.booking-text {
    font-family: var(--font-body);
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
}

.booking-text p {
    margin: 0 0 20px 0;
}

.booking-text p:last-child {
    margin-bottom: 0;
}

.booking-button-container {
    margin-top: 40px;
}

.booking-section-button {
    font-size: 1.1rem;
    padding: 15px 40px;
    background: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.booking-section-button:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1040px) {
    .booking-section {
        padding: 60px 15px;
    }
    
    .booking-title {
        font-size: 2rem;
        margin-bottom: 25px;
    }
    
    .booking-text {
        font-size: 1rem;
    }
    
    .booking-button-container {
        margin-top: 30px;
    }
    
    .booking-section-button {
        font-size: 1rem;
        padding: 12px 32px;
    }
}

/* ============================================
   FOOTER STYLES
   ============================================ */

.site-footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 60px 0 0;
    margin-top: 80px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Footer Section: Common Styles */
.footer-section {
    width: 100%;
}

/* ============================================
   FOOTER TOP SECTION - Logo & CTA
   ============================================ */

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-logo img {
    max-height: 60px;
    width: auto;
}

.footer-logo .footer-site-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-white);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-logo .footer-site-title:hover {
    opacity: 0.8;
}

.footer-cta .footer-booking-button {
    display: inline-block;
    padding: 14px 32px;
    background: var(--color-accent);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.footer-cta .footer-booking-button:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* ============================================
   FOOTER MIDDLE SECTION - Menu/Contact & Social
   ============================================ */

.footer-middle {
    display: flex;
    justify-content: space-between;
    padding: 50px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    gap: 60px;
}

.footer-middle-left {
    flex: 1;
}

.footer-middle-right {
    flex: 0 0 auto;
}

/* Footer Contact Information */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact-item {
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-contact-item strong {
    font-weight: 500;
    margin-right: 8px;
}

.footer-contact-item a {
    color: var(--color-white);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact-item a:hover {
    color: var(--color-accent);
}

/* Footer Social Media */
.footer-social {
    text-align: right;
}

.footer-social-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 20px;
    color: var(--color-white);
}

.footer-social-icons {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.footer-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-white);
    transition: all 0.3s ease;
}

.footer-social-icons a:hover {
    background-color: var(--color-accent);
    transform: translateY(-3px);
}

.footer-social-icons svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   FOOTER BOTTOM SECTION - Copyright & Menu/Credit
   ============================================ */

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 0;
    font-size: 0.9rem;
}

.footer-bottom-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-copyright {
    color: rgba(255, 255, 255, 0.8);
}

.footer-copyright-rights {
    color: rgba(255, 255, 255, 0.6);
}

.footer-org {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.footer-bottom-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

/* Footer Menu (Bottom) */
.footer-menu .footer-menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px;
}

.footer-menu .footer-menu-list li {
    margin: 0;
}

.footer-menu .footer-menu-list a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-menu .footer-menu-list a:hover {
    color: var(--color-white);
}

/* Footer Credit */
.footer-credit {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.footer-credit a {
    background-image: linear-gradient(
        to right,
        var(--color-accent),
        var(--color-accent) 50%,
        rgba(255, 255, 255, 0.7) 50%
    );
    background-size: 200% 100%;
    background-position: -100%;
    display: inline-block;
    padding: 5px 0;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

.footer-credit a:hover {
    background-position: 0;
}

/* ============================================
   FOOTER RESPONSIVE STYLES
   ============================================ */

@media (max-width: 768px) {
    .site-footer {
        padding: 40px 0 0;
        margin-top: 60px;
    }
    
    /* Footer Top Section */
    .footer-top {
        flex-direction: column;
        gap: 30px;
        padding-bottom: 40px;
        text-align: center;
    }
    
    .footer-logo {
        width: 100%;
    }
    
    .footer-cta {
        width: 100%;
    }
    
    .footer-cta .footer-booking-button {
        display: block;
        width: 100%;
        text-align: center;
    }
    
    /* Footer Middle Section */
    .footer-middle {
        flex-direction: column;
        gap: 40px;
        padding: 40px 0;
    }
    
    .footer-middle-left,
    .footer-middle-right {
        flex: 1;
        width: 100%;
    }
    
    .footer-social {
        text-align: left;
    }
    
    .footer-social-icons {
        justify-content: flex-start;
    }
    
    /* Footer Bottom Section */
    .footer-bottom {
        flex-direction: column;
        gap: 25px;
        padding: 25px 0;
        text-align: center;
    }
    
    .footer-bottom-left,
    .footer-bottom-right {
        width: 100%;
    }
    
    .footer-bottom-right {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-menu .footer-menu-list {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .footer-container {
        padding: 0 15px;
    }
    
    .footer-cta .footer-booking-button {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .footer-social-icons a {
        width: 40px;
        height: 40px;
    }
    
    .footer-social-icons svg {
        width: 18px;
        height: 18px;
    }
} 

/* ============================================
   GRUPPETRENING: SVANGERSKAP / BARSEL PICKER
   ============================================ */

.gruppetrening-intro-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.gruppetrening-choice-section {
    padding: 0 0 4rem 0;
    background: var(--color-background);
}

.gruppetrening-choice {
    max-width: 900px;
}

.gruppetrening-choice-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gruppetrening-choice-controls {
    display: inline-flex;
    gap: 0;
    border: 2px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-white);
    overflow: hidden;
    margin: 0 0 1.5rem 0;
    padding: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.gruppetrening-choice-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--color-text);
    cursor: pointer;
    user-select: none;
    text-align: center;
    border-radius: 999px;
}

.gruppetrening-choice-label + .gruppetrening-choice-label {
    border-left: 2px solid var(--color-border);
}

#gruppetrening_choice_svangerskap:checked ~ .gruppetrening-choice-controls label[for="gruppetrening_choice_svangerskap"],
#gruppetrening_choice_barsel:checked ~ .gruppetrening-choice-controls label[for="gruppetrening_choice_barsel"] {
    background: var(--color-secondary);
    color: var(--color-white);
    font-weight: 600;
}

.gruppetrening-choice-label:hover {
    background: rgba(0, 0, 0, 0.04);
}

#gruppetrening_choice_svangerskap:checked ~ .gruppetrening-choice-controls label[for="gruppetrening_choice_svangerskap"]:hover,
#gruppetrening_choice_barsel:checked ~ .gruppetrening-choice-controls label[for="gruppetrening_choice_barsel"]:hover {
    background: var(--color-secondary);
}

.gruppetrening-choice-controls:focus-within {
    outline: 3px solid rgba(0, 110, 106, 0.35);
    outline-offset: 3px;
}

.gruppetrening-choice-panels {
    margin-top: 0;
}

.gruppetrening-choice-panel {
    display: none;
}

#gruppetrening_choice_svangerskap:checked ~ .gruppetrening-choice-panels .gruppetrening-choice-panel--svangerskap {
    display: block;
}

#gruppetrening_choice_barsel:checked ~ .gruppetrening-choice-panels .gruppetrening-choice-panel--barsel {
    display: block;
}

@media (max-width: 768px) {
    .gruppetrening-choice-section {
        padding-bottom: 3rem;
    }

    .gruppetrening-choice-controls {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .gruppetrening-choice-label {
        width: 100%;
        text-align: center;
        padding: 10px 12px;
    }
}

.gruppetrening-gruppe-cards {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.gruppetrening-gruppe-heading {
    margin: 2rem 0 0 0;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.75rem;
    line-height: 1.2;
    color: var(--color-primary);
    text-align: left;
}

.gruppetrening-gruppe-card {
    position: relative;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 18px 18px 16px 18px;
    text-align: left;
}

.gruppetrening-gruppe-card.is-fullbooket {
    opacity: 0.55;
}

.gruppetrening-gruppe-status {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1;
}

.gruppetrening-gruppe-fields {
    margin: 0;
}

.gruppetrening-gruppe-field {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border);
}

.gruppetrening-gruppe-field:last-child {
    border-bottom: none;
}

.gruppetrening-gruppe-field dt {
    margin: 0;
    font-weight: 500;
    color: var(--color-primary);
}

.gruppetrening-gruppe-field dd {
    margin: 0;
    color: var(--color-text);
}

.gruppetrening-gruppe-field--oppstart dt {
    color: var(--color-secondary);
}

.gruppetrening-gruppe-field--oppstart .gruppetrening-gruppe-oppstart {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.2rem;
    line-height: 1.2;
    color: var(--color-primary);
}

.gruppetrening-gruppe-field--oppstart .gruppetrening-gruppe-note {
    display: block;
    margin-top: 6px;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-text);
    opacity: 0.75;
}

.gruppetrening-gruppe-cta {
    margin-top: 14px;
    text-align: left;
}

.gruppetrening-gruppe-signup-button {
    font-size: 0.95rem;
    padding: 10px 18px;
}

.gruppetrening-gruppe-signup-button.is-disabled {
    background: #bdbdbd;
    color: var(--color-white);
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.gruppetrening-gruppe-signup-button.is-disabled:hover,
.gruppetrening-gruppe-signup-button.is-disabled:focus {
    background: #bdbdbd;
    color: var(--color-white);
    transform: none;
}

.gruppetrening-gruppe-no-available {
    margin-top: 18px;
    padding: 14px 16px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    color: var(--color-text);
    text-align: left;
}

.gruppetrening-gruppe-no-available a {
    color: var(--color-secondary);
    text-decoration: underline;
}

.gruppetrening-gruppe-no-available a:hover,
.gruppetrening-gruppe-no-available a:focus {
    color: var(--color-primary);
}

.gruppetrening-meld-pa-section {
    padding: 3rem 0 4rem 0;
    background: var(--color-background);
    text-align: left;
}

.gruppetrening-meld-pa-heading {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 2rem;
    line-height: 1.2;
    color: var(--color-primary);
    text-align: left;
}

.gruppetrening-meld-pa-form {
    margin-top: 1.5rem;
}

@media (max-width: 900px) {
    .gruppetrening-gruppe-cards {
        grid-template-columns: 1fr;
    }

    .gruppetrening-gruppe-field {
        grid-template-columns: 120px minmax(0, 1fr);
    }
}

/* Compact therapists grid (FAQ section + Driftstilskudd block) */
.compact-therapists-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
    justify-content: center;
}

.compact-therapist-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 200px;
    flex-shrink: 0;
    background: var(--color-white);
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid var(--color-border);
}

.compact-therapist-item:hover {
    background: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--color-secondary);
}

.compact-therapist-image-link {
    display: block;
    margin-left: auto;
    margin-right: auto;
    width: fit-content;
}

.compact-therapist-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 15px auto;
    border: 3px solid var(--color-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.compact-therapist-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.compact-therapist-name {
    margin: 0 0 8px 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-primary);
    font-family: var(--font-heading);
    line-height: 1.3;
}

.compact-therapist-name-link {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.compact-therapist-name-link:hover {
    color: var(--color-secondary);
}

.compact-therapist-title {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.3;
    font-family: var(--font-body);
    opacity: 0.8;
}

@media (max-width: 1040px) {
    .compact-therapists-grid {
        gap: 20px;
        margin-top: 15px;
    }

    .compact-therapist-item {
        width: 160px;
        padding: 15px;
    }

    .compact-therapist-image {
        width: 60px;
        height: 60px;
        margin-bottom: 12px;
    }

    .compact-therapist-name {
        font-size: 0.9rem;
    }

    .compact-therapist-title {
        font-size: 0.8rem;
    }
}

@media (max-width: 570px) {
    .compact-therapists-grid {
        gap: 15px;
    }

    .compact-therapist-item {
        width: 140px;
        padding: 12px;
    }

    .compact-therapist-image {
        width: 50px;
        height: 50px;
        margin-bottom: 10px;
    }

    .compact-therapist-name {
        font-size: 0.85rem;
    }

    .compact-therapist-title {
        font-size: 0.75rem;
    }
}