/*
Theme Name: DHB Shrinath Theme
Theme URI: https://dhbshrinath.com
Author: GrowthMaxAgency
Author URI: https://growthmaxagency.com
Description: A modern, Web3-era responsive theme for DHB Shrinath real estate
Version: 2.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dhbshrinath
Tags: real-estate, responsive, modern, web3, properties
*/

/* ========================================
   1. CSS VARIABLES & RESET
   ======================================== */
:root {
  --bg: #ffffff;
  --bg-alt: #f8f9fa;
  --text: #111827;
  --text-muted: #6b7280;
  --accent: #d40000;
  --accent-dark: #a30000;
  --success: #27ae60;
  --warning: #f39c12;
  --error: #e74c3c;
  --border: #e5e7eb;
  --shadow: rgba(0, 0, 0, 0.1);
  --gap: 20px;
  --max-width: 1200px;
  --transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 12px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--text);
  background: var(--bg-alt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-dark);
}

/* ========================================
   2. HEADER STYLES
   ======================================== */
.site-header {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 1200;
  box-shadow: 0 2px 8px var(--shadow);
  transition: all var(--transition);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding: 18px 20px;
}

.logo-and-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-container {
  width: clamp(120px, 18vw, 240px);
  flex-shrink: 0;
}

.custom-logo,
.site-title-text {
  max-width: 100%;
  height: auto;
  display: block;
}

.logo-container img {
  width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 80px;
  transition: transform var(--transition), max-height var(--transition);
}

.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.primary-menu {
  display: flex;
  gap: 30px;
  list-style: none;
  align-items: center;
}

.primary-menu li a {
  color: var(--text);
  font-weight: 600;
  padding: 8px 4px;
  position: relative;
  transition: color var(--transition);
}

.primary-menu li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.primary-menu li a:hover::after,
.primary-menu li.current-menu-item a::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(212, 0, 0, 0.3);
}

.search-toggle {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
  transition: transform var(--transition);
}

.search-toggle:hover {
  transform: scale(1.1);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger {
  display: block;
  width: 28px;
  height: 20px;
  position: relative;
}

.hamburger span {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamburger span:nth-child(3) { bottom: 0; }

.site-header.menu-open .hamburger span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.site-header.menu-open .hamburger span:nth-child(2) {
  opacity: 0;
}

.site-header.menu-open .hamburger span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.mobile-menu-overlay {
  display: none;
}

/* Scrolled Header */
.site-header.scrolled .header-inner {
  padding: 12px 20px;
}

.site-header.scrolled .logo-container img {
  max-height: 60px;
}

/* ========================================
   3. CONTAINER & LAYOUT
   ======================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px;
}

.site-main {
  min-height: 60vh;
}

/* ========================================
   4. HERO SECTION
   ======================================== */
.hero {
  text-align: center;
  padding: 80px 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: var(--radius);
  margin-bottom: 60px;
}

.hero h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 20px;
  font-weight: 700;
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  margin-bottom: 30px;
  opacity: 0.95;
}

.cta-button {
  display: inline-block;
  background: white;
  color: #667eea;
  padding: 15px 35px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1.1rem;
  transition: all var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
  color: #667eea;
}

/* ========================================
   5. PROPERTY CARDS
   ======================================== */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.property-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px var(--shadow);
  transition: all var(--transition);
  opacity: 0;
  transform: translateY(20px);
}

.property-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px var(--shadow);
}

.property-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform var(--transition);
}

.property-card:hover img {
  transform: scale(1.05);
}

.property-card-content {
  padding: 20px;
}

.property-card h4 {
  font-size: 1.4rem;
  margin-bottom: 12px;
  color: var(--text);
}

.property-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.property-location {
  color: var(--text-muted);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.property-location::before {
  content: "📍";
}

.property-card p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 15px;
}

/* ========================================
   6. SINGLE PROPERTY
   ======================================== */
.single-property {
  background: white;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: 0 2px 15px var(--shadow);
  margin-bottom: 40px;
}

.single-property h2 {
  font-size: 2.5rem;
  margin-bottom: 30px;
  color: var(--text);
}

.property-gallery {
  margin-bottom: 30px;
  border-radius: var(--radius);
  overflow: hidden;
}

.property-gallery img {
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: cover;
}

.property-details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
}

.property-meta {
  background: var(--bg-alt);
  padding: 30px;
  border-radius: var(--radius);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.property-meta h4 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text);
}

.meta-item {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.meta-item:last-child {
  border-bottom: none;
}

.meta-item strong {
  color: var(--text-muted);
}

.whatsapp-link {
  display: block;
  background: #25D366;
  color: white;
  padding: 15px;
  text-align: center;
  border-radius: var(--radius);
  font-weight: 600;
  margin-top: 20px;
  transition: all var(--transition);
}

.whatsapp-link:hover {
  background: #128C7E;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  color: white;
}

/* ========================================
   7. CONTACT FORM
   ======================================== */
.contact-form-wrapper {
  background: white;
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px var(--shadow);
  margin-top: 30px;
}

.contact-form-wrapper h3 {
  margin-bottom: 20px;
  font-size: 1.8rem;
  color: var(--text);
}

.form-group {
  margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 16px;
  font-family: inherit;
  transition: border-color var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form button {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.contact-form button:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: var(--radius);
  border: 1px solid #c3e6cb;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: var(--radius);
  border: 1px solid #f5c6cb;
}

/* ========================================
   8. SEARCH OVERLAY
   ======================================== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.search-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.search-overlay-content {
  background: white;
  padding: 40px;
  border-radius: var(--radius);
  max-width: 600px;
  width: 90%;
  position: relative;
}

.search-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
  color: var(--text-muted);
}

.search-overlay input {
  width: 100%;
  padding: 20px;
  font-size: 1.5rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 15px;
}

.search-overlay button {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 1.1rem;
  cursor: pointer;
}

/* ========================================
   9. FOOTER
   ======================================== */
#site-footer {
  background: var(--text);
  color: white;
  padding: 40px 20px;
  margin-top: 80px;
}

.footer-navigation {
  text-align: center;
  margin-bottom: 20px;
}

.footer-menu {
  display: flex;
  justify-content: center;
  gap: 30px;
  list-style: none;
  flex-wrap: wrap;
}

.footer-menu a {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition);
}

.footer-menu a:hover {
  color: white;
}

.site-info {
  text-align: center;
  opacity: 0.7;
  font-size: 0.9rem;
}

/* ========================================
   10. 404 PAGE
   ======================================== */
.error-404 {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: var(--radius);
}

.error-404 h2 {
  font-size: 8rem;
  color: var(--accent);
  margin-bottom: 20px;
}

/* ========================================
   11. RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 1024px) {
  .primary-menu {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .mobile-menu-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    z-index: 1100;
  }
  
  .site-header.menu-open .mobile-menu-overlay {
    opacity: 1;
    pointer-events: auto;
  }
  
  .site-header .primary-menu {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(320px, 85vw);
    background: white;
    padding: 80px 20px 20px;
    flex-direction: column;
    gap: 20px;
    box-shadow: -8px 0 30px var(--shadow);
    transform: translateX(100%);
    transition: transform var(--transition);
    z-index: 1205;
    align-items: flex-start;
    overflow-y: auto;
  }
  
  .site-header.menu-open .primary-menu {
    transform: translateX(0);
  }
  
  .property-details {
    grid-template-columns: 1fr;
  }
  
  .property-meta {
    position: static;
  }
}

@media (max-width: 768px) {
  .properties-grid {
    grid-template-columns: 1fr;
  }
  
  .hero {
    padding: 60px 20px;
  }
  
  .single-property {
    padding: 20px;
  }
}

/* ========================================
   12. UTILITY CLASSES
   ======================================== */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mb-40 { margin-bottom: 40px; }

/* ========================================
   13. ACCESSIBILITY
   ======================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}