/*
Theme Name: RM Starter Theme
Theme URI: https://rabornmedia.com
Author: Raborn Media
Author URI: https://rabornmedia.com
Description: A clean, professional WordPress block theme built from the Raborn Media starter design system. Features hero sections, feature highlights, testimonials, blog grids, and full FSE support.
Version: 1.0.0
Requires at least: 6.3
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rm-starter-theme
*/

/* =============================================
   GLOBAL RESETS & BASE
   ============================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Work Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #212121;
  background-color: #ffffff;
  margin: 0;
}

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

a {
  color: var(--wp--preset--color--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =============================================
   FOOTER MARGIN RESET
   ============================================= */

.wp-site-blocks > footer {
  margin-block-start: 0;
}

/* =============================================
   EQUAL CARDS
   ============================================= */

.equal-cards > .wp-block-column {
  display: flex;
  flex-direction: column;
  flex-grow: 0;
}

.equal-cards > .wp-block-column > .wp-block-group {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.equal-cards .cta-bottom {
  margin-top: auto;
  justify-content: flex-start;
}

/* =============================================
   HEADER
   ============================================= */

.rm-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid #e0e0e0;
}

.rm-header .wp-block-navigation a {
  color: #006199;
  font-family: "Inter", sans-serif;
  font-size: 1.125rem;
  text-decoration: none;
}

.rm-header .wp-block-navigation a:hover {
  text-decoration: underline;
}

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

.rm-hero {
  position: relative;
  min-height: 780px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.rm-hero .rm-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.75));
  pointer-events: none;
}

.rm-hero-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #004d7a 0%, #006199 50%, #0082cc 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

/* =============================================
   PAGE HERO (Blog / Index)
   ============================================= */

.rm-page-hero {
  background: linear-gradient(135deg, #004d7a 0%, #006199 100%);
  color: #ffffff;
  padding: 80px 0;
  text-align: center;
}

.rm-page-hero p,
.rm-page-hero h1,
.rm-page-hero h2 {
  color: #ffffff;
}

/* =============================================
   FEATURE HIGHLIGHTS
   ============================================= */

.rm-feature-icon {
  width: 64px;
  height: 64px;
  background: var(--wp--preset--color--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.rm-feature-icon svg {
  width: 36px;
  height: 36px;
  fill: #ffffff;
}

/* =============================================
   COUNTER / STATS SECTION
   ============================================= */

.rm-stats-section {
  display: flex;
  align-items: stretch;
}

.rm-stats-image {
  flex: 0 0 400px;
  min-height: 500px;
  background: linear-gradient(160deg, #004d7a 0%, #0082cc 100%);
  background-size: cover;
  background-position: center;
}

/* =============================================
   TESTIMONIALS / REVIEWS
   ============================================= */

.rm-testimonials {
  background-color: var(--wp--preset--color--primary);
  border-radius: 16px;
  padding: 80px;
  color: #fafafa;
}

.rm-testimonials h2,
.rm-testimonials p {
  color: #fafafa;
}

.rm-testimonial-card {
  border: 1px solid rgba(250, 250, 250, 0.4);
  border-radius: 16px;
  padding: 40px;
  background: var(--wp--preset--color--primary);
  color: #fafafa;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.rm-testimonial-card p {
  color: #fafafa;
}

/* =============================================
   BLOG CARDS
   ============================================= */

.rm-blog-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rm-blog-card__image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.rm-blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rm-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #d0d8e8 0%, #b8c4d8 50%, #a8b8ce 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.rm-image-placeholder::after {
  content: "";
  display: block;
  width: 60px;
  height: 60px;
  border: 3px dashed rgba(0, 97, 153, 0.3);
  border-radius: 8px;
}

.rm-read-more {
  color: #994935;
  font-family: "Work Sans", sans-serif;
  font-size: 1.125rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.rm-read-more:hover {
  text-decoration: underline;
}

.rm-read-more::after {
  content: "\2192";
  font-size: 1.1em;
}

/* =============================================
   BLOG FEATURED CARD (horizontal)
   ============================================= */

.rm-blog-featured {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 428px;
  border-radius: 8px;
  overflow: hidden;
}

.rm-blog-featured__image {
  background: linear-gradient(135deg, #d0d8e8 0%, #a8b8ce 100%);
  position: relative;
}

.rm-blog-featured__content {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

/* =============================================
   HOW IT WORKS - TEXT/MEDIA
   ============================================= */

.rm-text-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.rm-text-media__image {
  width: 100%;
  aspect-ratio: 1 / 0.94;
  background: linear-gradient(135deg, #d0d8e8 0%, #a8b8ce 100%);
  border-radius: 8px;
  overflow: hidden;
}

/* =============================================
   CTA SECTION
   ============================================= */

.rm-cta-section {
  background-color: #e0e0e0;
  padding: 96px 0;
  text-align: center;
}

/* =============================================
   BUTTONS
   ============================================= */

.rm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 40px;
  border-radius: 4px;
  font-family: "Work Sans", sans-serif;
  font-size: 1.125rem;
  font-weight: 400;
  line-height: 1.6;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.15s ease;
  border: none;
}

.rm-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  text-decoration: none;
}

.rm-btn--primary {
  background-color: #0082cc;
  color: #fafafa;
}

.rm-btn--outline {
  background-color: transparent;
  color: #0082cc;
  border: 2px solid #0082cc;
}

.rm-btn--dark {
  background-color: #212121;
  color: #fafafa;
  border-radius: 0;
  padding: 16px 24px;
}

/* =============================================
   SINGLE POST
   ============================================= */

.rm-single-post {
  max-width: 780px;
  margin: 0 auto;
}

.rm-single-post__hero-image {
  width: 100%;
  aspect-ratio: 1380 / 700;
  background: linear-gradient(135deg, #d0d8e8 0%, #a8b8ce 100%);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 40px;
}

.rm-post-meta {
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
  color: #616161;
  margin-bottom: 8px;
}

.rm-post-divider {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 40px 0;
}

.rm-pullquote {
  border-left: 4px solid #0082cc;
  padding: 24px 40px;
  margin: 32px 0;
  background: #f5f9fd;
  border-radius: 0 8px 8px 0;
}

.rm-pullquote p {
  font-family: "Inter", sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.5;
  color: #212121;
  margin: 0 0 8px;
}

.rm-pullquote cite {
  font-size: 0.9rem;
  color: #616161;
  font-style: normal;
}

/* =============================================
   INLINE IMAGE WITH CAPTION
   ============================================= */

.rm-inline-image {
  width: 100%;
  background: linear-gradient(135deg, #d0d8e8 0%, #a8b8ce 100%);
  border-radius: 8px;
  overflow: hidden;
  margin: 32px 0 8px;
}

.rm-inline-image + figcaption,
.rm-inline-caption {
  font-size: 0.875rem;
  color: #616161;
  text-align: center;
  margin-bottom: 32px;
}

/* =============================================
   SECTION DIVIDERS
   ============================================= */

.rm-section-divider {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 0;
}

/* =============================================
   INDEX PAGE - HOW IT WORKS BULLETS
   ============================================= */

.rm-how-it-works {
  padding: 80px 0;
}

.rm-how-it-works__step {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid #e0e0e0;
}

.rm-how-it-works__step:last-child {
  border-bottom: none;
}

.rm-step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: #0082cc;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
}

/* =============================================
   NAVIGATION
   ============================================= */

.wp-block-navigation .wp-block-navigation-item__content {
  font-family: "Inter", sans-serif;
  font-size: 1.125rem;
  color: #006199;
}

/* =============================================
   ANIMATIONS
   ============================================= */

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.6s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.5s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.4s; }

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hover-lift {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* =============================================
   ACCESSIBILITY
   ============================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
  .rm-text-media {
    grid-template-columns: 1fr;
  }

  .rm-blog-featured {
    grid-template-columns: 1fr;
  }

  .rm-testimonials {
    padding: 40px 24px;
  }

  .rm-stats-image {
    display: none;
  }
}
