/* ==========================================================================
   1. CORE SITE BEHAVIOR & TYPOGRAPHY
   ========================================================================== */

html {
    scroll-behavior: smooth !important;
    scroll-padding-top: 90px; 
}

body {
    font-family: "Georgia", "Times New Roman", "Palatino", serif !important;
    line-height: 1.7;
    background-color: #000000;
    background-image: url("https://www.whydoesithappen.com/images/backgrounds/night2.jpg");
    background-repeat: repeat;
    background-attachment: fixed;
    background-size: cover;
    color: #ffffff;
    overflow-x: clip; 
}

p, div, h1, h2, h3, h4, h5, h6, a, li, .nav-link {
    font-family: "Georgia", "Times New Roman", "Palatino", serif !important;
}

p, div, li {
    color: #e0e0e0 !important; 
}

a { color: #aad4ff; transition: color 0.3s ease; }
a:hover { color: #ffffff; }

.article-info { display: none !important; }

body.view-category .article-info,
body.view-article .article-info {
    display: block !important;
}

body.itemid-133 .article-info {
    display: none !important;
}

body.view-category .article-info,
body.view-category .article-info dd,
body.view-category .article-info dt,
body.view-category .article-info a,
body.view-category .createddate,
body.view-article .article-info,
body.view-article .article-info dd,
body.view-article .article-info dt,
body.view-article .article-info a,
body.view-article .createddate {
    color: #ffffff !important;
}

body.view-category .article-info-term,
body.view-article .article-info-term {
    display: none !important;
}

.com-content-category-blog {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 20px;
}

/* ==========================================================================
   2. BRAND VARIABLES & HEADINGS
   ========================================================================== */

:root {
    --cassiopeia-color-primary: #2c3e50;
    --cassiopeia-color-primary-hover: #1e2b37;
    --cassiopeia-color-link: #34495e;
}

h1, h2, h3, h4, h5, h6, .item-title, .page-header h2 {
    color: #ffffff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* ==========================================================================
   3. NAVIGATION & HEADER (STICKY)
   ========================================================================== */

header.header, .container-header {
    position: -webkit-sticky; 
    position: sticky !important;
    top: 0;
    z-index: 1020;
    background-color: rgba(44, 62, 80, 0.9) !important; 
    background-image: none !important;
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.nav-link { font-weight: 600; }

/* ==========================================================================
   4. BUTTONS & FOOTER
   ========================================================================== */

.rss-button {
    display: inline-flex;
    align-items: center;
    background-color: #f26522;
    color: #ffffff !important;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-weight: bold;
    transition: background 0.3s ease;
}
.rss-button:hover { background-color: #d4551a; }

#back-top { opacity: 0.7; transition: opacity 0.3s ease; }
#back-top:hover { opacity: 1; }

footer, .footer {
    background-color: #2c3e50 !important;
    background-image: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-inner { background: transparent !important; }

/* ==========================================================================
   5. MOBILE OPTIMIZATIONS
   ========================================================================== */

@media (max-width: 991.98px) {
    header.header, .container-header {
        position: relative !important; 
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }
    .navbar-brand { font-size: 1.2rem !important; }
}

.rss-icon {
    margin-right: 10px;
    width: 14px;
    height: 14px;
    border-top: 3px solid #fff;
    border-right: 3px solid #fff;
    border-top-right-radius: 100%;
    position: relative;
}
.rss-icon::before {
    content: ""; position: absolute; width: 7px; height: 7px;
    border-top: 3px solid #fff; border-right: 3px solid #fff;
    border-top-right-radius: 100%; bottom: 0; left: 0;
}
.rss-icon::after {
    content: ""; position: absolute; width: 4px; height: 4px;
    background: #fff; border-radius: 50%; bottom: -2px; left: -2px;
}

/* ==========================================================================
   6. SOCIALS, RESOURCES & NEWSLETTER
   ========================================================================== */

.social-module {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 10px;
}

.socials-title {
  color: #ffffff;
  font-size: 1rem;
  letter-spacing: 1px;
  text-transform: none;
  margin-bottom: 8px;
}

.social-grid a img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.2s;
}

.social-grid a img:hover { transform: scale(1.1); }

.resources-list { display: flex; flex-direction: column; gap: 8px; }
.resources-list a { color: #ffffff; text-decoration: none; font-size: 0.85rem; padding: 6px 10px; background: rgba(255,255,255,0.08); border-radius: 6px; transition: background 0.2s; }
.resources-list a:hover { background: rgba(255,255,255,0.18); }

.sib-form {
  background-color: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
  padding: 15px !important;
  text-align: left !important;
}

.sib-container--medium {
  background-color: transparent !important;
  border: none !important;
  max-width: 100% !important;
  padding: 8px !important;
}

#sib-container { max-width: 100% !important; text-align: left !important; }
#error-message, #success-message, .input--hidden { display: none !important; }
.sib-form-block, .sib-text-form-block { text-align: left !important; }
.sib-form-block p, .sib-text-form-block p { color: #ffffff !important; }
.entry__label { color: #ffffff !important; }
.entry__specification { color: #aaaaaa !important; }
.grecaptcha-badge { visibility: hidden !important; }

/* ==========================================================================
   7. LATEST ARTICLES MODULE
   ========================================================================== */

div.sidebar-left.card {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  border-radius: 10px !important;
}

div.sidebar-left.card .card-header {
  background: transparent !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
}

div.sidebar-left.card .card-header h3 {
  font-size: 1rem !important;
  color: #ffffff !important;
  text-shadow: none !important;
  margin: 0 !important;
}

div.sidebar-left.card .card-body {
  background: transparent !important;
  padding: 10px !important;
}

div.sidebar-left.card .card-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

div.sidebar-left.card .card-body ul li {
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

div.sidebar-left.card .card-body ul li:last-child {
  border-bottom: none;
}

div.sidebar-left.card .card-body ul li a {
  color: #ffffff !important;
  font-size: 0.75rem !important;
  text-decoration: none;
}

.sib-form, .sib-form * {
  font-family: "Georgia", "Times New Roman", "Palatino", serif !important;
}