/*
Theme Name: Estetisk Plastikkirurgi
Description: Lett tema for epkir.no / estetiskplastikkirurgi.no. Ingen sidebygger – innholdet er vanlige WordPress-blokker, temaet står for utseendet. Retning A «Villaen»: villablå, elfenben og messing.
Version: 1.0.2
Author: Appendix Holding AS
Text Domain: epkir
Requires at least: 6.5
Requires PHP: 8.1
*/

:root {
  --bla: #1f3a6b;
  --bla-mork: #142849;
  --bla-lys: #2c4c86;
  --elfenben: #f6f1e7;
  --papir: #fbf8f2;
  --messing: #a8823c;
  --messing-lys: #d9bd7f;
  --tekst: #22262e;
  --tekst-2: #3d424b;
  --dempet: #5a5e66;
  --linje: #e3d9c6;
  --sand: #d8cdb7;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: Karla, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bredde: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); color: var(--tekst); background: var(--elfenben); line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--bla); }
a:hover { color: var(--bla-mork); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; color: var(--bla); line-height: 1.1; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 5.5vw, 4.4rem); line-height: 1.03; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: 1.6rem; font-weight: 600; }
h2 em, h1 em { font-style: italic; color: var(--messing); }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: #fff; padding: 8px 12px; z-index: 100; }

/* Klassiske temaer pakker hver gruppeblokk inn i en ekstra div – den skal ikke påvirke rutenettet. */
.wp-block-group__inner-container { display: contents; }
.wp-block-image, .wp-block-video { margin: 0; }
.wp-block-image img { width: 100%; }

/* ---------- topp */
.topp { position: sticky; top: 0; z-index: 50; background: rgba(246,241,231,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--linje); }
.topp-inner { max-width: var(--bredde); margin: 0 auto; padding: 0 24px; height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { height: 38px; width: auto; }
.logo-tekst { display: flex; flex-direction: column; line-height: 1; }
.logo-navn { font-family: var(--serif); font-size: 25px; font-weight: 600; color: var(--bla); letter-spacing: .01em; }
.logo-sted { font-size: 10.5px; letter-spacing: .3em; text-transform: uppercase; color: var(--messing); margin-top: 5px; }
.meny { display: none; gap: 26px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.meny a { text-decoration: none; color: var(--tekst); }
.meny a:hover, .meny .current-menu-item a { color: var(--bla); box-shadow: inset 0 -1px 0 var(--messing); }
.topp-knapper { display: flex; gap: 14px; align-items: center; }
.minside { text-decoration: none; font-size: 15px; color: var(--bla); }
.knapp-topp { text-decoration: none; background: var(--bla); color: #fff !important; padding: 12px 20px; border-radius: 2px; font-size: 15px; font-weight: 500; white-space: nowrap; }
.knapp-topp:hover { background: var(--bla-mork); }
@media (min-width: 1080px) { .meny { display: flex; } }
.logo-navn, .logo-sted { white-space: nowrap; }
@media (max-width: 560px) { .minside { display: none; } .topp-inner { padding: 0 16px; gap: 12px; } .logo img { height: 26px; } .logo-sted { letter-spacing: .12em; font-size: 9px; } .logo-navn { font-size: 18px; } .knapp-topp { padding: 10px 14px; font-size: 14px; } }
.admin-bar .topp { top: 32px; }
@media (max-width: 782px) { .admin-bar .topp { top: 46px; } }

/* ---------- knapper (core/buttons) */
.wp-block-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.wp-block-button__link { display: inline-block; text-decoration: none; padding: 15px 26px; border-radius: 2px; font-weight: 500; font-size: 16px; background: var(--bla); color: #fff; border: 1px solid var(--bla); }
.wp-block-button__link:hover { background: var(--bla-mork); color: #fff; }
.is-style-outline .wp-block-button__link { background: transparent; color: var(--bla); }
.is-style-outline .wp-block-button__link:hover { background: var(--bla); color: #fff; }
.mork .wp-block-button__link { background: var(--messing-lys); border-color: var(--messing-lys); color: var(--bla); font-weight: 600; }
.mork .wp-block-button__link:hover { background: #e6cd94; }
.mork .is-style-outline .wp-block-button__link { background: transparent; color: var(--elfenben); border-color: rgba(246,241,231,.4); font-weight: 500; }

/* ---------- felles seksjoner */
.seksjon { padding: 112px 24px; }
.seksjon > * { max-width: var(--bredde); margin-left: auto; margin-right: auto; }
.papir { background: var(--papir); border-top: 1px solid var(--linje); border-bottom: 1px solid var(--linje); }
.mork { background: var(--bla); color: var(--elfenben); }
.mork h1, .mork h2, .mork h3 { color: var(--elfenben); }
.mork h1 em, .mork h2 em { color: var(--messing-lys); }
.mork p { color: rgba(246,241,231,.86); }
.mork a { color: var(--messing-lys); }
.overtittel { font-size: 13px !important; letter-spacing: .3em; text-transform: uppercase; color: var(--messing) !important; margin-bottom: 18px !important; }
.mork .overtittel { color: var(--messing-lys) !important; }
.ingress { font-size: 18px; color: var(--tekst-2); }
.seksjon > .ingress { padding-right: min(40%, 480px); }
@media (max-width: 900px) { .seksjon > .ingress { padding-right: 0; } }
.to-kol { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 64px; align-items: center; }
.to-kol.topp-justert { align-items: start; }
@media (max-width: 900px) { .to-kol { grid-template-columns: minmax(0,1fr); gap: 36px; } .seksjon { padding: 80px 20px; } }

/* ---------- forside: hero */
.hero { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); min-height: 640px; }
.hero-tekst { background: var(--bla); color: var(--elfenben); padding: 96px 64px; display: flex; flex-direction: column; justify-content: center; }
.hero-tekst h1 { color: var(--elfenben); }
.hero-tekst h1 em { color: var(--messing-lys); }
.hero-tekst p { color: rgba(246,241,231,.86); font-size: 18px; max-width: 500px; }
.hero-tekst .overtittel { color: var(--messing-lys) !important; }
.hero-bilde { position: relative; min-height: 420px; background: var(--bla-lys); }
.hero-bilde .wp-block-image, .hero-bilde .wp-block-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero-merke { position: absolute !important; left: 28px; bottom: 28px; z-index: 2; background: rgba(246,241,231,.95); padding: 14px 20px; display: flex; gap: 14px; align-items: center; margin: 0 !important; color: var(--tekst-2) !important; font-size: 14px !important; line-height: 1.4; }
.hero-merke strong { font-family: var(--serif); font-size: 42px; font-weight: 500; color: var(--bla); line-height: 1; }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0,1fr); } .hero-tekst { padding: 72px 24px; } }

/* tillitsrad */
.tillit { border-bottom: 1px solid var(--linje); padding: 0 24px; }
.tillit ul { max-width: var(--bredde); margin: 0 auto; padding: 26px 0; list-style: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 14px 24px; font-size: 14px; color: var(--dempet); }
.tillit li { margin: 0; }
.tillit strong { color: var(--bla); }

/* behandlinger */
.seksjon-hode { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 48px; }
.seksjon-hode h2 { margin: 0; }
.seksjon-hode p { margin: 0; max-width: 460px; color: var(--dempet); }
.kort-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px; background: var(--linje); border: 1px solid var(--linje); }
.kort { background: var(--papir); padding: 36px 28px; display: flex; flex-direction: column; gap: 10px; min-height: 240px; }
.kort .romertall { font-family: var(--serif); font-size: 15px; color: var(--messing); margin: 0; }
.kort h3 { font-family: var(--serif); font-weight: 500; font-size: 30px; margin: 0; }
.kort h3 a { text-decoration: none; color: var(--bla); }
.kort p { margin: 0; font-size: 15px; color: var(--dempet); }
.kort .lenker { margin-top: auto; padding-top: 8px; font-size: 14px; }
.kort .lenker a { color: var(--bla); }
@media (max-width: 900px) { .kort-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 560px) { .kort-grid { grid-template-columns: minmax(0,1fr); } }

/* villa-video */
.video-ramme { display: flex; justify-content: center; }
.video-ramme video { width: 100%; max-width: 380px; aspect-ratio: 9 / 16; object-fit: cover; border: 1px solid rgba(217,189,127,.5); box-shadow: 0 30px 60px rgba(0,0,0,.35); }
.lenke-messing a { color: var(--messing-lys); text-decoration: none; border-bottom: 1px solid rgba(217,189,127,.5); padding-bottom: 3px; font-size: 15px; }

/* klinikken / bilder */
.foto-hoy img { min-height: 460px; object-fit: cover; }
.foto-rad { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-top: 64px !important; }
.foto-rad img { height: 260px; object-fit: cover; }
@media (max-width: 700px) { .foto-rad { grid-template-columns: minmax(0,1fr); } }

/* sitat */
.sitat { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); background: var(--bla); color: var(--elfenben); }
.sitat .wp-block-image img { height: 100%; min-height: 480px; object-fit: cover; object-position: 35% center; }
.sitat-tekst { padding: 88px 64px; display: flex; flex-direction: column; justify-content: center; }
.sitat blockquote, .sitat .wp-block-quote { margin: 0; padding: 0; border: 0; }
.sitat blockquote p { font-family: var(--serif); font-style: italic; font-size: clamp(1.7rem, 2.6vw, 2.4rem); line-height: 1.3; color: var(--elfenben); margin: 0; }
.sitat cite { display: block; margin-top: 32px; font-style: normal; font-size: 13px; letter-spacing: .3em; text-transform: uppercase; color: var(--messing-lys); }
.sitat .under { font-size: 14px; color: rgba(246,241,231,.72); margin: 6px 0 0; }
@media (max-width: 900px) { .sitat { grid-template-columns: minmax(0,1fr); } .sitat-tekst { padding: 64px 24px; } .sitat .wp-block-image img { min-height: 340px; } }

/* kirurgene */
.institusjoner { list-style: none; margin: 0 auto 48px !important; padding: 20px 0; border-top: 1px solid var(--linje); border-bottom: 1px solid var(--linje); display: flex; flex-wrap: wrap; gap: 8px 0; font-family: var(--serif); font-size: 19px; color: var(--dempet); }
.institusjoner li:not(:last-child)::after { content: "·"; color: var(--messing); margin: 0 14px; }
.lege-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 48px; }
.lege .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; object-position: center 30%; }
.lege h3 { margin: 20px 0 4px; }
.rolle { font-size: 14px !important; color: var(--messing) !important; margin: 0 0 10px !important; }
.lege p:not(.rolle) { font-size: 15px; color: var(--dempet); }
.team { margin-top: 72px !important; padding-top: 48px; border-top: 1px solid var(--linje); }
.team > h3 { font-weight: 500; font-size: 32px; margin-bottom: 32px; }
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 40px; }
.person { display: grid; grid-template-columns: 140px minmax(0,1fr); gap: 24px; align-items: center; }
.person .wp-block-image img { aspect-ratio: 4 / 5; object-fit: cover; object-position: center 22%; }
.person h3 { font-size: 24px; margin: 0 0 4px; }
.person .overtittel { font-size: 12px !important; margin-bottom: 8px !important; }
.person p:not(.rolle):not(.overtittel) { font-size: 15px; color: var(--dempet); margin: 0; }
@media (max-width: 900px) { .lege-grid, .team-grid { grid-template-columns: minmax(0,1fr); } }

/* kontakt */
.steder { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; margin: 0 0 8px; }
.sted h3 { font-weight: 500; font-size: 24px; margin: 0 0 6px; }
.sted p { font-size: 15px; color: var(--dempet); margin: 0 0 8px; }
.sted a { font-size: 14px; }
.telefon-boks { border-top: 2px solid var(--bla); padding-top: 24px; }

/* telefontider fra klinikkappen ([dps_telefontider]) – bare Oslo vises her */
.dps-telefontider .dps-phone-clinic:not([data-clinic-key="epkir"]) { display: none !important; }
.dps-telefontider .dps-phone-number { font-family: var(--serif); font-size: 30px; color: var(--bla); margin: 8px 0 16px; }
.dps-telefontider .dps-phone-week { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 16px; }
.dps-telefontider .dps-phone-week li { display: grid; grid-template-columns: 120px 1fr; }
.dps-telefontider .dps-day-times { color: var(--tekst); }
.dps-telefontider .dps-phone-status { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--dempet); }
.dps-phone-status-dot { width: 9px; height: 9px; border-radius: 50%; background: #bbb; display: inline-block; }
.dps-dot-open { background: #2f8f5b; }
.dps-dot-closed, .dps-dot-paused { background: #b4533a; }
.dps-phone-closed-msg { margin-top: 18px; font-size: 14px; color: var(--dempet); }
.dps-phone-dev-title { margin: 18px 0 6px; font-weight: 600; font-size: 14px; }
.dps-phone-deviations { list-style: none; margin: 0; padding: 0; font-size: 14px; }

/* ---------- undersider */
.side-hode { background: var(--bla); color: var(--elfenben); padding: 104px 24px 88px; }
.side-hode > * { max-width: 900px; margin-left: auto; margin-right: auto; }
.side-hode h1 { color: var(--elfenben); }
.side-hode h1 em { color: var(--messing-lys); }
.side-hode p { color: rgba(246,241,231,.86); font-size: 19px; padding-right: min(25%, 220px); }
@media (max-width: 700px) { .side-hode p { padding-right: 0; } .side-hode { padding: 72px 20px 64px; } }
.tekstside { max-width: 820px; margin: 0 auto; padding: 88px 24px 104px; }
.tekstside h2 { margin-top: 1.6em; font-size: 2.1rem; }
.tekstside h3 { margin-top: 1.4em; font-size: 1.45rem; }
.tekstside p, .tekstside li { font-size: 17.5px; line-height: 1.75; color: var(--tekst-2); }
.tekstside ul, .tekstside ol { padding-left: 1.2em; }
.faktaboks { background: var(--papir); border: 1px solid var(--linje); padding: 28px 32px; margin: 32px 0; }
.faktaboks p:last-child, .faktaboks ul:last-child { margin-bottom: 0; }
.faktaboks h3 { margin-top: 0 !important; }
.cta-boks { background: var(--bla); color: var(--elfenben); padding: 40px; margin-top: 48px; }
.cta-boks h2, .cta-boks h3 { color: var(--elfenben); margin-top: 0 !important; }
.cta-boks p { color: rgba(246,241,231,.86) !important; }
.cta-boks .wp-block-buttons { margin-top: 20px; }
.cta-boks .wp-block-button__link { background: var(--messing-lys); border-color: var(--messing-lys); color: var(--bla); font-weight: 600; }
.cta-boks .is-style-outline .wp-block-button__link { background: transparent; color: var(--elfenben); border-color: rgba(246,241,231,.4); font-weight: 500; }

/* tabeller (priser) */
.wp-block-table { margin: 0 0 40px; overflow-x: auto; }
.wp-block-table table { width: 100%; border-collapse: collapse; font-size: 16px; }
.wp-block-table td { border: 0 !important; border-bottom: 1px solid var(--linje) !important; padding: 12px 0; vertical-align: top; }
.wp-block-table td:last-child { text-align: right; white-space: nowrap; padding-left: 24px; color: var(--bla); }
.prisside h2 { font-size: 1.9rem; margin: 56px 0 12px; }

/* spørsmål og svar (core/details) */
.wp-block-details { border-bottom: 1px solid var(--linje); padding: 18px 0; }
.wp-block-details summary { cursor: pointer; font-family: var(--serif); font-size: 1.35rem; color: var(--bla); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after { content: "+"; color: var(--messing); font-family: var(--sans); }
.wp-block-details[open] summary::after { content: "–"; }
.wp-block-details > *:not(summary) { margin-top: 12px; }

/* tre kolonner (undersiden Uavhengige) */
.tre-felt { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1px; background: var(--linje); border: 1px solid var(--linje); }
.tre-felt > .wp-block-group { background: var(--papir); padding: 40px 32px; }
.tre-felt .stort-tall { font-family: var(--serif); font-size: 56px; line-height: 1; color: var(--messing); margin: 0 0 12px; }
.tre-felt h3 { font-weight: 500; font-size: 28px; }
.tre-felt p:not(.stort-tall) { font-size: 16px; color: var(--dempet); margin: 0; }
@media (max-width: 900px) { .tre-felt { grid-template-columns: minmax(0,1fr); } }

/* ---------- bunn */
.bunn { border-top: 1px solid var(--linje); padding: 64px 24px 40px; font-size: 14.5px; color: var(--dempet); background: var(--elfenben); }
.bunn-inner { max-width: var(--bredde); margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.bunn img.stor-logo { width: 220px; height: auto; margin-bottom: 18px; }
.bunn p { margin: 0 0 6px; }
.bunn a { color: var(--dempet); text-decoration: none; }
.bunn a:hover { color: var(--bla); text-decoration: underline; }
.bunn h4 { font-family: var(--sans); font-size: 12px; letter-spacing: .25em; text-transform: uppercase; color: var(--messing); margin: 0 0 14px; font-weight: 600; }
.bunn-under { max-width: var(--bredde); margin: 40px auto 0; padding-top: 20px; border-top: 1px solid var(--linje); font-size: 13px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
@media (max-width: 800px) { .bunn-inner { grid-template-columns: minmax(0,1fr); } }
