/*
Theme Name: Breath of Life
Theme URI: https://breathoflife.church
Author: Breath of Life Fellowship
Description: Custom theme for Breath of Life Fellowship - a young and vibrant Seventh-day Adventist church in Stamford, Connecticut.
Version: 1.2
Requires at least: 5.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: breath-of-life
*/

/* ========================================
   CSS VARIABLES
   ======================================== */
:root {
  --navy: #1B2138;
  --navy-dark: #141829;
  --navy-light: #252b45;
  --orange: #F2B705;
  --orange-hover: #D9A404;
  --white: #ffffff;
  --light-gray: #f5f5f7;
  --text-body: #333;
  --text-muted: #444;
  --text-gray: #6b7280;
  --border-light: #e0e0e0;
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;
  --header-height: 70px;
  --content-width: 1100px;
  --content-narrow: 900px;
}

/* ========================================
   RESET & BASE
   ======================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.1;
}

/* ========================================
   SKIP LINK (Accessibility)
   ======================================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  background: var(--orange);
  color: var(--navy);
  padding: 0.75rem 1.5rem;
  font-weight: 700;
}

.skip-link:focus {
  top: 0;
}

/* ========================================
   BUTTONS (single source of truth)
   ======================================== */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background 0.2s, transform 0.2s;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--orange);
  color: var(--navy);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--orange-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: var(--white);
  color: var(--navy);
}

/* ========================================
   HEADER / NAVIGATION
   ======================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--navy);
  padding: 0 2rem;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.1;
}

.site-logo img {
  height: 40px;
  width: auto;
  max-width: 40px;
}

.site-logo span {
  display: block;
}

/* Main navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 0.25rem;
}

.main-navigation ul li a {
  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.5rem 1rem;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.main-navigation ul li a:hover,
.main-navigation ul li a:focus-visible {
  color: var(--white);
}

/* Watch CTA button in nav — uses .btn .btn-primary, only overrides size */
.nav-cta {
  margin-left: 1.5rem;
}

.main-navigation .nav-cta a.btn {
  padding: 0.6rem 1.5rem;
  font-size: 0.85rem;
  color: var(--navy);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  margin: 5px 0;
  transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  max-height: 900px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Hero carousel */
.hero-carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  background-color: var(--navy-light);
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
}

/* Carousel navigation dots */
.hero-carousel-dots {
  position: absolute;
  bottom: 2rem;
  right: 4rem;
  z-index: 5;
  display: flex;
  gap: 0.75rem;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--white);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, transform 0.2s;
}

.carousel-dot:hover {
  transform: scale(1.2);
}

.carousel-dot.active {
  background: var(--orange);
  border-color: var(--orange);
}

/* Diagonal dark overlay */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--navy);
  clip-path: polygon(0 0, 42% 0, 32% 100%, 0 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 4rem;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.hero-text {
  text-align: left;
  color: var(--white);
  max-width: 650px;
}

.hero-text h1 {
  font-size: clamp(3.5rem, 7vw, 6rem);
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  line-height: 0.95;
  letter-spacing: -0.02em;
}

.hero-tagline {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
  color: var(--white);
}

.hero-location {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  font-style: italic;
}

/* Connect button in hero text */
.hero-text .btn {
  margin-top: 1.5rem;
  letter-spacing: 0.1em;
}

.hero-text .btn i {
  margin-right: 0.4rem;
}

/* ========================================
   CONTENT SECTIONS
   ======================================== */
.content-area {
  padding-top: var(--header-height);
}

.section {
  padding: 5rem 2rem;
}

.section-inner {
  max-width: var(--content-width);
  margin: 0 auto;
}

.section-dark {
  background: var(--navy);
  color: var(--white);
}

.section-light {
  background: var(--light-gray);
}

.section-title {
  font-size: 2.5rem;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--orange);
  margin-top: 0.75rem;
}

/* ========================================
   PAGE CONTENT
   ======================================== */
.page-hero {
  background: var(--navy);
  padding: calc(var(--header-height) + 3rem) 2rem 4rem;
  text-align: center;
  color: var(--white);
}

.page-hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.page-hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.75);
}

.page-content {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: 4rem 2rem;
  overflow-x: hidden;
}

.page-content h2 {
  font-size: 1.8rem;
  color: var(--navy);
  margin: 2rem 0 1rem;
}

.page-content p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  line-height: 1.8;
}

.page-content ol,
.page-content ul {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

/* Front page content — full-width, no padding */
.front-page-content {
  width: 100%;
}

/* Home Cards Section (Vision + Welcome) */
.home-cards {
  background: #f5f0e8;
  padding: 4rem 2rem 5rem;
}

.home-cards-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.home-card {
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 3rem 2.5rem;
  text-align: center;
  position: relative;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

/* Vision card */
.home-card .card-heading {
  font-family: 'Georgia', serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  color: var(--orange);
  margin-bottom: 0.5rem;
}

.home-card .card-divider {
  display: block;
  width: 120px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  margin: 0.75rem auto 1.5rem;
  border: none;
}

.home-card .card-text {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.8;
}

/* Welcome card - cross icon */
.home-card .card-icon {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.5rem;
  color: rgba(27, 33, 56, 0.12);
}

.home-card .card-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  font-weight: 900;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
  .home-cards-inner {
    grid-template-columns: 1fr;
  }

  .home-card {
    padding: 2.5rem 2rem;
  }
}

/* Page links (for <!--nextpage-->) */
.page-links {
  margin-top: 2rem;
  font-weight: 600;
}

/* ========================================
   PASTOR BIO SECTION
   ======================================== */
.pastor-section {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 2.5rem;
  align-items: start;
  margin: 3rem 0;
  padding: 2.5rem;
  background: var(--light-gray);
  border-radius: 12px;
}

.pastor-section h2 {
  grid-column: 1 / -1;
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--navy);
  margin: 0 0 0.5rem;
}

.pastor-photo {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.pastor-bio h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--navy);
  margin: 0 0 0.25rem;
}

.pastor-bio .pastor-title {
  color: var(--orange);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 1rem;
  display: block;
}

.pastor-bio p {
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 1rem;
}

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

  .pastor-photo {
    max-width: 250px;
    margin: 0 auto;
  }

  .pastor-bio {
    text-align: left;
  }
}

/* ========================================
   GIVING PAGE
   ======================================== */
.giving-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.giving-card {
  background: var(--white);
  border-radius: 8px;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s;
}

.giving-card:hover {
  transform: translateY(-3px);
}

.giving-card img {
  max-height: 60px;
  margin-bottom: 1.5rem;
}

.giving-card h3 {
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 0.75rem;
}

/* ========================================
   YOTUWP RESPONSIVE OVERRIDES
   ======================================== */
.yotuwp,
.yotu-wrapper-player {
  max-width: 100% !important;
  box-sizing: border-box;
}

.yotu-wrapper-player .yotu-player,
.yotu-wrapper-player iframe,
.yotu-video-placeholder {
  width: 100% !important;
  aspect-ratio: 16 / 9;
}

.yotu-videos ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.yotu-videos ul li {
  box-sizing: border-box;
}

.yotu-video-thumb {
  width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .yotu-wrapper-player {
    width: 100% !important;
  }

  .yotu-videos ul {
    flex-direction: column;
  }

  .yotu-videos ul li {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
  }
}

/* ========================================
   SERMONS / MEDIA PAGE
   ======================================== */
.sermons-container {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 4rem 2rem;
}

.sermons-container iframe {
  width: 100%;
  border-radius: 8px;
}

/* ========================================
   LIVE STREAM PAGE
   ======================================== */
.live-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

.live-container .wp-youtube-live {
  max-width: 100%;
}

.live-container iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
}

.live-fallback {
  background: var(--light-gray);
  padding: 3rem;
  border-radius: 8px;
  text-align: center;
}

.live-fallback p {
  font-size: 1.1rem;
  color: var(--text-gray);
}

/* ========================================
   CONTACT FORM (Contact Form 7)
   ======================================== */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.2s;
  margin-bottom: 0.5rem;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 textarea:focus {
  border-color: var(--orange);
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.wpcf7 input[type="submit"] {
  background: var(--orange);
  color: var(--navy);
  border: none;
  padding: 0.85rem 2.5rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s;
}

.wpcf7 input[type="submit"]:hover,
.wpcf7 input[type="submit"]:focus-visible {
  background: var(--orange-hover);
}

/* ========================================
   GOOGLE MAP
   ======================================== */
.wpgmza_map {
  border-radius: 8px;
  overflow: hidden;
  margin-top: 2rem;
}

/* ========================================
   COMMENTS
   ======================================== */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
}

.comments-title {
  font-size: 1.4rem;
  color: var(--navy);
  margin-bottom: 1.5rem;
}

.comment-list {
  list-style: none;
  padding-left: 0;
}

.comment-list li {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--light-gray);
}

/* ========================================
   POST NAVIGATION
   ======================================== */
.post-navigation {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
}

.post-navigation a {
  color: var(--orange);
  font-weight: 600;
}

.post-navigation a:hover {
  color: var(--orange-hover);
}

/* ========================================
   404 PAGE
   ======================================== */
.error-404 {
  text-align: center;
  padding: 6rem 2rem;
  max-width: 600px;
  margin: 0 auto;
}

.error-404 h2 {
  font-size: 6rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.error-404 p {
  font-size: 1.2rem;
  color: var(--text-gray);
  margin-bottom: 2rem;
}

.error-404 .search-form {
  margin-top: 2rem;
}

/* ========================================
   SEARCH FORM
   ======================================== */
.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
  margin: 1rem auto;
}

.search-form .search-field {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--border-light);
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
}

.search-form .search-field:focus {
  border-color: var(--orange);
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.search-form .search-submit {
  background: var(--orange);
  color: var(--navy);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-family: var(--font-heading);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
}

.search-form .search-submit:hover,
.search-form .search-submit:focus-visible {
  background: var(--orange-hover);
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 2rem 2rem;
}

.footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}

.footer-col h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 1.25rem;
}

.footer-col h4 + h4 {
  margin-top: 1.5rem;
}

.footer-col p,
.footer-col li {
  font-size: 0.9rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.75);
}

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

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s;
}

.footer-col ul li a:hover,
.footer-col ul li a:focus-visible {
  color: var(--orange);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 1.1rem;
  transition: background 0.2s;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  background: var(--orange);
}

.footer-bottom {
  max-width: var(--content-width);
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .hero-content {
    padding: 0 2rem;
  }

  .hero-overlay {
    clip-path: polygon(0 0, 50% 0, 38% 100%, 0 100%);
  }
}

@media (max-width: 1024px) {
  .site-header {
    padding: 0 1.25rem;
  }

  .menu-toggle {
    display: block;
  }

  .main-navigation {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--navy);
    flex-direction: column;
    justify-content: flex-start;
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }

  .main-navigation.toggled {
    transform: translateX(0);
  }

  .main-navigation ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .main-navigation ul li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-navigation ul li a {
    padding: 1rem 0;
    font-size: 1rem;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 1.5rem;
    width: 100%;
  }

  .main-navigation .nav-cta a.btn {
    display: block;
    text-align: center;
    width: 100%;
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  /* Hero responsive */
  .hero {
    height: auto;
    min-height: 500px;
    max-height: none;
  }

  .hero-overlay {
    clip-path: none;
    opacity: 0.75;
  }

  .hero-content {
    justify-content: center;
    padding: 4rem 1.5rem;
  }

  .hero-text {
    text-align: center;
  }

  .hero-carousel-dots {
    right: 50%;
    transform: translateX(50%);
    bottom: 1.5rem;
  }

  .hero-text h1 {
    font-size: 3rem;
  }

  /* Footer responsive */
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .footer-social {
    justify-content: center;
  }

  /* Page hero */
  .page-hero {
    padding: calc(var(--header-height) + 2rem) 1.5rem 3rem;
  }

  /* Post nav */
  .post-navigation {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .hero {
    min-height: 400px;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-tagline {
    font-size: 0.85rem;
  }

  .hero-content {
    padding: 3rem 1rem;
  }

  .section {
    padding: 3rem 1.25rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .home-cards {
    padding: 2.5rem 1rem 3rem;
  }

  .home-card {
    padding: 2rem 1.5rem;
  }

  .giving-options {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}