/**
 * Bootstrap One Page - Optimized CSS
 * Theme URI: Raylewaydigital.com
 * Author: Coley Rayle
 * Version: 1.2
 * License: GNU GPL v2
 */
:root {
  --primary-color: #4CAF50;
  --secondary-color: #57130e;
  --text-color: #333;
  --light-bg: #f9f9f9;
  --white: #fff;
  --dark-bg: rgba(0,0,0,0.7);
  --shadow-sm: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-md: 0 5px 15px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
  --navbar-bg: #ffffff;
}

body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-color);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

html {
  scroll-behavior: smooth;
}

body.wp-admin .custom-logo,
body.customize-preview .custom-logo {
  cursor: move;
  border: 2px dashed #007cba;
  padding: 4px;
}

/* ========================================================================== */
/* Header & Navigation - Updated Styles */
/* ========================================================================== */
/* Limit navbar menu width and align items to the right */
.navbar-nav {
  width: 250px; /* Adjust this as needed */
  justify-content: flex-end;
  margin-left: auto;
  margin-right: 0;
  text-align: right;
}


.navbar-nav .nav-link {
  color: #57130e !important;
}

.navbar-toggler {
  color: #57130e !important;
  border-color: rgba(87, 19, 14, 0.1);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(87, 19, 14, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-collapse {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: var(--navbar-bg);
  width: 100%;
}

.navbar-collapse.show {
  max-height: 500px;
  transition: max-height 0.5s ease-in;
}

.site-header {
  min-height: 70px;
  transition: none;
}

@media (min-width: 992px) {
  .navbar-collapse {
    max-height: none;
    overflow: visible;
    background-color: transparent;
    width: auto;
  }

  .navbar-nav .nav-link {
    position: relative;
    padding: 0.5rem 1rem;
  }

  .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #57130e;
    transition: all 0.3s ease;
  }

  .navbar-nav .nav-link:hover::after {
    width: 100%;
    left: 0;
  }
}
@media (min-width: 992px) {
  .ui-draggable-dragging .custom-logo {
    opacity: 0.8;
  }

  .ui-resizable-handle {
    background: var(--primary-color);
    width: 10px;
    height: 10px;
    position: absolute;
    z-index: 20;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .logo-container:hover .ui-resizable-handle {
    opacity: 1;
  }

  .ui-resizable-se { right: -5px; bottom: -5px; cursor: se-resize; }
  .ui-resizable-sw { left: -5px; bottom: -5px; cursor: sw-resize; }
  .ui-resizable-ne { right: -5px; top: -5px; cursor: ne-resize; }
  .ui-resizable-nw { left: -5px; top: -5px; cursor: nw-resize; }
}

/* ========================================================================== */
/* Hero Section */
/* ========================================================================== */
.hero-section {
  position: relative;
  min-height: 50vh;
  padding: 60px 15px 30px;
  overflow: hidden;
}

.hero-image-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 300px;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: var(--shadow-md);
  object-fit: contain;
  image-rendering: crisp-edges;
}

/* Countdown Timer */
.countdown-overlay {
  position: relative;
  background: var(--dark-bg);
  color: var(--secondary-color);
  padding: 20px;
  border-radius: 8px;
  width: 100%;
  margin: 20px auto;
  text-align: center;
}

.countdown-title {
  margin-bottom: 15px;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
}

.countdown-timer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.countdown-item {
  text-align: center;
  min-width: 60px;
  padding: 5px;
}

.countdown-number {
  font-size: 1.8rem;
  font-weight: bold;
  color: #ff0000 !important; /* Override to regular red */
  text-shadow: 0 0 5px rgba(255,0,0,0.5);
  margin-bottom: 5px;
  display: block;
}


.countdown-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--white);
  letter-spacing: 1px;
}

/* Ribbon */
.ribbon {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 100px;
  height: 100px;
  overflow: hidden;
  z-index: 20;
}

.ribbon-content {
  position: absolute;
  display: block;
  width: 150px;
  padding: 10px 0;
  background-color: var(--secondary-color);
  box-shadow: var(--shadow-sm);
  color: var(--white);
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  right: -25px;
  top: 30px;
  transform: rotate(45deg);
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .hero-section {
    min-height: 70vh;
    padding: 80px 20px 40px;
  }

  .hero-image {
    max-height: 500px;
  }

  .countdown-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 600px;
    padding: 30px 40px;
    margin: 0;
  }

  .countdown-title { font-size: 1.8rem; }
  .countdown-item { min-width: 80px; }
  .countdown-number { font-size: 3rem; }
  .countdown-label { font-size: 1rem; }

  .ribbon {
    width: 150px;
    height: 150px;
  }

  .ribbon-content {
    width: 225px;
    padding: 15px 0;
    font-size: 16px;
  }
}
/* ========================================================================== */
/* Content Sections */
/* ========================================================================== */
.section {
  padding: 50px 0;
  scroll-margin-top: 70px;
}

.section-title {
  margin-bottom: 30px;
  text-align: center;
  font-size: 2rem;
}

.post-card {
  margin-bottom: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  overflow: hidden;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.post-card .card-img-top {
  height: 180px;
  width: 100%;
  object-fit: cover;
  background-color: #f5f5f5;
}

.post-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

.post-card .card-title {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.post-card .card-text {
  flex-grow: 1;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

.post-card .btn {
  align-self: flex-start;
  font-size: 0.9rem;
  padding: 8px 16px;
}

@media (min-width: 768px) {
  .section {
    padding: 80px 0;
    scroll-margin-top: 80px;
  }

  .section-title {
    margin-bottom: 50px;
    font-size: 2.5rem;
  }

  .post-card .card-img-top {
    height: 200px;
  }

  .post-card .card-title {
    font-size: 1.3rem;
  }

  .post-card .btn {
    font-size: 1rem;
    padding: 10px 20px;
  }
}

/* ========================================================================== */
/* Modal Styles */
/* ========================================================================== */
.post-modal .modal-dialog {
  margin: 10px;
  max-width: calc(100% - 20px);
}

.post-modal .modal-content {
  border-radius: 8px;
  overflow: hidden;
}

.post-modal .modal-header {
  padding: 15px;
  border-bottom: 1px solid #eee;
}

.post-modal .modal-body {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

#postModalImage img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 15px;
  border-radius: 5px;
}

.modal-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

#postMeta {
  margin-bottom: 15px;
  font-size: 0.9rem;
}

#postModalContent {
  font-size: 1rem;
  line-height: 1.6;
}

#postModalContent img {
  max-width: 100%;
  height: auto;
  margin: 15px 0;
}

.modal-backdrop.show {
  opacity: 0.8;
  background-color: rgba(0, 0, 0, 0.4);
}

@media (min-width: 768px) {
  .post-modal .modal-dialog {
    margin: 30px auto;
    max-width: 800px;
  }

  .post-modal .modal-header {
    padding: 20px;
  }

  .post-modal .modal-body {
    padding: 30px;
    max-height: 80vh;
  }

  #postModalImage img {
    max-height: 400px;
    margin-bottom: 20px;
  }

  .modal-title {
    font-size: 1.8rem;
  }
}
/* ========================================================================== */
/* Comments Section */
/* ========================================================================== */
.modal-comments-section {
  border-top: 1px solid #eee;
  padding-top: 20px;
  margin-top: 20px;
}

.modal-comments-section h5 {
  font-size: 1.3rem;
  margin-bottom: 15px;
}

.comments-list {
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 20px;
  padding: 10px;
  background: var(--light-bg);
  border-radius: 5px;
}

.comment {
  padding: 12px;
  background: var(--white);
  border-radius: 5px;
  margin-bottom: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.comment-author {
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  font-size: 0.9rem;
}

.comment-author strong {
  margin-right: 10px;
}

.comment-content {
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ========================================================================== */
/* Comment Form */
/* ========================================================================== */
#commentform {
  margin-top: 20px;
}

#commentform .form-group {
  margin-bottom: 15px;
}

#commentform textarea {
  min-height: 100px;
  font-size: 0.9rem;
}

#commentform input {
  font-size: 0.9rem;
  padding: 10px 15px;
}

#commentform button {
  font-size: 0.9rem;
  padding: 10px 20px;
}

/* ========================================================================== */
/* Contact Form */
/* ========================================================================== */
.contact-form .form-control {
  margin-bottom: 15px;
  padding: 12px 15px;
  font-size: 0.9rem;
  border-radius: 4px;
  border: 1px solid #ddd;
}

.contact-form textarea.form-control {
  min-height: 150px;
}

.contact-form button[type="submit"] {
  width: 100%;
  padding: 12px;
  font-size: 1rem;
}

@media (min-width: 768px) {
  .contact-form .form-control {
    margin-bottom: 20px;
    padding: 15px;
    font-size: 1rem;
  }

  .contact-form button[type="submit"] {
    width: auto;
    padding: 12px 30px;
  }
}

/* ========================================================================== */
/* Footer */
/* ========================================================================== */
footer.bg-dark {
  padding: 30px 0;
  text-align: center;
}

footer.bg-dark p {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
}

/* ========================================================================== */
/* Utility and Responsive Fixes */
/* ========================================================================== */
.bg-light {
  background-color: var(--light-bg) !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
  box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

@media (max-width: 767px) {
  .row {
    margin-left: -10px;
    margin-right: -10px;
  }

  [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
  }

  .post-card {
    margin-bottom: 15px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .col-md-4 {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

#postModalContent img,
.wp-post-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 15px auto;
}

/* === Countdown Timer: hide on tablet and mobile === */
@media (max-width: 991px) {
  #countdown {
    display: none !important;
  }
}

/* === Form Input UX Fix === */
input, textarea, select {
  font-size: 16px;
  touch-action: manipulation;
}

.dropdown-menu {
  width: 50px !important;
  min-width: unset !important;
  text-align: right;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
