/*
Theme Name: Currock Lodge
Theme URI: https://currocklodge.com/
Author: Currock Lodge
Author URI: https://currocklodge.com/
Description: A clean, responsive block theme for the Currock Lodge (RAOB) focused on public information and recruitment.
Version: 0.1.0
Requires at least: 6.3
Tested up to: 6.6
Requires PHP: 8.0
Text Domain: currocklodge
Tags: full-site-editing, block-theme, blog, one-column, two-column, accessibility-ready
*/

/* Minimal CSS. Most styling is handled by theme.json */
 
/* Global subtle background gradient (override Global Styles) */
:where(.wp-site-blocks) {
  /* Ensure it spans the viewport */
  min-height: 100vh;
  /* Force gradient even if WP sets background-color later */
  background-image: linear-gradient(
    180deg,
    #EAF0FF 0%,
    #FFFFFF 32%,
    #DDE7FF 100%
  ) !important;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Header enhancements */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(8px);
  background-color: var(--wp--preset--color--blue) !important;
  box-shadow: 0 2px 10px rgba(17, 17, 17, 0.06);
}

.site-header .wp-block-navigation .wp-block-navigation-item__content {
  padding: 8px 10px;
  border-radius: 6px;
}

.site-header .wp-block-navigation .wp-block-navigation-item__content:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Ensure text and links in header are readable on blue */
.site-header, .site-header a { color: #ffffff !important; }
.site-header .wp-block-site-title a { color: #ffffff !important; }

/* Footer link color overrides on Currock Blue */
.site-footer, .site-footer a { color: #ffffff !important; }
.site-footer a:hover, .site-footer a:focus { color: #ffffff !important; opacity: 0.9; }
/* Remove underlines on footer links */
.site-footer a,
.site-footer a:visited,
.site-footer a:hover,
.site-footer a:focus,
.site-footer a:active { text-decoration: none !important; }

/* Footer tweaks */
.site-footer { border-radius: 0 !important; }
.site-footer hr.is-style-wide { margin-top: 32px; margin-bottom: 24px; }
.site-footer .wp-block-columns { align-items: stretch; }

/* Feature cards (Who we are, Meetings, Charity) */
/* Target the bordered groups inside the first wide columns section on the home */
/* Home feature cards (pattern) */
/* Support both explicit class and existing currock-home wrapper */
.wp-block-group.is-style-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-group.is-style-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.16), 0 3px 10px rgba(17, 17, 17, 0.08);
}

.wp-block-group.is-style-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  /* no transition; we trigger a one-shot animation on hover-in */
  pointer-events: none;
}

.wp-block-group.is-style-card:hover::after { animation: card-shine 0.7s ease-out forwards; }

.home-feature-card {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(17, 17, 17, 0.16), 0 3px 10px rgba(17, 17, 17, 0.08);
}

.home-feature-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  /* no transition; we trigger a one-shot animation on hover-in */
  pointer-events: none;
}

.home-feature-card:hover::after { animation: card-shine 0.7s ease-out forwards; }

.home-feature-card .wp-block-group.has-border-color,
.home-feature-card.wp-block-group.has-border-color,
.currock-home .wp-block-columns.alignwide .wp-block-group.has-border-color {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background-color: #ffffff;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-feature-card .wp-block-group.has-border-color:hover,
.home-feature-card.wp-block-group.has-border-color:hover,
.currock-home .wp-block-columns.alignwide .wp-block-group.has-border-color:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.12), 0 2px 8px rgba(17, 17, 17, 0.06);
}

/* Shine sweep on hover */
.home-feature-card .wp-block-group.has-border-color::after,
.home-feature-card.wp-block-group.has-border-color::after,
.currock-home .wp-block-columns.alignwide .wp-block-group.has-border-color::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.45) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  /* no transition; we trigger a one-shot animation on hover-in */
  pointer-events: none;
}

.home-feature-card .wp-block-group.has-border-color:hover::after,
.home-feature-card.wp-block-group.has-border-color:hover::after,
.currock-home .wp-block-columns.alignwide .wp-block-group.has-border-color:hover::after { animation: card-shine 0.7s ease-out forwards; }

/* One-shot shine animation: only runs on hover-in, no reverse on hover-out */
@keyframes card-shine {
  0% { left: -100%; }
  100% { left: 140%; }
}

/* Home Page template: rounded corners throughout */
:root { --currock-radius: 12px; }

/* Covers */
body.page-template-home-page .wp-block-cover,
.currock-home .wp-block-cover {
  border-radius: var(--currock-radius);
  overflow: hidden;
}
body.page-template-home-page .wp-block-cover__background,
.currock-home .wp-block-cover__background {
  border-radius: inherit;
}

/* Images */
body.page-template-home-page .wp-block-image img,
.currock-home .wp-block-image img {
  border-radius: var(--currock-radius);
}

/* Buttons */
body.page-template-home-page .wp-block-button .wp-block-button__link,
.currock-home .wp-block-button .wp-block-button__link {
  border-radius: calc(var(--currock-radius) - 4px);
}

/* Card-like groups (feature tiles, query items) */
body.page-template-home-page .wp-block-group.has-border-color,
.currock-home .wp-block-group.has-border-color,
body.page-template-home-page .wp-block-group.has-background,
.currock-home .wp-block-group.has-background,
.home-feature-card,
.wp-block-group.is-style-card {
  border-radius: var(--currock-radius);
  overflow: hidden;
}

/* Ensure home sections like "Ready to get involved" and "Visit us" round visibly */
.wp-site-blocks main .wp-block-group.has-background {
  border-radius: var(--currock-radius) !important;
  overflow: hidden;
}

/* Remove top gap between header and Standard Page content */
.wp-site-blocks > .no-top-gap { margin-top: 0 !important; }

/* Single post hero cover tweaks */
.post-hero { overflow: hidden; border-radius: var(--currock-radius); }
