/*
 Theme Name:  Óttar – Fyrirlestrar (Blocksy Child)
 Theme URI:   https://ottar.is
 Description: Létt WordPress Child Theme byggt á Blocksy fyrir one‑page kynningarsíðu með fyrirlestrum.
 Author:      Óttar Birgisson
 Author URI:  https://ottar.is
 Template:    blocksy
 Version:     1.0.0
 Text Domain: ottar-blocksy-child
*/

/* Aðal stillingar og breytur */
:root {
  --ottar-primary: #ecf5fc;
  --ottar-black: #000000;
  --ottar-white: #ffffff;
}

body { background: var(--ottar-white); color: var(--ottar-black); }

a, .has-ottar-primary-color { color: var(--ottar-primary); }

.has-ottar-primary-background-color { background-color: var(--ottar-primary); }

/* Hero */
.ottar-hero {
  padding: 6rem 1.25rem;
  background: var(--ottar-primary);
}
.ottar-hero h1 { margin: 0 0 0.5rem 0; }
.ottar-hero p { font-size: 1.125rem; max-width: 60ch; }

.section { padding: 4rem 1.25rem; }
.section h2 { margin-top: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.card { border: 1px solid #e6e6e6; border-radius: 12px; padding: 1rem; background: #fff; }
.card h3 { margin-top: 0; }

.cta { display:inline-block; padding:.85rem 1.25rem; border-radius: 999px; border:1px solid var(--ottar-black); text-decoration:none; }
.cta--primary { background: var(--ottar-black); color: #fff; border-color: var(--ottar-black);}

footer.ottar-footer { padding: 2rem 1.25rem; background:#fafafa; border-top:1px solid #eee; font-size:.95rem; }
*/



/* ----- Forsíða án hauss og Page Title Area ----- */
.home header.ct-header,
.home .page-title,
.home .ct-page-title,
.home .entry-header {
  display: none !important;
}

/* Draga úr toppbilum svo hero byrji alveg efst */
.home .site-main,
.home main#main,
.home .content-area {
  padding-top: 0 !important;
  margin-top: 0 !important;
}


/* ==== Hard hide of header + title on front page ==== */
/* Remove any top spacing Blocksy may add */
body.home { --header-height: 0px !important; }
body.home .site-main,
body.home main#main,
body.home .content-area,
body.home .site-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}


/* === Header look & feel (svipað og parent) === */
.ct-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.ct-header .site-branding img,
.ct-header .site-title { max-height: 40px; }
.ct-header .menu > li > a { padding: 18px 12px; font-weight: 600; }
.ct-header .ct-header-container { max-width: 1200px; }

/* Forsíða: fela Page Title Area og toppbil */
.home .ct-page-title,
.home .page-title,
.home .entry-header,
.home .wp-block-post-title { display: none !important; }

.home .site-main,
.home main#main,
.home .content-area,
.home .site-content { padding-top: 0 !important; margin-top: 0 !important; }

/* Hero uppfærsla til að passa betur við parent */
.ottar-hero { padding: 5rem 1.25rem 3.5rem; border-radius: 16px; }
@media (min-width: 1024px) {
  .ottar-hero { padding: 6rem 2rem 4rem; }
}

/* Hreinni hnappastíll */
.wp-block-button .wp-block-button__link { border-radius: 999px; padding: .9rem 1.25rem; }
.wp-block-button.is-style-outline .wp-block-button__link { border:2px solid currentColor; background: transparent; }

/* 0) Tame WP & Blocksy globals */
:root,
.wp-site-blocks,
.entry-content,
.ct-content {
  --theme-content-spacing: 14px !important;      /* WP block gap */
  --wp--style--block-gap: 14px !important;
  --theme-content-vertical-spacing: 20px !important; /* Blocksy top/bottom */
}

/* Remove auto top/bottom padding Blocksy adds via data-vertical-spacing */
.ct-container-full[data-vertical-spacing] {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Normalize Gutenberg margins so only the sibling gap applies */
.entry-content > * { margin-block: 0 !important; }
.entry-content > * + *,
.is-layout-flow > * + *,
.is-layout-constrained > * + * { margin-block-start: var(--wp--style--block-gap) !important; }

/* 1) Reduce your custom section paddings (main culprit) */
.section { padding: 1.75rem 1.25rem !important; }     /* was 4rem */
.ottar-hero { padding: 3rem 1.25rem 2.25rem !important; }  /* was 5–6rem */
@media (min-width: 1024px){
  .ottar-hero { padding: 3.5rem 2rem 2.5rem !important; }
}

/* 2) Inner container padding inside accordion */
#fyrirlestrar-accordion .fx-container { padding: 1rem 1rem !important; } /* was 2rem */

/* 3) First/last child cleanup */
.entry-content > :first-child { margin-top: 0 !important; }
.entry-content > :last-child  { margin-bottom: 0 !important; }
