/**
 * Main Custom Styles
 * Additional styles for the Luxury Mattress theme
 *
 * @package Luxury_Mattress
 * @since 1.0.0
 */

/* ==========================================================================
   Header Styles
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition-base);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.site-branding {
  flex: 0 0 auto;
}

.site-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.site-title a {
  color: hsl(var(--foreground));
  text-decoration: none;
}

.site-description {
  margin: 0;
  font-size: 0.875rem;
  color: hsl(var(--secondary));
}

.custom-logo-link {
  display: block;
  max-width: 200px;
}

.custom-logo {
  height: auto;
  max-height: 60px;
  width: auto;
}

/* Navigation */
.main-navigation {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  color: hsl(var(--foreground));
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition-base);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: hsl(var(--primary));
  transition: var(--transition-base);
}

.nav-menu a:hover::after,
.nav-menu .current-menu-item a::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.menu-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-line {
  display: block;
  width: 25px;
  height: 2px;
  background: hsl(var(--foreground));
  transition: var(--transition-base);
}

/* Screen Reader Text */
.screen-reader-text {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--secondary) / 0.1)),
              url('../images/hero-bg.jpg') center/cover no-repeat;
  color: hsl(var(--foreground));
  margin-top: 80px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--spacing-lg) 0;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  margin-bottom: var(--spacing-md);
  animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  margin-bottom: var(--spacing-lg);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-sm);
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   About Section
   ========================================================================== */

.about-section {
  background: hsl(var(--white));
}

.about-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about-features {
  margin-top: var(--spacing-md);
}

.feature-item {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}

.feature-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--primary));
  color: hsl(var(--foreground));
  border-radius: 50%;
  font-weight: bold;
  font-size: 1.25rem;
}

.feature-text h4 {
  margin-bottom: 0.25rem;
  color: hsl(var(--foreground));
}

.feature-text p {
  margin: 0;
  color: hsl(var(--secondary));
  font-size: 0.875rem;
}

/* ==========================================================================
   Services Section
   ========================================================================== */

.services-section {
  background: hsl(var(--muted) / 0.3);
}

.service-card {
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
}

.service-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--spacing-sm);
  color: hsl(var(--primary));
}

.service-card h3 {
  margin-bottom: var(--spacing-sm);
}

.service-card p {
  color: hsl(var(--secondary));
  margin: 0;
}

/* ==========================================================================
   Portfolio Section
   ========================================================================== */

.portfolio-section {
  background: hsl(var(--white));
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  padding: 0;
}

.portfolio-image {
  position: relative;
  overflow: hidden;
}

.portfolio-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: var(--transition-base);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: hsl(var(--primary) / 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-base);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.1);
}

.portfolio-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: hsl(var(--white));
  color: hsl(var(--foreground));
  border-radius: 50%;
  transition: var(--transition-base);
}

.portfolio-link:hover {
  transform: scale(1.1);
}

/* ==========================================================================
   Trust Section
   ========================================================================== */

.trust-section {
  background: hsl(var(--muted) / 0.3);
}

.brand-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  background: hsl(var(--white));
  border-radius: var(--radius);
  transition: var(--transition-base);
}

.brand-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.brand-item img {
  max-width: 150px;
  height: auto;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: var(--transition-base);
}

.brand-item:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* ==========================================================================
   Contact Section
   ========================================================================== */

.contact-section {
  background: hsl(var(--white));
}

.contact-info h3,
.contact-form-wrapper h3 {
  margin-bottom: var(--spacing-md);
}

.contact-item {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-md);
}

.contact-icon {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  border-radius: 50%;
}

.contact-text h4 {
  margin-bottom: 0.25rem;
  color: hsl(var(--foreground));
}

.contact-text p,
.contact-text a {
  margin: 0;
  color: hsl(var(--secondary));
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: hsl(var(--foreground));
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid hsl(var(--muted));
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: hsl(var(--foreground));
  color: hsl(var(--white));
  padding-top: var(--spacing-xl);
}

.footer-widgets {
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-widget-area {
  color: rgba(255, 255, 255, 0.8);
}

.footer-widget-area .widget-title {
  color: hsl(var(--white));
  margin-bottom: var(--spacing-sm);
}

.footer-widget-area a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-widget-area a:hover {
  color: hsl(var(--primary));
}

.footer-bottom {
  padding: var(--spacing-md) 0;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.site-info {
  flex: 1;
}

.site-info p {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.site-info a {
  color: rgba(255, 255, 255, 0.8);
}

.social-links {
  display: flex;
  gap: var(--spacing-sm);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  color: hsl(var(--white));
  border-radius: 50%;
  transition: var(--transition-base);
}

.social-link:hover {
  background: hsl(var(--primary));
  transform: translateY(-3px);
}

.footer-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--spacing-md);
  flex-wrap: wrap;
}

.footer-menu a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

/* ==========================================================================
   Floating WhatsApp Button
   ========================================================================== */

.whatsapp-float {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  background: #25D366;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-xl);
  z-index: 999;
  transition: var(--transition-base);
  animation: pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.5);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
}

/* ==========================================================================
   Back to Top Button
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: hsl(var(--primary));
  color: hsl(var(--foreground));
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-base);
  z-index: 998;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  background: hsl(var(--secondary));
  color: hsl(var(--white));
}

/* ==========================================================================
   Posts & Blog Layout
   ========================================================================== */

.content-wrapper {
  padding: calc(var(--spacing-xl) + 80px) 0 var(--spacing-xl);
}

.post-card {
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition-base);
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-content {
  padding: var(--spacing-md);
}

.entry-title {
  margin-bottom: var(--spacing-sm);
}

.entry-title a {
  color: hsl(var(--foreground));
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
  font-size: 0.875rem;
  color: hsl(var(--secondary));
  margin-bottom: var(--spacing-sm);
}

.entry-meta a {
  color: hsl(var(--secondary));
}

.entry-summary {
  color: hsl(var(--secondary));
  margin-bottom: var(--spacing-sm);
}

/* Pagination */
.pagination-wrapper {
  margin-top: var(--spacing-lg);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: var(--spacing-xs);
  list-style: none;
  padding: 0;
}

.page-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--spacing-xs);
  background: hsl(var(--white));
  color: hsl(var(--foreground));
  border-radius: var(--radius);
  transition: var(--transition-base);
}

.page-numbers:hover,
.page-numbers.current {
  background: hsl(var(--primary));
  color: hsl(var(--foreground));
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
  /* Header Mobile */
  .mobile-menu-toggle {
    display: block;
  }
  
  .main-navigation {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: hsl(var(--white));
    box-shadow: var(--shadow-xl);
    transition: var(--transition-base);
    padding: 80px var(--spacing-md) var(--spacing-md);
    overflow-y: auto;
  }
  
  .main-navigation.active {
    right: 0;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 0;
  }
  
  .nav-menu li {
    border-bottom: 1px solid hsl(var(--muted));
  }
  
  .nav-menu a {
    display: block;
    padding: var(--spacing-sm) 0;
  }
  
  /* Hero Mobile */
  .hero-section {
    margin-top: 70px;
    min-height: 80vh;
  }
  
  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  /* Sections Mobile */
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
  }
  
  .about-image {
    order: -1;
  }
  
  /* Footer Mobile */
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .footer-menu {
    justify-content: center;
  }
  
  /* Floating Buttons */
  .whatsapp-float {
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    left: 15px;
    bottom: 15px;
  }
  
  .back-to-top {
    right: 15px;
    bottom: 80px;
  }
}
