/**
 * Theme Name: Premium Estate Lite
 * Theme URI: https://premiumestate.com
 * Description: Universal, fast, and flexible WordPress theme for any website. Perfect for business, blog, portfolio, agency, and more. Full Customizer control with colors, typography, layout options. Upgrade to Premium Estate Pro for advanced features and Real Estate module.
 * Author: Premium Estate Team
 * Author URI: https://premiumestate.com
 * Version: 1.0.0
 * License: GNU General Public License v2 or later
 * License URI: https://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: premium-estate-lite
 * Domain Path: /languages
 * Requires at least: 6.0
 * Tested up to: 6.4
 * Requires PHP: 7.4
 * Tags: blog, business, portfolio, e-commerce, one-column, two-columns, right-sidebar, left-sidebar, footer-widgets, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, sticky-post, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks, accessibility-ready
 */

/* CSS Variables */
:root {
  --primary-color: #5046e5;
  --secondary-color: #10b981;
  --text-color: #1f2937;
  --link-color: #5046e5;
  --heading-color: #111827;
  --background-color: #ffffff;
  --footer-bg: #1f2937;
  --container-width: 1200px;
  --content-width: 800px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background: var(--background-color);
}

/* Container */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--heading-color);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: relative;
  z-index: 999;
}

.site-header.sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.site-branding {
  display: flex;
  align-items: center;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.site-title a {
  color: var(--heading-color);
}

/* Navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-navigation li {
  margin: 0 1rem;
}

.main-navigation a {
  color: var(--text-color);
  font-weight: 500;
}

.main-navigation a:hover {
  color: var(--primary-color);
}

/* Content */
.site-content {
  padding: 60px 0;
  min-height: 60vh;
}

/* Sidebar Layout */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.has-sidebar .content-sidebar-wrap {
  grid-template-columns: 1fr 300px;
}

.sidebar-left .content-sidebar-wrap {
  grid-template-columns: 300px 1fr;
}

/* Footer */
.site-footer {
  background: var(--footer-bg);
  color: #fff;
  padding: 60px 0 30px;
  margin-top: 80px;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-bottom: 40px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 30px;
  text-align: center;
  opacity: 0.8;
}

/* Buttons */
.button,
button,
input[type="submit"],
input[type="button"],
.wp-block-button__link {
  display: inline-block;
  padding: 12px 30px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.button:hover,
button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 20px;
  }
  
  .main-navigation ul {
    flex-direction: column;
    gap: 10px;
  }
  
  .has-sidebar .content-sidebar-wrap,
  .sidebar-left .content-sidebar-wrap {
    grid-template-columns: 1fr;
  }
  
  .footer-widgets {
    grid-template-columns: 1fr;
  }
}

/* Additional Styles */

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.875rem;
  margin-bottom: 20px;
  color: #6b7280;
}

.breadcrumb-separator {
  margin: 0 8px;
}

/* Page Header */
.page-header {
  background: #f9fafb;
  padding: 40px 0;
  margin-bottom: 40px;
  border-bottom: 1px solid #e5e7eb;
}

.page-title {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
}

.archive-description {
  margin-top: 1rem;
  color: #6b7280;
}

/* Blog Layouts */
.blog-layout-grid .site-main {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.blog-layout-grid article {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.blog-layout-grid article:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Post Thumbnail */
.post-thumbnail {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 20px;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.post-thumbnail:hover img {
  transform: scale(1.05);
}

/* Entry Meta */
.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 15px;
}

.entry-meta a {
  color: inherit;
}

.entry-meta a:hover {
  color: var(--primary-color);
}

/* Entry Content */
.entry-content {
  line-height: 1.8;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.entry-content ul,
.entry-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.entry-content li {
  margin-bottom: 0.5rem;
}

.entry-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 20px;
  margin: 2rem 0;
  font-style: italic;
  color: #6b7280;
}

.entry-content code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
}

.entry-content pre {
  background: #1f2937;
  color: #fff;
  padding: 20px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

/* Entry Footer */
.entry-footer {
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid #e5e7eb;
}

.tags-links {
  margin-bottom: 10px;
}

.tags-links a {
  display: inline-block;
  padding: 5px 12px;
  background: #f3f4f6;
  border-radius: 20px;
  font-size: 0.875rem;
  margin-right: 8px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.tags-links a:hover {
  background: var(--primary-color);
  color: #fff;
}

/* Read More */
.read-more {
  display: inline-block;
  margin-top: 15px;
  font-weight: 600;
  color: var(--primary-color);
}

.read-more:hover {
  color: var(--secondary-color);
}

/* Post Navigation */
.post-navigation {
  margin: 40px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  padding: 30px 0;
}

.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  flex: 1;
}

.post-navigation .nav-subtitle {
  display: block;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 5px;
}

.post-navigation .nav-title {
  display: block;
  font-weight: 600;
  color: var(--heading-color);
}

/* Pagination */
.pagination {
  margin: 60px 0 0;
}

.pagination .page-numbers {
  display: flex;
  list-style: none;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination .page-numbers li {
  margin: 0;
}

.pagination .page-numbers a,
.pagination .page-numbers .current,
.pagination .page-numbers .dots {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 15px;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  color: var(--text-color);
  font-weight: 500;
  transition: all 0.3s ease;
}

.pagination .page-numbers a:hover,
.pagination .page-numbers .current {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* Author Box */
.author-box {
  display: flex;
  gap: 20px;
  padding: 30px;
  background: #f9fafb;
  border-radius: 8px;
  margin: 40px 0;
}

.author-avatar img {
  border-radius: 50%;
}

.author-name {
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.author-description {
  color: #6b7280;
  margin-bottom: 15px;
}

.author-link {
  color: var(--primary-color);
  font-weight: 600;
}

/* Related Posts */
.related-posts {
  margin: 40px 0;
  padding: 40px 0;
  border-top: 1px solid #e5e7eb;
}

.related-posts h3 {
  margin-bottom: 30px;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 30px;
}

.related-post {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.related-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.related-post-thumbnail {
  display: block;
  overflow: hidden;
}

.related-post-thumbnail img {
  width: 100%;
  height: auto;
  transition: transform 0.3s ease;
}

.related-post:hover .related-post-thumbnail img {
  transform: scale(1.05);
}

.related-post-content {
  padding: 20px;
}

.related-post-title {
  margin: 0 0 10px;
  font-size: 1rem;
}

.related-post-title a {
  color: var(--heading-color);
}

.related-post-meta {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Comments */
.comments-area {
  margin: 60px 0 0;
  padding: 40px 0;
  border-top: 1px solid #e5e7eb;
}

.comments-title {
  margin-bottom: 30px;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list .comment {
  margin-bottom: 30px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 8px;
}

.comment-list .children {
  list-style: none;
  margin-left: 40px;
  padding: 0;
}

.comment-author img {
  border-radius: 50%;
  margin-right: 15px;
}

.comment-form {
  margin-top: 40px;
}

.comment-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  margin-bottom: 20px;
}

/* Widgets */
.widget {
  margin-bottom: 40px;
}

.widget-title {
  margin-bottom: 20px;
  font-size: 1.25rem;
  font-weight: 700;
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget ul li {
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
}

.widget ul li:last-child {
  border-bottom: none;
}

.widget ul li a {
  color: var(--text-color);
  transition: color 0.3s ease;
}

.widget ul li a:hover {
  color: var(--primary-color);
}

/* Search Form */
.search-form {
  position: relative;
  display: flex;
  gap: 10px;
}

.search-form .search-field {
  flex: 1;
}

.search-submit {
  min-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Screen Reader Text */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* Embed Responsive */
.embed-responsive {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.embed-responsive iframe,
.embed-responsive object,
.embed-responsive embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Alignments */
.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 1rem;
}

/* Mobile Menu */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle-icon {
  display: block;
  width: 25px;
  height: 2px;
  background: currentColor;
  position: relative;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: '';
  display: block;
  width: 25px;
  height: 2px;
  background: currentColor;
  position: absolute;
  left: 0;
  transition: all 0.3s ease;
}

.menu-toggle-icon::before {
  top: -8px;
}

.menu-toggle-icon::after {
  bottom: -8px;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
  color: var(--text-color);
  z-index: 1001;
  order: 3;
  margin-left: auto;
}

.mobile-menu-toggle .menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
}

.mobile-menu-toggle .menu-icon span {
  display: block;
  width: 100%;
  height: 3px;
  background: currentColor;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) {
  transform: translateY(8.5px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) {
  transform: translateY(-8.5px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

body.menu-open .menu-overlay {
  display: block;
}

@media (max-width: 768px) {
  .header-inner {
    position: relative;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 15px 0;
    min-height: auto;
    gap: 15px;
  }
  
  .site-branding {
    flex: 0 1 auto;
    max-width: calc(100% - 60px);
  }
  
  .site-title {
    font-size: 1.25rem;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    flex-shrink: 0;
    position: relative;
  }
  
  .main-navigation {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--background-color);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    padding-top: 60px;
    display: block;
  }
  
  .main-navigation.toggled {
    left: 0;
  }
  
  .main-navigation ul {
    flex-direction: column;
    padding: 20px;
  }
  
  .main-navigation ul li {
    width: 100%;
    border-bottom: 1px solid #e5e7eb;
    margin: 0;
  }
  
  .main-navigation ul li a {
    display: block;
    padding: 15px 10px;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .main-navigation ul {
    display: flex;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .author-box {
    flex-direction: column;
  }
  
  .related-posts-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-widgets {
    grid-template-columns: 1fr;
  }
  
  .content-sidebar-wrap {
    grid-template-columns: 1fr !important;
  }
}

