/* ==========================================================================
   1. ROOT & THEME VARIABLES
   ========================================================================== */
:root {
  --bg-primary: #1c1c1c;
  --bg-secondary: #2a2a2a;
  --bg-tertiary: #222;
  --text-primary: #e0e0e0;
  --text-secondary: #ccc;
  --text-heading: #fff;
  --border-primary: #444;
  --border-secondary: #383838;
  --accent-primary: #ee000b;
  --accent-primary-hover: #ff3333;
  --accent-primary-transparent: rgba(238, 0, 11, 0.3);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --shadow-strong-color: rgba(0, 0, 0, 0.4);
  --card-border-light-trans: rgba(255, 255, 255, 0.1);
  --card-bg-trans: rgba(42, 42, 42, 0.7);
  --element-bg-hover: #3a3a3a;
  --transition-speed: 0.3s;
}

body.light-mode {
  --bg-primary: #f4f4f4;
  --bg-secondary: #ffffff;
  --bg-tertiary: #e0e0e0;
  --text-primary: #333333;
  --text-secondary: #555555;
  --text-heading: #111111;
  --border-primary: #cccccc;
  --border-secondary: #dddddd;
  --accent-primary-transparent: rgba(228, 77, 38, 0.15);
  --shadow-color: rgba(0, 0, 0, 0.1);
  --shadow-strong-color: rgba(0, 0, 0, 0.15);
  --card-border-light-trans: rgba(0, 0, 0, 0.1);
  --card-bg-trans: rgba(255, 255, 255, 0.8);
  --element-bg-hover: #e8e8e8;
}

/* ==========================================================================
   2. BASE & LAYOUT STYLES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  padding-bottom: 40px; /* Space for mobile social bar */
  transition: background-color var(--transition-speed) ease,
    color var(--transition-speed) ease;
}

.page-container {
  max-width: 680px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 12px 0;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;

  /* Glassmorphism Effect */
  background-color: rgba(28, 28, 28, 0.75); /* Dark, semi-transparent */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* For Safari */
  border-bottom: 1px solid var(--card-border-light-trans);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-heading);
  transition: color 0.3s ease;
}

.logo-link:hover {
  color: var(--accent-primary);
}

.logo-icon {
  width: 40px;
  height: 40px;
  margin-right: 12px;
  border-radius: 8px;
}

.logo-text {
  font-size: 1.2em;
  font-weight: 600;
  color: #fff;
}

.header-nav {
  display: flex;
  align-items: center;
}

#theme-switcher {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-secondary);
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color var(--transition-speed),
    transform var(--transition-speed);
}

#theme-switcher:hover {
  background: var(--element-bg-hover);
  transform: scale(1.05);
}

/* Responsive: Show logo text on larger screens */
@media (min-width: 576px) {
  .logo-text {
    display: inline-block;
  }
}

/* Hide one icon based on theme */
body.light-mode #theme-switcher .fa-sun {
  display: none;
}
body:not(.light-mode) #theme-switcher .fa-moon {
  display: none;
}

/* ==========================================================================
   3. COMPONENTS & SECTIONS
   ========================================================================== */

/* 3.1 Social Icons (Desktop & Mobile) */
.social-icons-desktop {
  position: fixed;
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 999;
}
.social-icons-desktop a {
  color: var(--text-secondary);
  font-size: 1.5em;
  padding: 8px;
  background-color: var(--card-bg-trans);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: color var(--transition-speed), transform var(--transition-speed),
    background-color var(--transition-speed);
  box-shadow: 0 2px 5px var(--shadow-color);
}
.social-icons-desktop a:hover {
  color: var(--accent-primary);
  transform: scale(1.1);
  background-color: var(--element-bg-hover);
}

.social-icons-mobile {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--bg-secondary);
  padding: 12px 0;
  box-shadow: 0 -3px 10px var(--shadow-color);
  z-index: 999;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.social-icons-mobile a {
  color: var(--text-secondary);
  font-size: 1.6em;
  text-decoration: none;
  transition: color var(--transition-speed), transform var(--transition-speed);
}
.social-icons-mobile a:hover,
.social-icons-mobile a:active {
  color: var(--accent-primary);
  transform: translateY(-2px);
}

/* 3.3 Accordion Section */
.accordion-title {
  background-color: var(--card-bg-trans);
  padding: 15px 20px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.1em;
  color: var(--text-heading);
  font-weight: 500;
  border: 1px solid var(--card-border-light-trans);
  box-shadow: 0 2px 8px var(--shadow-color);
  transition: background-color var(--transition-speed);
}
.accordion-title:hover {
  background-color: var(--element-bg-hover);
}
.accordion-title .fas {
  transition: transform var(--transition-speed) ease;
}
.accordion-title.active .fas {
  transform: rotate(180deg);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-out;
  background-color: var(--bg-primary);
  border-radius: 0 0 8px 8px;
  margin-top: -1px; /* Overlap border */
  border: 1px solid var(--card-border-light-trans);
  border-top: none;
}
.accordion-content.active {
}
/* Accordion Content - Favourite Products specific styles */
.favorite-products {
  padding: 20px;
}
.favorite-products .product-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-secondary);
  text-decoration: none;
}
.favorite-products .product-item:last-child {
  border-bottom: none;
}
.favorite-products .product-icon {
  font-size: 30px; /* Adjust size as needed */
  color: #e44d26;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5; /* Optional background */
  border-radius: 8px; /* Optional rounded corners */
}

.product-details h4 {
  font-size: 1em;
  color: var(--text-heading);
  margin-bottom: 3px;
}
.product-details p {
  font-size: 0.85em;
  color: var(--text-secondary);
}

/* 3.4 Carousel Section ("Peek-a-boo" 75%/25% Style) */
.carousel-container {
  position: relative;
  overflow: hidden; /* VITAL for peek effect */
  border-radius: 8px;
  padding: 0; /* No horizontal padding on the container itself */
  box-shadow: 0 5px 15px var(--shadow-strong-color); /* From original, if still desired */
}
.carousel-slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
  gap: 15px;
}
.carousel-slide {
  /* width is set by JavaScript (e.g., to 75% of container) */
  flex-shrink: 0; /* Prevent slides from shrinking */
  box-sizing: border-box;
  /* margin-right: 10px; /* Optional: if you want a small visible gap, set in JS too */
}
/* Card styles within the carousel slide */
.carousel-slide a.landing-page-showcase-card {
  display: block;
  width: 100%; /* Fill the .carousel-slide */
  height: 100%;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--bg-secondary);
  box-shadow: 0 4px 12px var(--shadow-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 300px; /* Adjust as needed */
  display: flex;
  flex-direction: column;
}
.carousel-slide a.landing-page-showcase-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px var(--shadow-strong-color);
}
.landing-page-image {
  width: 100%;
  aspect-ratio: 1024 / 500;
  object-fit: cover; /* or 'contain', cover is safer if aspect ratios are exact */
  border-radius: 8px 8px 0 0; /* If you want top corners rounded */
}
.landing-page-info {
  padding: 15px;
  text-align: left;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.landing-page-title {
  font-size: 1.2em;
  color: var(--text-heading);
  margin-bottom: 8px;
}
.landing-page-description {
  font-size: 0.9em;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* number of lines to show */
  -webkit-box-orient: vertical;
}
/* Carousel Controls (Prev/Next Buttons and Dots) */
.carousel-controls {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
  pointer-events: none;
  padding: 0 10px; /* Padding for button positioning */
  box-sizing: border-box;
  z-index: 10;
}
.carousel-button {
  background-color: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2em;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--transition-speed);
  pointer-events: all;
}
.carousel-button:hover {
  background-color: rgba(0, 0, 0, 0.7);
}
.carousel-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  gap: 8px;
  z-index: 10;
}
.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color var(--transition-speed);
}
.carousel-dot.active {
  background-color: var(--accent-primary);
}
/* Legacy Carousel Card Styles (if still used elsewhere or as base) */
.featured-card {
  /* This was a base class, might be used by landing-page-showcase-card or others */
  background-color: var(--bg-secondary);
  border-radius: 8px;
  color: var(--text-primary);
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: 20px;
}
/* .ai-app-card and .dope-wallpapers-card specific styling can be added if needed */

/* 3.5 Links Section */
.links-section {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--card-bg-trans);
  padding: 18px 20px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-primary);
  border: 1px solid var(--card-border-light-trans);
  box-shadow: 0 3px 10px var(--shadow-color);
  transition: transform var(--transition-speed),
    background-color var(--transition-speed), box-shadow var(--transition-speed);
}
.link-item:hover {
  transform: translateY(-3px) scale(1.01);
  background-color: var(--element-bg-hover);
  box-shadow: 0 5px 15px var(--shadow-strong-color);
}
.link-item-text h4 {
  font-size: 1.05em;
  color: var(--text-heading);
  margin-bottom: 3px;
  font-weight: 500;
}
.link-item-text p {
  font-size: 0.85em;
  color: var(--text-secondary);
}
.link-item .fas.fa-chevron-right {
  color: var(--text-secondary);
  font-size: 1em;
  transition: color var(--transition-speed);
}
.link-item:hover .fas.fa-chevron-right {
  color: var(--accent-primary);
}

/* --- Add this CSS to your stylesheet for the "Show More" accordion --- */

/* Make the accordion trigger look clickable */
.link-item[role="button"] {
  cursor: pointer;
}

/* Style for the downward-facing arrow icon */
.link-item .fa-chevron-down {
  /* Use the variable for transition speed */
  transition: transform var(--transition-speed) ease-in-out;
}

/* When the trigger has the 'active' class, rotate the arrow */
.link-item.active .fa-chevron-down {
  transform: rotate(180deg);
}

/* This is the container for your hidden subdomain links */
.subdomain-list {
  max-height: 0; /* Hidden by default */
  overflow: hidden;
  /* Use the variable for transition speed */
  transition: max-height var(--transition-speed) ease-out;

  /* Use a background color from your theme to differentiate the list */
  background-color: var(--bg-tertiary);

  /* Optional styling */
  padding-left: 20px;
  border-radius: 0 0 12px 12px;
  margin-top: -10px;
  padding-top: 10px;
}

/* Style for individual subdomain items to ensure they look right */
.subdomain-list .link-item {
  /* Use a border color from your theme for separators */
  border-top: 1px solid var(--border-secondary);
  margin: 0;
  border-radius: 0;
}

/* The background of a link item inside the list might need to be set explicitly */
.subdomain-list .link-item {
  background-color: transparent;
}

.subdomain-list .link-item:first-child {
  border-top: none;
}

/* 3.6 Theme Switcher (from header) */
#theme-switcher {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border-secondary);
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 1em;
  transition: background-color var(--transition-speed),
    color var(--transition-speed);
  line-height: 1; /* Helps icon alignment */
}
#theme-switcher:hover {
  background: var(--element-bg-hover);
}
#theme-switcher .fa-sun {
  display: inline-block;
}
#theme-switcher .fa-moon {
  display: none;
}
body.light-mode #theme-switcher .fa-sun {
  display: none;
}
body.light-mode #theme-switcher .fa-moon {
  display: inline-block;
}

/* ==========================================================================
   4. RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 992px) {
  .social-icons-desktop {
    display: none;
  }
  /* .social-icons-mobile will be shown via its default 'flex' or by removing 'display: none' if it was set earlier */
}

@media (min-width: 993px) {
  .social-icons-mobile {
    display: none; /* Ensure it's hidden on desktop */
  }
}

@media (max-width: 768px) {
  .page-container {
    margin: 20px auto;
    padding-bottom: 50px; /* Extra space for mobile social bar */
  }

  .newsletter-form {
    flex-direction: column;
  }
  .newsletter-form button {
    width: 100%;
  }
}

/* Strategic Hooks Section */
.strategic-hooks-section {
  background-color: var(--bg-secondary);
  border-radius: 12px;
  padding: 25px;
  border: 1px solid var(--card-border-light-trans);
  box-shadow: 0 6px 20px var(--shadow-color);
}

.hooks-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-primary);
  overflow-x: auto; /* Allow horizontal scrolling if needed */
}

.hook-tab {
  white-space: nowrap;
  flex-shrink: 1; /* Allow tabs to shrink */
  min-width: 0; /* Allow shrinking below content width */
  overflow: hidden; /* Hide overflow text */
  text-overflow: ellipsis; /* Add ... for truncated text */
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 10px 10px;
  font-size: 1em;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.hook-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.hook-tab i {
  margin-right: 8px;
}

.hook-content-panel {
  display: none;
  animation: fadeIn 0.5s;
}

.hook-content-panel.active {
  display: block;
}

.hook-content-panel h4 {
  font-size: 1.4em;
  color: var(--text-heading);
  margin-bottom: 10px;
}

.hook-content-panel p {
  font-size: 1.1em;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.hook-cta {
  display: inline-block;
  background-color: var(--accent-primary);
  color: white;
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.hook-cta:hover {
  background-color: var(--accent-primary-hover);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Optional: Make text smaller on very small screens */
@media (max-width: 480px) {
  .hook-tab {
    font-size: 0.9em;
    padding: 8px 10px;
    gap: 4px; /* Reduce gap between icon and text if using flexbox */
  }

  .hooks-tabs {
    gap: 5px; /* Reduce gap between tabs */
  }
}

/* Eye-Catcher Section */
.eye-catcher-section {
  background: linear-gradient(135deg, var(--bg-secondary), var(--bg-primary));
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--card-border-light-trans);
  box-shadow: 0 6px 20px var(--shadow-color);
  transition: transform var(--transition-speed) ease,
    box-shadow var(--transition-speed) ease;
}

.eye-catcher-section:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px var(--shadow-strong-color);
}

.eye-catcher-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap; /* Allow wrapping on small screens */
  justify-content: center; /* Center items on small screens when they wrap */
  text-align: center; /* Center text for mobile */
}

.eye-catcher-icon {
  font-size: 2em;
  color: var(--accent-primary);
  flex-shrink: 0; /* Prevent icon from shrinking */
}

.eye-catcher-text {
  font-size: 1.05em;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
  flex-grow: 1; /* Allow text to take available space */
}

.eye-catcher-cta {
  background-color: var(--accent-primary);
  color: white;
  padding: 12px 25px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1em;
  transition: background-color var(--transition-speed),
    transform var(--transition-speed);
  display: inline-flex;
  align-items: center;
  border: none;
  flex-shrink: 0; /* Prevent button from shrinking */
}

.eye-catcher-cta:hover {
  background-color: var(--accent-primary-hover);
  transform: scale(1.05);
}

.eye-catcher-cta .fas {
  margin-left: 10px;
  font-size: 1em;
}

/* Responsive adjustments for eye-catcher */
@media (min-width: 600px) {
  .eye-catcher-content {
    flex-wrap: nowrap; /* Prevent wrapping on larger screens */
    text-align: left; /* Align text to the left */
    justify-content: space-between; /* Distribute items */
  }
}

.section-title {
  text-align: center;
  font-size: 1.3em;
  color: var(--text-heading);
  margin-bottom: 15px;
  font-weight: 500;
}

/* Footer */
footer {
  background-color: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: 40px 0;
  text-align: center;
  font-size: 0.9em;
  border-top: 1px solid var(--border-primary);
}

footer a {
  color: var(--accent-primary);
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}

.hero-background-shapes {
  position: absolute; /* Use absolute positioning by default for smoother mobile scrolling */
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh; /* Use viewport height to cover the screen */
  overflow: hidden;
  z-index: -1;
}

/* On larger screens, switch to fixed for the parallax effect */
@media (min-width: 769px) {
  .hero-background-shapes {
    position: fixed;
  }
}

.hero-shape {
  position: absolute;
  opacity: 0.1;
  animation: float 15s infinite ease-in-out;
}

.hero-shape-1 {
  width: 400px;
  height: 400px;
  top: -50px;
  left: -100px;
  animation-duration: 20s;
}

.hero-shape-2 {
  width: 300px;
  height: 300px;
  bottom: -80px;
  right: -80px;
  animation-duration: 25s;
  animation-delay: 3s;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-30px) rotate(180deg);
  }
  100% {
    transform: translateY(0px) rotate(360deg);
  }
}

/* ==========================================================================
   5. DASHBOARD SPECIFIC STYLES (Revised)
   ========================================================================== */

/* This class is added to the <header> on dashboard.php */
header.dashboard-header-style .container {
  /* Override the default container behavior to make it full-width */
  width: 100%;
  max-width: 100%;
  /* Add padding to the container to keep content from touching the edges */
  padding: 0 25px;

  /* Ensure it remains a flex container with items spaced out */
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Banner Styles */
.update-banner {
  background-color: #e44d26;
  color: var(--button-text-color);
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  font-size: 1.05em;
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  flex-grow: 1;
}

.version-badge {
  background-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.banner-content .highlight-text {
  font-weight: 500;
  color: #fff;
}

.banner-cta {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 8px;
  transition: background-color var(--transition-speed) ease;
}

.banner-cta:hover {
  background-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.banner-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 20px;
}

.close-banner-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 2em;
  cursor: pointer;
  padding: 0 5px;
  line-height: 1;
  transition: color var(--transition-speed) ease;
}

.close-banner-btn:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .update-banner {
    display: none;
  }
}
