/* Squarespace-like styling for Krokåsdalen forsamlingshus */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1c1c1c;
    --secondary-color: #ff7a38;
    --text-color: #1c1c1c;
    --light-bg: #fafafa;
    --border-color: #e0e0e0;
    --footer-bg: #f5f5f5;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'futura-pt', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--primary-color);
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
}

h1 {
    font-size: 48px;
    font-weight: 400;
    letter-spacing: -1px;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h2 {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 1em;
    margin-top: 1em;
}

h3 {
    font-size: 19px;
    font-weight: 500;
    letter-spacing: 0.05em;
    line-height: 1.4;
    margin-bottom: 0.5em;
}

p {
    margin-bottom: 1em;
    font-weight: 400;
    letter-spacing: 0.4px;
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* ===== HEADER ===== */
#header {
    padding: 0 30px;
    z-index: 1002;
    top: 0;
    left: 0;
    width: 100%;
    line-height: 1em;
    position: relative;
    background-color: #dcdbd1;
}

#header a {
    text-decoration: none;
}

.header-inner {
    padding: 30px 0;
    width: 100%;
    display: block;
    box-sizing: border-box;
    max-width: 1080px;
    margin: 0 auto;
    text-align: center;
    position: relative;
}

#logoWrapper,
#logoImage {
    height: auto;
    width: auto;
    line-height: 1;
    display: inline-block;
}

#logoImage a {
    display: block;
}

#logoImage img {
    width: auto;
    max-width: 261px;
    height: auto;
    max-height: 50px;
}

/* Desktop Navigation */
#headerNav {
    display: inline-block;
    vertical-align: middle;
}

#mainNavWrapper {
    text-align: center;
    position: relative;
    display: inline-block;
}

#mainNavigation {
    display: flex;
    justify-content: center;
    gap: 2em;
    padding: 0;
    margin: 0;
    white-space: nowrap;
}

#mainNavigation div {
    position: relative;
}

#mainNavigation > div > a,
#mainNavigation > div > label,
#mainNavigation .folder > label {
    font-family: 'futura-pt', sans-serif;
    font-weight: 400;
    font-size: 16px;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    line-height: 1em;
    color: rgba(95, 93, 93, 0.73);
    display: block;
    padding: 0.75em 1em;
    text-align: center;
}

#mainNavigation a:hover,
#mainNavigation label:hover {
    color: #575757;
}

#mainNavigation a.active,
#mainNavigation .active > a {
    color: #575757;
}

/* Folder / Dropdown Navigation */
.folder {
    position: relative;
}

.folder-toggle-box {
    display: none;
}

.folder-toggle-label {
    cursor: pointer;
}

.subnav {
    background-color: #dcdbd1;
    z-index: 1002;
    display: none;
    position: absolute;
    top: 100%;
    left: -0.5em;
    padding: 1em 0;
    text-align: left;
    white-space: nowrap;
    min-width: 150px;
}

.folder:hover .subnav {
    display: inline-block;
}

.subnav div {
    display: block;
}

.subnav a {
    display: block;
    padding: 0.5em 1.5em;
    font-family: 'futura-pt', sans-serif;
    font-weight: 400;
    font-size: 14px;
    letter-spacing: 0;
    text-transform: none;
    text-decoration: none;
    color: rgba(95, 93, 93, 0.73);
}

.subnav a:hover {
    color: #575757;
}

/* Mobile Navigation Toggle */
.mobile-nav-toggle-label {
    cursor: pointer;
    position: absolute;
    z-index: 1002;
    top: 20px;
    right: 30px;
    padding: 0;
    vertical-align: middle;
    line-height: 16px;
    text-align: right;
    width: 22px;
    height: 22px;
    display: none;
}

.mobile-nav-toggle-label .top-bar,
.mobile-nav-toggle-label .middle-bar,
.mobile-nav-toggle-label .bottom-bar {
    width: 22px;
    height: 2px;
    background-color: #5f5d5d;
    transition: transform 0.1s ease, top 0.1s ease;
    transform-origin: 50% 50%;
    position: absolute;
    top: 0;
    right: 0;
}

.mobile-nav-toggle-label .middle-bar {
    top: 7px;
}

.mobile-nav-toggle-label .bottom-bar {
    top: 14px;
}

#mobileNavToggle:checked ~ #header .mobile-nav-toggle-label .top-bar,
#mobileNavToggle:checked ~ #header .mobile-nav-toggle-label .bottom-bar {
    transition: top 0.1s ease, transform 0.1s ease;
}

#mobileNavToggle:checked ~ #header .mobile-nav-toggle-label .top-bar {
    transform: rotate(45deg);
    top: 7px;
}

#mobileNavToggle:checked ~ #header .mobile-nav-toggle-label .middle-bar {
    opacity: 0;
}

#mobileNavToggle:checked ~ #header .mobile-nav-toggle-label .bottom-bar {
    transform: rotate(-45deg);
    top: 7px;
}

/* Mobile Navigation Overlay */
#overlayNav {
    position: fixed;
    z-index: 1001;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0;
    visibility: hidden;
    line-height: 1em;
    text-align: center;
    overflow: auto;
    pointer-events: none;
    background-color: rgba(220, 219, 209, 0.98);
    transition: opacity 0.14s ease-out, visibility 0.14s linear;
}

#mobileNavWrapper {
    position: relative;
    width: 100%;
    height: 101%;
    padding: 100px 0;
    display: table;
    box-sizing: border-box;
    text-align: center;
}

#mobileNavWrapper nav {
    padding: 0;
    display: table-cell;
    vertical-align: middle;
}

#mobileNavigation div {
    text-align: center;
}

#mobileNavigation > div > a,
#mobileNavigation > div > label {
    display: block;
    padding: 0.45em 0;
    font-size: 20px; /* reduced for mobile to avoid overlap */
    line-height: 1.25;
    letter-spacing: 0.2px;
}

#mobileNavigation .subnav > div a {
    padding: 0 0 0.5em;
}

#mobileNavToggle:checked ~ #overlayNav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-nav {
    display: none;
}

/* Hide the actual checkbox input used for the mobile nav toggle so
   only the styled label (hamburger) is visible on mobile. */
#mobileNavToggle,
.mobile-nav-toggle-box {
    display: none !important;
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.nav-item, .nav-folder {
    display: none;
}

/* ===== MAIN CONTENT ===== */
#page {
    max-width: 100%;
    margin: 0 auto;
}

#content {
    width: 100%;
}

.main-content {
    width: 100%;
    margin: 0 auto;
}

/* Hero Image */
.hero-image {
    width: 100%;
    max-width: 100%;
    display: block;
    position: relative;
    padding-bottom: 29.15%;
    height: 0;
    overflow: hidden;
}

.hero-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 40px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 60px 34px;
    background: #fff;
}

.content-left {
    grid-column: 1;
}

.content-right {
    grid-column: 2;
}

.content-left p,
.content-right p {
    font-family: 'futura-pt', sans-serif;
    font-weight: 400;
    font-size: 15px;
    letter-spacing: 0.4px;
    line-height: 1.6em;
    color: rgba(0, 0, 0, 0.71);
    margin: 0 0 1.5em;
}

.content-left h3 {
    font-family: 'futura-pt', sans-serif;
    font-weight: 500;
    font-size: 19px;
    letter-spacing: 0.05em;
    line-height: 1.4em;
    color: #6c6a6a;
    margin: 1.5em 0 1em;
}

/* Testimonial Block */
.testimonial-block {
    margin: 0;
    padding: 0;
}

.testimonial-block blockquote {
    margin: 0;
    padding: 0;
    font-style: italic;
    font-family: 'futura-pt', sans-serif;
    color: rgba(0, 0, 0, 0.71);
    line-height: 1.6em;
}

.testimonial-block blockquote p {
    font-size: 15px;
    margin: 0 0 1em 0;
}

.testimonial-block blockquote span {
    font-size: 1.5em;
}

.testimonial-block figcaption {
    margin-top: 1em;
    font-family: 'futura-pt', sans-serif;
    font-size: 14px;
    color: rgba(28, 28, 28, 0.5);
    font-weight: 400;
    letter-spacing: 0.05em;
}

/* Content Divider */
.content-divider {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.15);
    margin: 0;
    max-width: 100%;
    background: transparent;
}

/* CTA Grid */
.cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0;
    background: #fff;
}

.cta-item {
    padding: 60px 34px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

.cta-item:nth-child(odd) {
    border-right: 1px solid rgba(0, 0, 0, 0.15);
}

.cta-item h3 {
    margin: 0;
    font-family: 'futura-pt', sans-serif;
    font-weight: 400;
    font-size: 19px;
    letter-spacing: 0.05em;
    line-height: 1.4em;
}

.cta-item h3 a {
    color: #6c6a6a;
    text-decoration: none;
}

.cta-item h3 a:hover {
    color: #1c1c1c;
}

/* Testimonial */
.testimonial-section {
    text-align: center;
}

.testimonial {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(28, 28, 28, 0.8);
    max-width: 600px;
    margin: 0 auto;
    padding: 2em;
    font-style: italic;
    border-left: 4px solid var(--secondary-color);
    padding-left: 2em;
    text-align: left;
}

.testimonial p {
    margin-bottom: 1em;
}

.testimonial footer {
    font-style: normal;
    font-weight: 600;
    color: var(--primary-color);
    text-align: right;
    font-size: 14px;
}

/* CTA Section */
.cta-section {
    background-color: #fff;
    padding: 80px 34px;
}

.cta-links {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4em;
}

.cta-link {
    text-align: center;
}

.cta-link h3 {
    font-size: 20px;
    margin: 0;
    font-weight: 400;
}

.cta-link a {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
}

.cta-link a:hover {
    color: var(--secondary-color);
}

/* ===== FOOTER ===== */
.footer {
    background-color: var(--footer-bg);
    padding: 60px 34px 20px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1080px;
    margin: 0 auto 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3em;
}

.footer-section {
    text-align: left;
}

.footer-section h4 {
    font-size: 14px;
    font-family: 'Raleway', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1em;
}

.footer-section p {
    font-size: 12px;
    line-height: 1.8;
    margin-bottom: 0.5em;
}

.footer-section a {
    font-size: 12px;
    color: rgba(28, 28, 28, 0.7);
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75em;
}

.footer-bottom {
    max-width: 1080px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: 12px;
    color: rgba(28, 28, 28, 0.6);
}

/* ===== RESPONSIVE DESIGN ===== */
@media only screen and (min-width: 769px) {
    .mobile-nav-toggle {
        display: none;
    }
    
    #mobileNavToggle {
        display: none;
    }
    
    .nav-overlay {
        display: none !important;
    }
    
    .header-nav {
        display: flex !important;
    }
}

@media only screen and (max-width: 768px) {
    #headerNav {
        display: none;
    }
    
    .mobile-nav-toggle-label {
        display: block !important;
    }
    
    #overlayNav {
        display: block;
    }
    
    .header-inner {
        padding: 15px 20px;
    }
    
    .logo-image {
        max-height: 40px;
    }    
    /* Content Grid - Stack on mobile */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 40px 20px;
    }
    
    .content-left {
        grid-column: 1;
    }
    
    .content-right {
        grid-column: 1;
    }
    
    .cta-grid {
        grid-template-columns: 1fr;
        padding: 0;
    }
    
    .cta-item {
        padding: 40px 20px;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.15);
    }
    
    .cta-item:last-child {
        border-bottom: none;
    }
}    
    .index-section {
        padding: 50px 20px;
    }
    
    .index-section.index-section-first {
        min-height: 400px;
        padding: 40px 20px;
    }
    
    .index-section.index-section-first .section-title {
        font-size: 32px;
    }
    
    .index-section.index-section-first .section-description {
        font-size: 16px;
    }
    
    .mobile-nav-toggle {
        display: flex;
    }
    
    .nav-overlay {
        display: block;
    }
    
    h1 {
        font-size: 34px;
    }
    
    h2 {
        font-size: 26px;
    }
    
    .cta-links {
        grid-template-columns: 1fr;
        gap: 2em;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2em;
    }
    
    .section-content {
        padding: 0 20px;
    }
}

@media only screen and (max-width: 640px) {
    .header-inner {
        padding: 12px 15px;
    }
    
    .logo-image {
        max-height: 35px;
    }
    
    .index-section {
        padding: 40px 15px;
    }
    
    .index-section.index-section-first {
        min-height: 300px;
        padding: 30px 15px;
    }
    
    .index-section.index-section-first .section-title {
        font-size: 24px;
    }
    
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 22px;
    }
    
    p {
        font-size: 15px;
    }
    
    .testimonial {
        padding-left: 1.5em;
        border-left: 3px solid var(--secondary-color);
    }
    
    .footer-section h4 {
        font-size: 13px;
    }
    
    .footer-section a,
    .footer-section p {
        font-size: 11px;
    }
    
    .section-content {
        padding: 0 15px;
    }
}

/* Print Styles */
@media print {
    .header,
    .mobile-nav-toggle,
    .footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: #000;
    }
}
