/*
Theme Name: Mewar Oswal Theme
Author: Harshal
Description: Custom theme for the community website.
Version: 3.0 (Demo Ready)
*/

/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --primary: #0ea5e9; /* Sky Blue */
  --primary-600: #0284c7;
  --accent: #f59e0b; /* Amber/Gold */
  --card: #f8fafc;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  scroll-behavior: smooth;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary-600);
}

/* =========================================
   2. LAYOUT UTILITIES
   ========================================= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}


/* HIDE BROKEN ELEMENTS (TEMPORARY FOR DEMO) */
/* Hides the profession dropdown to avoid "No Results" error */
.wpp-search-filter-profession, 
select[name="profession"], 
#profession { 
    display: none !important; 
}

/* =========================================
   3. NAVIGATION BAR (The Squeeze Version)
   ========================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.nav .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 1rem;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary-600);
  flex-shrink: 0;
}

.brand .logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
}

/* Main Menu Row */
.menu {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: nowrap;
}

.menu a {
  padding: 0.4rem 0.6rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
}

.menu a:hover {
  background: var(--card);
  color: var(--primary);
}

/* Buttons inside Navbar */
.badge {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: #374151;
  font-size: 0.85rem;
  font-weight: 600;
}

.cta {
  background: var(--primary);
  color: #fff !important;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(14, 165, 233, 0.2);
}

.cta:hover {
  background: var(--primary-600);
  transform: translateY(-1px);
}

/* Fix for Logout/CTA Button Hover */
.menu .cta:hover {
    background: var(--primary-600);
    color: #ffffff !important;
}

/* Language Flags */
.lang-flags {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding-left: 8px;
    gap: 5px;
    align-items: center;
}

.lang-flags li { display: flex; }

.lang-flags img {
    height: 18px;
    width: auto;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0.8;
    transition: 0.2s;
}

.lang-flags img:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Hamburger Toggle */
.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

/* =========================================
   4. PROFILE DROPDOWN
   ========================================= */
.profile-dropdown {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    margin-bottom: -10px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #ffffff;
    min-width: 140px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 12px;
    padding: 0.5rem;
    z-index: 100; 
    border: 1px solid var(--border);
}

.profile-dropdown:hover .dropdown-content {
    display: block;
    animation: fadeUp 0.2s ease-out;
}

.dropdown-content a {
    color: #ef4444 !important; /* Red for Logout */
    display: block;
    padding: 0.6rem 1rem;
    text-align: center;
    border-radius: 8px;
    width: 100%;
}

.dropdown-content a:hover {
    background-color: #fee2e2 !important;
    color: #b91c1c !important;
}

/* =========================================
   5. HERO & CARDS
   ========================================= */
.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  padding: 3rem 0;
  align-items: center;
}

/* Gradient Text Effect */
.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin: 0.2rem 0 1rem;
    line-height: 1.2;
    background: linear-gradient(90deg, #f59e0b, #0ea5e9, #f59e0b);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shine 6s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

.hero p {
  color: var(--muted);
  font-size: 1.1rem;
}

/* --- FIX: Hindi Badge Overlap --- */
/* Pushes the Hero text down specifically in Hindi mode */
html[lang="hi"] .hero .badge {
    margin-bottom: 25px !important; 
    display: inline-block !important; 
}

/* Premium Cards */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px -10px rgba(245, 158, 11, 0.15);
    border-color: var(--accent);
    background: white;
}

.card::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.8), transparent);
    transform: skewX(-25deg);
    pointer-events: none;
}

.card:hover::after {
    left: 150%;
    transition: 0.7s ease-in-out;
}

h2 {
  font-size: 1.6rem;
  margin: 2rem 0 1rem;
}

/* =========================================
   6. TABLES, FOOTER & FORMS
   ========================================= */
.footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: #fff;
  padding-bottom: 2rem;
}

.footer .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.small { font-size: 0.9rem; color: var(--muted); }
.notice {
  background: linear-gradient(90deg, rgba(14,165,233,.1), rgba(245,158,11,.1));
  border: 1px dashed var(--primary);
  padding: 1rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

/* Tables */
table { 
  border-collapse: collapse; width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
}
th { background: var(--card); color: var(--text); font-weight: 600; text-align: left; padding: 1rem; border-bottom: 2px solid var(--border); }
td { padding: 1rem; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }

/* Contact Form 7 */
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 textarea {
    width: 100%; padding: 0.8rem; border: 1px solid var(--border);
    border-radius: 8px; background: #ffffff; font-family: inherit; font-size: 1rem; margin-bottom: 1rem; outline: none;
    transition: border-color 0.2s;
}
.wpcf7 input:focus, .wpcf7 textarea:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.wpcf7 input[type="submit"] {
    background: var(--primary); color: white; padding: 0.8rem 1.5rem; border: none;
    border-radius: 99px; cursor: pointer; font-weight: 600; font-size: 1rem; transition: background 0.2s;
}
.wpcf7 input[type="submit"]:hover { background: var(--primary-600); }

/* Gallery */
.wp-block-gallery { margin-bottom: 2rem; }
.wp-block-gallery .wp-block-image img {
    border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease;
}
.wp-block-gallery .wp-block-image img:hover {
    transform: scale(1.02); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
}

/* =========================================
   7. ANIMATIONS
   ========================================= */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero, .card, .footer {
    animation: fadeUp 0.8s ease-out forwards;
    opacity: 0;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }

/* =========================================
   8. MOBILE RESPONSIVENESS (Layout & Logic)
   ========================================= */

/* A. Laptop/Tablet Breakpoint (Fixes Wrapping) */
@media (max-width: 1200px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .menu-toggle {
    display: inline-block;
  }
  .menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #ffffff;
    flex-direction: column;
    padding: 1rem;
    border-top: 1px solid var(--border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    gap: 0.5rem;
  }
  .menu.is-active {
    display: flex;
  }
  .menu a, .badge, .cta {
    text-align: center;
    width: 100%;
    display: block;
    padding: 0.8rem;
  }
  /* On mobile, un-hide the dropdown content so links are visible */
  .profile-dropdown, .dropdown-content {
      width: 100%;
      position: static;
      display: block;
      box-shadow: none;
      border: none;
      padding: 0;
  }
  .dropdown-content {
      margin-top: 0;
  }
  .profile-dropdown:hover .dropdown-content {
      animation: none;
  }
}

/* B. Phone Specific Fixes (Tables & Inputs) */
@media screen and (max-width: 768px) {
    /* 1. Prevent Auto-Zoom on Inputs (iPhone Issue) */
    input[type="text"], 
    input[type="email"], 
    input[type="password"], 
    input[type="tel"] {
        font-size: 16px !important;
    }

    /* 2. Login Button Full Width (Thumb-friendly) */
    .um-button {
        width: 100% !important;
        display: block !important;
        padding: 15px !important;
        font-size: 18px !important;
    }

    /* 3. Horizontal Scroll Table (The Balanced Fix) */
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    /* Ensure columns have width so they don't squish */
    table td, table th {
        white-space: normal;  /* Allow text wrapping */
        min-width: 200px;     /* Minimum width to prevent 1-word towers */
        padding: 12px;
        vertical-align: top;
        line-height: 1.5;
    }
}