/**
 * Theme Builder - Global Styles.
 *
 * Base styles for the theme (reset, typography, layout, cards, etc.)
 *
 * @package Theme_Builder
 */

/* ========================================
   CSS Reset (minimal)
   ======================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ========================================
   Base
   ======================================== */

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333333;
    background-color: #ffffff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #e94560;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #c73e54;
}

/* ========================================
   Layout
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-main {
    min-height: calc(100vh - 140px);
}

/* ========================================
   Header
   ======================================== */

.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
}

.site-branding .site-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a2e;
    text-decoration: none;
}

.site-branding .site-title:hover {
    color: #e94560;
}

/* Navigation */
.main-navigation .nav-menu {
    display: flex;
    list-style: none;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.main-navigation .nav-menu li a {
    color: #333333;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.main-navigation .nav-menu li a:hover,
.main-navigation .nav-menu li.current-menu-item a {
    color: #e94560;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle__bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333333;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .main-navigation .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid #e0e0e0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .main-navigation .nav-menu.is-active {
        display: flex;
    }
}

/* ========================================
   Footer
   ======================================== */

.site-footer {
    background-color: #1a1a2e;
    color: #cccccc;
    padding: 40px 0;
    margin-top: 60px;
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-menu {
    display: flex;
    list-style: none;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.footer-menu li a {
    color: #cccccc;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-menu li a:hover {
    color: #ffffff;
}

.site-footer__copy {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ========================================
   Front page
   ======================================== */

.front-hero {
    background-color: #1a1a2e;
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
}

.front-hero__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 12px;
}

.front-hero__description {
    font-size: 1.15rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 0 auto;
}

.front-section {
    padding: 60px 0;
}

.front-section__title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 32px;
    padding-bottom: 12px;
    border-bottom: 3px solid #e94560;
    display: inline-block;
}

/* ========================================
   Posts Grid & Cards
   ======================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.post-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.post-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.post-card__thumbnail {
    display: block;
    aspect-ratio: 3/2;
    overflow: hidden;
    background-color: #f0f0f0;
}

.post-card__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card__thumbnail img {
    transform: scale(1.05);
}

.post-card__thumbnail--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f5;
}

.post-card__thumbnail--placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: #cccccc;
}

.post-card__content {
    padding: 20px;
}

.post-card__title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.post-card__title a {
    color: #1a1a2e;
    text-decoration: none;
}

.post-card__title a:hover {
    color: #e94560;
}

.post-card__excerpt {
    font-size: 0.9rem;
    color: #666666;
    margin-bottom: 12px;
}

.post-card__excerpt p {
    margin: 0;
}

.post-card__meta {
    font-size: 0.8rem;
    color: #999999;
}

/* ========================================
   Single Post
   ======================================== */

.single-post .entry-header {
    padding-top: 40px;
    padding-bottom: 24px;
    text-align: center;
}

.single-post .entry-title {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.single-post .entry-meta {
    font-size: 0.9rem;
    color: #999999;
    display: flex;
    gap: 16px;
    justify-content: center;
}

.single-post .entry-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px 60px;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Page content - full width for blocks */
.page-content .entry-content {
    max-width: 100%;
    padding: 0;
}

/* ========================================
   Pagination
   ======================================== */

.pagination {
    margin-top: 40px;
    text-align: center;
}

.pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #333333;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background-color: #e94560;
    border-color: #e94560;
    color: #ffffff;
}

/* ========================================
   Error / No Content
   ======================================== */

.error-content,
.no-content {
    text-align: center;
    padding: 80px 20px;
}

.error-title {
    font-size: 6rem;
    font-weight: 800;
    color: #e94560;
    line-height: 1;
    margin-bottom: 16px;
}

.error-content h2,
.no-content h2 {
    font-size: 1.5rem;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.error-content p,
.no-content p {
    color: #666666;
    margin-bottom: 24px;
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn--primary {
    background-color: #e94560;
    color: #ffffff;
}

.btn--primary:hover {
    background-color: #c73e54;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ========================================
   Utility: make blocks full-width
   ======================================== */

.entry-content > .alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.entry-content > .alignfull {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

/* ========================================
   WordPress Admin Bar offset
   ======================================== */

body.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* ========================================
   FIXED CONTACT BUTTONS
   ======================================== */

.fixed-contact-buttons {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 1000;
}

.fixed-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.fixed-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.fixed-btn-phone {
  background: #0f172a;
}

.fixed-btn-phone svg {
  width: 24px;
  height: 24px;
}

.fixed-btn-whatsapp {
  background: #25d366;
}

/* ================================================================
   LEAD POPUP MODAL
   ================================================================ */

.lead-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lead-popup.show {
  display: flex;
  opacity: 1;
  visibility: visible;
}

.lead-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.lead-popup__content {
  position: relative;
  width: 90%;
  max-width: 550px;
  background: #fff;
  border-radius: 16px;
  padding: clamp(2rem, 5vw, 3rem);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: popupSlideUp 0.4s ease;
  max-height: 90vh;
  overflow-y: auto;
}

@keyframes popupSlideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.lead-popup__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #475569;
  z-index: 10;
}

.lead-popup__close:hover {
  background: #e2e8f0;
  color: #0f172a;
  transform: rotate(90deg);
}

.lead-popup__header {
  text-align: center;
  margin-bottom: 2rem;
}

.lead-popup__title {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1rem;
  line-height: 1.2;
}

.lead-popup__subtitle {
  font-size: clamp(0.9rem, 2vw, 1rem);
  color: #64748b;
  margin: 0;
  line-height: 1.6;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.lead-popup__fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lead-popup__input {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8fafc;
  direction: rtl;
}

.lead-popup__input:focus {
  outline: none;
  border-color: #f59e0b;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.lead-popup__input::placeholder {
  color: #94a3b8;
}

.lead-popup__submit {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.lead-popup__submit:active {
  transform: translateY(0);
}

[dir="rtl"] .lead-popup__close {
  right: auto;
  left: 1rem;
}

span.about__btn.about__btn--primary,
span.hero__cta {
  cursor: pointer;
}

/* Original theme-builder blocks — popup trigger elements */
#openPopupBtn,
.btn-download,
.payment-card,
.amenity-item,
.btn-register {
  cursor: pointer;
}

@media (max-width: 640px) {
  .lead-popup__content {
    width: 95%;
    padding: 1.5rem;
    border-radius: 12px;
  }

  .lead-popup__title {
    font-size: 1.5rem;
  }

  .lead-popup__subtitle {
    font-size: 0.9rem;
  }
}
