/*
Theme Name: Astra Child - Årebladet
Template: astra
Version: 2.0
*/

/* ==========================================================================
   RADICAL REDESIGN - Modern, Friendly, No Dead Space
   ========================================================================== */

/* Override Astra's colors */
:root {
  --accent: #E63946;        /* Warm red - friendly, stands out */
  --accent-hover: #C1121F;
  --dark: #1D3557;          /* Deep navy - readable, professional */
  --dark-light: #457B9D;    /* Lighter navy */
  --light: #F1FAEE;         /* Warm off-white */
  --white: #FFFFFF;
  --text: #1D3557;
  --text-muted: #457B9D;
}

/* Override Astra global colors */
body {
  --ast-global-color-0: var(--accent) !important;
  --ast-global-color-1: var(--accent-hover) !important;
  --ast-global-color-2: var(--dark) !important;
}

/* ==========================================================================
   BASE
   ========================================================================== */

body {
  background: var(--white);
  color: var(--text);
  font-size: 17px;
  line-height: 1.6;
}

a {
  color: var(--accent);
  transition: color 0.15s;
}
a:hover {
  color: var(--accent-hover);
}

h1, h2, h3, h4, h5, h6 {
  color: var(--dark);
  font-weight: 700;
  line-height: 1.2;
}

/* ==========================================================================
   HEADER - Tight, clean
   ========================================================================== */

.ast-primary-header-bar {
  background: var(--white) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.main-header-bar {
  padding: 0.5rem 0 !important;
}

.site-title {
  font-weight: 800 !important;
  font-size: 1.5rem !important;
  color: var(--dark) !important;
}

.ast-nav-menu a {
  font-weight: 600 !important;
  color: var(--dark) !important;
  padding: 0.5rem 1rem !important;
}
.ast-nav-menu a:hover {
  color: var(--accent) !important;
}

/* ==========================================================================
   HOMEPAGE HERO - Magazine cover prominent
   ========================================================================== */

.latest-issue {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
  color: var(--white);
  margin: 0 -20px 0 -20px; /* Full width hack */
  padding-left: calc(20px + 5%);
  padding-right: calc(20px + 5%);
}

.latest-issue-cover img {
  width: 100%;
  max-width: 280px;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
}
.latest-issue-cover img:hover {
  transform: scale(1.03) rotate(-1deg);
}

.latest-issue-info h2 {
  color: var(--white) !important;
  font-size: 2.2rem;
  margin: 0 0 0.5rem 0;
}

.latest-issue-info p {
  color: rgba(255,255,255,0.8);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.latest-issue-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   BUTTONS - Bold and clickable
   ========================================================================== */

.button,
.ast-button,
.wp-block-button__link,
a.button {
  display: inline-flex;
  align-items: center;
  padding: 0.9rem 1.8rem !important;
  background: var(--accent) !important;
  color: var(--white) !important;
  font-weight: 600 !important;
  font-size: 1rem !important;
  border-radius: 50px !important;
  border: none !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 15px rgba(230,57,70,0.3);
}

.button:hover,
.ast-button:hover,
.wp-block-button__link:hover,
a.button:hover {
  background: var(--accent-hover) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230,57,70,0.4);
}

.button-secondary,
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
  border: 2px solid var(--white) !important;
  box-shadow: none;
}
.button-secondary:hover {
  background: var(--white) !important;
  color: var(--dark) !important;
}

/* ==========================================================================
   DEADLINE BOX - Eye-catching
   ========================================================================== */

.next-deadline {
  background: var(--light);
  padding: 1.5rem 2rem;
  border-radius: 12px;
  border-left: 5px solid var(--accent);
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.next-deadline p {
  margin: 0;
  font-size: 1.1rem;
  color: var(--dark);
}

.next-deadline strong {
  color: var(--accent);
}

/* ==========================================================================
   ARTICLES SECTION - Tight grid, no wasted space
   ========================================================================== */

.latest-articles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 3rem 0;
}

.article-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: all 0.25s ease;
  border: none;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-content {
  padding: 1.25rem;
}

.article-content h3 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem 0;
  line-height: 1.3;
}

.article-content h3 a {
  color: var(--dark);
  text-decoration: none;
}
.article-content h3 a:hover {
  color: var(--accent);
}

.article-content p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

/* ==========================================================================
   LIVE BANNER - Bold section
   ========================================================================== */

.live-banner {
  background: var(--dark);
  color: var(--white);
  padding: 3rem 2rem;
  text-align: center;
  margin: 2rem -20px;
  padding-left: calc(20px + 5%);
  padding-right: calc(20px + 5%);
}

.live-banner h2 {
  color: var(--white) !important;
  font-size: 1.8rem;
  margin: 0 0 0.5rem 0;
}

.live-banner p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.5rem;
}

.live-banner .button {
  background: var(--accent) !important;
}

/* ==========================================================================
   ARCHIVE GRID - Tighter
   ========================================================================== */

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1.25rem;
}

.archive-item {
  text-align: center;
}

.archive-item img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

.archive-item:hover img {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* ==========================================================================
   FOOTER - Clean, modern
   ========================================================================== */

.site-footer {
  background: var(--dark) !important;
  padding: 2.5rem 1.5rem 1.5rem;
}

.site-footer,
.site-footer a,
.site-footer li {
  color: rgba(255,255,255,0.7) !important;
}

.site-footer a:hover {
  color: var(--white) !important;
}

.footer-navigation {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.ast-footer-copyright {
  background: var(--dark) !important;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1rem 0;
  color: rgba(255,255,255,0.4) !important;
}

/* ==========================================================================
   TABLES - Clean styling
   ========================================================================== */

.upcoming-issues,
.full-schedule,
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

.upcoming-issues th,
.full-schedule th,
.price-table th {
  background: var(--dark);
  color: var(--white);
  padding: 1rem;
  text-align: left;
  font-weight: 600;
}

.upcoming-issues td,
.full-schedule td,
.price-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--light);
}

.upcoming-issues tr:hover td,
.full-schedule tr:hover td,
.price-table tr:hover td {
  background: var(--light);
}

/* ==========================================================================
   RESPONSIVE - Mobile first
   ========================================================================== */

@media (max-width: 900px) {
  .latest-articles {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .latest-issue {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2rem 1.5rem;
  }

  .latest-issue-cover {
    display: flex;
    justify-content: center;
  }

  .latest-issue-cover img {
    max-width: 220px;
  }

  .latest-issue-info h2 {
    font-size: 1.8rem;
  }

  .latest-issue-buttons {
    justify-content: center;
  }

  .latest-articles {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .next-deadline {
    flex-direction: column;
    text-align: center;
  }

  .footer-navigation {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ==========================================================================
   ASTRA OVERRIDES - Force our styles
   ========================================================================== */

.ast-container {
  max-width: 1200px;
}

.entry-content > *:first-child {
  margin-top: 0;
}

/* Remove Astra's default link underlines where we don't want them */
.article-card a,
.archive-item a {
  text-decoration: none;
}

/* Fix any stray blue colors from Astra */
.ast-button,
.menu-toggle,
.ast-mobile-menu-trigger {
  color: var(--dark) !important;
}

/* Hide Astra copyright footer */
.ast-footer-copyright,
.ast-small-footer {
  display: none !important;
}


/* Hide Astra copyright footer - correct selectors */
.site-below-footer-wrap {
  display: none !important;
}


/* ==========================================================================
   COMBINED HERO SECTION
   ========================================================================== */

.hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
  color: var(--white);
  margin: 0 -20px;
  padding-left: calc(20px + 5%);
  padding-right: calc(20px + 5%);
}

.hero-cover img {
  width: 100%;
  max-width: 280px;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transition: transform 0.3s ease;
}

.hero-cover img:hover {
  transform: scale(1.03) rotate(-1deg);
}

.hero-content h1 {
  color: var(--white) !important;
  font-size: 2rem;
  margin: 0 0 1.25rem 0;
}

.hero-content .button {
  margin-bottom: 1.5rem;
}

.hero-deadline {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  margin: 0;
  line-height: 1.6;
}

.hero-deadline strong {
  color: var(--white);
}

.hero-deadline a {
  color: var(--accent) !important;
  font-weight: 600;
  margin-left: 0.5rem;
}

.hero-deadline a:hover {
  color: var(--white) !important;
}

/* Hide old separate sections */
.latest-issue,
.next-deadline {
  display: none;
}

@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 2rem 1.5rem;
    gap: 2rem;
  }

  .hero-cover {
    display: flex;
    justify-content: center;
  }

  .hero-cover img {
    max-width: 220px;
  }

  .hero-content h1 {
    font-size: 1.6rem;
  }

  .hero-deadline {
    font-size: 0.95rem;
  }
}

/* ==========================================================================
   ARTICLES SECTION WITH TAG FILTER
   ========================================================================== */

.articles-section {
  padding: 3rem 0;
}

.articles-section h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

/* Tag filter buttons */
.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
  padding: 0 1rem;
}

.tag-btn {
  background: var(--light);
  color: var(--dark);
  border: 2px solid transparent;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tag-btn:hover {
  background: var(--dark);
  color: var(--white);
}

.tag-btn.active {
  background: var(--accent);
  color: var(--white);
}

/* Articles grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Article tags on cards */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.article-tag {
  background: var(--light);
  color: var(--dark-light);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Article date */
.article-date {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

/* Show more button */
.articles-more {
  text-align: center;
  margin-top: 2rem;
}

.articles-more .button-secondary {
  background: transparent !important;
  color: var(--dark) !important;
  border: 2px solid var(--dark) !important;
  box-shadow: none;
}

.articles-more .button-secondary:hover {
  background: var(--dark) !important;
  color: var(--white) !important;
}

@media (max-width: 900px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }
  
  .tag-filter {
    gap: 0.4rem;
  }
  
  .tag-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   SAFARI COMPATIBILITY FIXES
   ========================================================================== */

/* Fallback colors for Safari */
.hero {
  background: linear-gradient(135deg, #1D3557 0%, #457B9D 100%);
}

.button,
.ast-button,
a.button {
  background: #E63946 !important;
}

.button:hover,
a.button:hover {
  background: #C1121F !important;
}

/* Fix flexbox gap for older Safari - use margins instead */
.hero-content .button {
  margin-right: 1rem;
  margin-bottom: 1rem;
}

.tag-filter {
  margin: 0 auto 2rem;
}

.tag-filter .tag-btn {
  margin: 0.25rem;
}

.article-tags {
  margin: 0 0 0.75rem 0;
}

.article-tags .article-tag {
  margin: 0.2rem;
}

/* Ensure grid displays properly */
.hero {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

.hero-cover {
  -webkit-flex: 0 0 280px;
  flex: 0 0 280px;
  max-width: 280px;
  margin-right: 3rem;
}

.hero-content {
  -webkit-flex: 1;
  flex: 1;
  min-width: 250px;
}

.articles-grid,
.latest-articles {
  display: -webkit-box;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-wrap: wrap;
  flex-wrap: wrap;
}

.articles-grid .article-card,
.latest-articles .article-card {
  -webkit-flex: 0 0 calc(33.333% - 1rem);
  flex: 0 0 calc(33.333% - 1rem);
  max-width: calc(33.333% - 1rem);
  margin: 0.5rem;
}

@media (max-width: 900px) {
  .articles-grid .article-card,
  .latest-articles .article-card {
    -webkit-flex: 0 0 calc(50% - 1rem);
    flex: 0 0 calc(50% - 1rem);
    max-width: calc(50% - 1rem);
  }
}

@media (max-width: 600px) {
  .hero-cover {
    -webkit-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 220px;
    margin: 0 auto 2rem;
  }
  
  .hero-content {
    -webkit-flex: 0 0 100%;
    flex: 0 0 100%;
    text-align: center;
  }
  
  .articles-grid .article-card,
  .latest-articles .article-card {
    -webkit-flex: 0 0 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Ensure images don't break layout */
.hero-cover img,
.article-card img {
  display: block;
  width: 100%;
  height: auto;
}

/* ==========================================================================
   SINGLE ARTICLE FEATURED IMAGE
   ========================================================================== */

.single-featured-image {
  margin-bottom: 2rem;
}

.single-featured-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* ==========================================================================
   HEADER: LOGO ONLY, HIDE SITE TITLE TEXT
   ========================================================================== */

.ast-site-title-wrap {
  display: none !important;
}
