/*
Theme Name: Sinatra Child
Template: sinatra
*/

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&display=swap');

/* ===== GLOBAL FONT ===== */
body,
button,
input,
select,
textarea {
    font-family: 'Merriweather', serif !important;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700 !important;
}

/* ===== BUTTONS ===== */
.wp-block-button .wp-block-button__link,
.cta-button {
    font-family: 'Merriweather', serif !important;
    padding: 1rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: #5B92E5 !important;
    background-color: white !important;
    border: 2px solid #5B92E5 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.wp-block-button .wp-block-button__link:hover,
.cta-button:hover {
    color: #4A7AC0 !important;
    border-color: #4A7AC0 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15) !important;
}

/* ===== HEADER STYLES ===== */
header.sinatra-header {
    background: rgba(230, 225, 219, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    padding: 0 20px !important;
}

/* ===== HEADER CONTAINER: BOXED, FLEX, CENTERED ===== */
.si-container.si-header-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: space-between !important;
}

/* ===== LOGO LEFT, MENU RIGHT ===== */
.sinatra-logo {
    padding-left: 20px !important;
}

.sinatra-primary-nav > ul {
    gap: 20px !important;
    padding-right: 20px !important;
}

.sinatra-primary-nav a {
    color: #000 !important;
    font-weight: 700 !important;
    transition: border-color 0.3s ease !important;
}

.sinatra-primary-nav a:hover {
    color: #4A7AC0 !important;
    border-bottom: 2px solid #4A7AC0 !important;
}

/* ===== BLOG POST FIXES ===== */
.blog-posts-grid,
.blog-posts-grid ul,
.blog-posts-grid ol,
.blog-posts-template,
.wp-block-post-template,
.wp-block-post-template li,
.blog-post-card {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
}

.wp-block-query .wp-block-post-template {
    padding: 0 !important;
    margin: 0 !important;
}

.wp-block-post-template.is-layout-flow {
    display: grid !important;
    gap: 2rem !important;
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 968px) {
    .wp-block-post-template.is-layout-flow {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .wp-block-post-template.is-layout-flow {
        grid-template-columns: 1fr;
    }
}

/* Remove default WordPress block styling */
.wp-block-post-template {
    padding-left: 0 !important;
}

.blog-post-card {
    padding-left: 0 !important;
}

/* ===== CATEGORY BAR OVERLAP FIX ===== */
/* Adjust selector if your category bar uses a different class */
.cat-links, .entry-categories, .category-bar {
    display: block !important;
    margin-top: 100px !important; /* Match your sticky header height */
    z-index: 1;
}

/* Add space below sticky header */
main#main {
    padding-top: 100px !important;
}

.blog-posts-section,
.site-content {
    padding-top: 100px !important;
}

/* For single post pages */
.single-post-content {
    margin-top: 80px !important;
}

/* Mobile adjustment */
@media (max-width: 768px) {
    main#main {
        padding-top: 80px !important;
    }
    .cat-links, .entry-categories, .category-bar {
        margin-top: 80px !important;
    }
}

/* ===== LEGAL PAGE STYLING ===== */
.legal-page-content .entry-content {
  max-width: 1200px; 
  margin: 0 auto;
  padding: 80px 5% 20px;
}

.legal-page-content ul {
  margin-left: 25px !important; 
  list-style-type: disc !important;
}

.legal-page-content li {
  margin-bottom: 15px !important;
}

.legal-page-content h1,
.legal-page-content h2 {
  color: #2c3e50; 
  margin-top: 30px;
  margin-bottom: 15px;
}

/* ===== CHAT WIDGET STYLES ===== */
/* Floating Chat Icon */
.emo-chat-icon {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background-color: #4B92DB;
    color: white;
    width: 5.4rem;
    height: 5.4rem;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}
.emo-chat-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.08);
}
.emo-chat-icon svg {
    height: 2.7rem;
    width: 2.7rem;
}

/* Modal Container */
.emo-chat-modal {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 10001;
}
.chat-modal-hidden { display: none !important; }

/* Main App Container within Modal */
.emo-app-container {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    height: 90vh;
    max-height: 800px;
    overflow: hidden;
    border: 1px solid #eef2f7;
}

/* Header */
.emo-chat-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.emo-header-spacer { width: 2rem; }
.emo-header-title { font-size: 1.25rem; font-weight: 700; color: #1f2937; }
.emo-header-subtitle { font-size: 0.875rem; color: #6b7280; }
.emo-close-button { color: #9ca3af; font-size: 2rem; line-height: 1; background: none; border: none; cursor: pointer; width: 2rem; transition: color 0.2s ease-in-out; }
.emo-close-button:hover { color: #ef4444; }

/* Chat Box (Scrollable area) */
.emo-chat-box {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.emo-chat-box::-webkit-scrollbar { width: 8px; }
.emo-chat-box::-webkit-scrollbar-track { background: #f8f9fd; }
.emo-chat-box::-webkit-scrollbar-thumb { background-color: #dbe4ef; border-radius: 10px; border: 2px solid #f8f9fd; }

/* Options Area */
.emo-options-area {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background-color: #f9fafb;
    flex-shrink: 0;
}
.emo-options-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}
/* Router Option Buttons */
.emo-options-container-button {
    background-color: white; color: #4B92DB; border: 2px solid #4B92DB;
    padding: 0.75rem 1.25rem; font-size: 1rem; font-weight: 700; border-radius: 4px;
    text-decoration: none; transition: all 0.3s ease; cursor: pointer;
}
.emo-options-container-button:hover { background-color: #4B92DB; color: white; }

/* Tapping Option Buttons */
.emo-option-button {
    background-color: white; color: #374151; font-weight: 600;
    padding: 0.5rem 1rem; border-radius: 0.5rem; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #d1d5db; cursor: pointer; transition: all 0.2s ease-in-out;
}
.emo-option-button:hover { transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); border-color: #3b82f6; }
.emo-option-button.locked { background-color: #f8f9fa; color: #adb5bd; border-color: #dee2e6; cursor: not-allowed; }
.emo-option-button.locked:hover { transform: none; box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); border-color: #dee2e6; }

/* Footer Disclaimer */
.emo-footer-disclaimer {
    font-size: 0.75rem; text-align: center; color: #9ca3af;
    margin-top: 1rem; padding: 0 1rem; display: none;
}

/* Chat Bubbles */
.chat-bubble { padding: 0.75rem 1.25rem; border-radius: 1.25rem; max-width: 85%; line-height: 1.6; animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.router-bubble-bot { background-color: #f0f4f8; color: #1A1B1E; border-radius: 20px 20px 20px 5px; align-self: flex-start; }
.router-bubble-user { background-color: #4B92DB; color: white; border-radius: 20px 20px 5px 20px; align-self: flex-end; }
.tapping-bubble-bot { background-color: #f3f4f6; color: #1f2937; border-radius: 20px 20px 20px 5px; align-self: flex-start; }
.tapping-bubble-user { background-color: #3b82f6; color: white; border-radius: 20px 20px 5px 20px; align-self: flex-end; }

/* Typing Indicator */
@keyframes popIn { 0% { transform: scale(0.8); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes dotFlashing { 0% { background-color: #aab8c9; } 50%, 100% { background-color: #e5eaf0; } }
.dot-flashing { position: relative; width: 10px; height: 10px; border-radius: 5px; background-color: #aab8c9; animation: dotFlashing 1s infinite linear alternate .5s; }
.dot-flashing::before, .dot-flashing::after { content: ''; display: inline-block; position: absolute; top: 0; }
.dot-flashing::before { left: -15px; width: 10px; height: 10px; border-radius: 5px; background-color: #aab8c9; animation: dotFlashing 1s infinite alternate 0s; }
.dot-flashing::after { left: 15px; width: 10px; height: 10px; border-radius: 5px; background-color: #aab8c9; animation: dotFlashing 1s infinite alternate 1s; }
.chat-link { color: #3b82f6; text-decoration: underline; }
.chat-link:hover { text-decoration: none; }

/* Fix mobile header overlap and hero section spacing */
@media (max-width: 768px) {
  /* Push hero section down to clear sticky header */
  #hero-a, #hero-b {
    padding-top: 100px !important; /* Adjust to match your header height */
  }

  /* Reduce space above hero image */
  #hero-a .md\:w-1\/2 img,
  #hero-b .md\:w-1\/2 img {
    margin-top: 10px !important; /* Reduce if too much space */
  }

  /* Add space below hero image before next section */
  #hero-a .md\:w-1\/2 img,
  #hero-b .md\:w-1\/2 img {
    margin-bottom: 24px !important; /* Add bottom margin for spacing */
  }
}

/* Optional: Tweak hero text spacing for mobile */
@media (max-width: 768px) {
  #hero-a h1, #hero-b h1 {
    margin-top: 0 !important;
    padding-top: 80 !important;
  }
  #hero-a .text-center, #hero-b .text-center {
    margin-bottom: 12px !important;
  }
}

/* ===== LIMIT CHAT MODAL BUTTONS TO BOTTOM 1/4 ON TABLET/MOBILE ===== */
@media (max-width: 1024px) {
  #options-container, .emo-options-container {
    max-height: 25vh !important;
    overflow-y: auto !important;
    margin-bottom: 0 !important;
  }
}
.footer {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: #4B92DB;
    color: #fff;
    box-sizing: border-box;
    padding: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.footer-section {
    flex: 1 1 220px;
    min-width: 220px;
    margin: 1rem 0;
}

.footer-logo-description img {
    max-width: 120px;
    margin-bottom: 1rem;
}

.footer-section h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    color: #fff;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
    opacity: 0.98;
    transition: color 0.2s;
}
.footer-section a:hover {
    color: #e3e8ef;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .footer-content {
        flex-direction: column;
        align-items: center;
        padding: 2rem 0.5rem;
    }
    .footer-section {
        min-width: 0;
        max-width: 100%;
        text-align: center;
    }
}
