/*
Theme Name: Janani Rehabilitation Centre
Theme URI: https://jananideaddiction.com
Description: Professional WordPress theme for Janani Alcohol & Drug Rehabilitation Centre
Version: 1.0.0
Author: Janani Rehabilitation Centre
Author URI: https://jananideaddiction.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: janani-theme
Domain Path: /languages

Janani Rehabilitation Centre WordPress Theme
© 2024 Janani Rehabilitation Centre
*/

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600;9..144,700&family=Inter:wght@400;500;600&display=swap");

/* ============================================
   DESIGN SYSTEM - Color Variables
   All colors are in HSL format
   ============================================ */

:root {
  /* Janani – Clean Medical meets High-End Wellness */
  --background: 0 0% 100%;
  --foreground: 215 28% 16%;

  --brand-teal: 186 58% 33%;
  --brand-teal-soft: 186 52% 94%;
  --brand-slate: 215 24% 26%;

  --surface: 186 52% 98%;
  --surface-2: 210 22% 96%;

  --card: 0 0% 100%;
  --card-foreground: 215 28% 16%;

  --popover: 0 0% 100%;
  --popover-foreground: 215 28% 16%;

  --primary: var(--brand-teal);
  --primary-glow: 186 72% 42%;
  --primary-foreground: 0 0% 100%;

  --secondary: 215 20% 94%;
  --secondary-foreground: 215 28% 16%;

  --muted: 210 22% 96%;
  --muted-foreground: 215 14% 46%;

  --accent: var(--brand-teal-soft);
  --accent-foreground: 215 28% 16%;

  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;

  --border: 214 26% 89%;
  --input: 214 26% 89%;
  --ring: var(--primary);

  --radius: 0.9rem;

  --shadow-soft: 0 10px 28px -18px hsl(var(--brand-slate) / 0.35);
  --shadow-elevated: 0 24px 60px -28px hsl(var(--brand-slate) / 0.4);
  --shadow-glow: 0 18px 40px -22px hsl(var(--primary) / 0.55);

  --gradient-hero: radial-gradient(1200px circle at var(--spot-x, 20%) var(--spot-y, 20%),
      hsl(var(--primary) / 0.18),
      transparent 55%),
    radial-gradient(900px circle at 80% 0%, hsl(var(--primary-glow) / 0.16), transparent 55%),
    linear-gradient(180deg, hsl(var(--surface)) 0%, hsl(var(--background)) 70%);
}

.dark {
  --background: 215 30% 10%;
  --foreground: 210 20% 96%;

  --surface: 215 28% 12%;
  --surface-2: 215 28% 14%;

  --card: 215 28% 12%;
  --card-foreground: 210 20% 96%;

  --popover: 215 28% 12%;
  --popover-foreground: 210 20% 96%;

  --primary: 186 64% 44%;
  --primary-glow: 186 80% 55%;
  --primary-foreground: 215 30% 10%;

  --secondary: 215 26% 18%;
  --secondary-foreground: 210 20% 96%;

  --muted: 215 26% 18%;
  --muted-foreground: 215 14% 68%;

  --accent: 215 26% 18%;
  --accent-foreground: 210 20% 96%;

  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 40% 98%;

  --border: 215 24% 22%;
  --input: 215 24% 22%;
  --ring: var(--primary);
}

/* ============================================
   GLOBAL RESET & BASE STYLES
   ============================================ */

* {
  border-color: hsl(var(--border));
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Fraunces, ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h1 {
  font-size: 2.25rem;
  font-weight: 700;
}

@media (min-width: 768px) {
  h1 {
    font-size: 3rem;
  }
}

h2 {
  font-size: 1.875rem;
  font-weight: 700;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */

.container {
  margin: 0 auto;
  max-width: 1400px;
  padding: 0 2rem;
  width: 100%;
}

@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }
}

.min-h-screen {
  min-height: 100vh;
}

/* ============================================
   BUTTON STYLES
   ============================================ */

.btn,
button,
.wp-block-button__link {
  border-radius: calc(var(--radius) * 1.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  transition: all 300ms ease;
  border: 1px solid transparent;
}

.btn-primary,
.wp-block-button__link {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover,
.wp-block-button__link:hover {
  background-color: hsl(var(--primary) / 0.9);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  background-color: transparent;
  border-color: hsl(var(--border));
  color: hsl(var(--foreground));
}

.btn-outline:hover {
  background-color: hsl(var(--secondary));
}

.btn-hero {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-radius: 9999px;
  padding: 0.625rem 1.75rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.btn-hero:hover {
  background-color: hsl(var(--primary) / 0.9);
  box-shadow: var(--shadow-glow);
}

/* ============================================
   CARD STYLES
   ============================================ */

.card {
  background-color: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.5);
  padding: 1.5rem;
  box-shadow: var(--shadow-soft);
}

.card-lg {
  padding: 2rem;
}

/* ============================================
   TYPOGRAPHY UTILITIES
   ============================================ */

.text-subtle,
.text-muted-foreground {
  color: hsl(var(--muted-foreground));
}

.text-primary {
  color: hsl(var(--primary));
}

.text-secondary {
  color: hsl(var(--secondary-foreground));
}

/* ============================================
   SPACING UTILITIES
   ============================================ */

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.py-8 { padding: 2rem 0; }
.py-12 { padding: 3rem 0; }
.py-14 { padding: 3.5rem 0; }
.py-18 { padding: 4.5rem 0; }
.py-20 { padding: 5rem 0; }

.px-4 { padding: 0 1rem; }
.px-6 { padding: 0 1.5rem; }

.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

/* ============================================
   GRID UTILITIES
   ============================================ */

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 768px) {
  .md\:grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .md\:grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .md\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
}

/* ============================================
   FLEX UTILITIES
   ============================================ */

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }

/* ============================================
   BORDER & BACKGROUND UTILITIES
   ============================================ */

.border {
  border: 1px solid hsl(var(--border));
}

.border-t {
  border-top: 1px solid hsl(var(--border));
}

.bg-background {
  background-color: hsl(var(--background));
}

.bg-surface {
  background-color: hsl(var(--surface));
}

.bg-card {
  background-color: hsl(var(--card));
}

.bg-hero {
  background: var(--gradient-hero);
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-2xl {
  border-radius: 1rem;
}

.rounded-3xl {
  border-radius: 1.5rem;
}

.rounded-full {
  border-radius: 9999px;
}

/* ============================================
   SHADOW UTILITIES
   ============================================ */

.shadow-soft {
  box-shadow: var(--shadow-soft);
}

.shadow-elevated {
  box-shadow: var(--shadow-elevated);
}

.shadow-glow {
  box-shadow: var(--shadow-glow);
}

/* ============================================
   PHOTO & IMAGE UTILITIES
   ============================================ */

.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  box-shadow: var(--shadow-elevated);
}

.photo-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 90% at 50% 10%, hsl(var(--background) / 0.06), transparent 55%),
    linear-gradient(180deg, transparent 45%, hsl(var(--foreground) / 0.06));
  pointer-events: none;
}

.photo-cinematic {
  position: relative;
}

.photo-cinematic::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(110% 90% at 50% 15%, transparent 40%, hsl(var(--foreground) / 0.32) 100%),
    linear-gradient(180deg, hsl(var(--foreground) / 0.18), transparent 55%, hsl(var(--foreground) / 0.26));
  pointer-events: none;
  opacity: 0.9;
  border-radius: 1.5rem;
}

.img-premium {
  filter: saturate(1.03) contrast(1.08) brightness(1.01);
  transform: translateZ(0);
}

.photo-hover {
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.photo-hover:hover {
  transform: scale(1.03);
}

/* ============================================
   NAVIGATION STYLES
   ============================================ */

header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid hsl(var(--border));
  background-color: hsl(var(--background) / 0.8);
  backdrop-filter: blur(10px);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 300ms;
}

.site-logo:hover {
  opacity: 0.8;
}

.site-logo img {
  height: 2.5rem;
  width: 2.5rem;
  border-radius: 9999px;
  box-shadow: var(--shadow-soft);
}

.site-logo-text {
  display: none;
  line-height: 1.2;
}

@media (min-width: 640px) {
  .site-logo-text {
    display: block;
  }
}

.site-logo-text-main {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(var(--foreground));
}

.site-logo-text-sub {
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}

@media (min-width: 768px) {
  nav {
    display: flex;
  }
}

nav a {
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: hsl(var(--muted-foreground));
  transition: color 300ms;
}

nav a:hover,
nav a.active {
  color: hsl(var(--foreground));
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-whatsapp {
  display: none;
  background-color: transparent;
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  border-radius: 9999px;
  padding: 0.625rem 1rem;
  font-size: 0.75rem;
  cursor: pointer;
}

@media (min-width: 640px) {
  .btn-whatsapp {
    display: inline-flex;
  }
}

/* ============================================
   FOOTER STYLES
   ============================================ */

footer {
  border-top: 1px solid hsl(var(--border));
  background-color: hsl(var(--surface));
}

.footer-content {
  display: grid;
  gap: 2rem;
  padding: 3rem 0;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(12, 1fr);
  }
}

.footer-section {
  grid-column: span 1;
}

@media (min-width: 768px) {
  .footer-section:nth-child(1) {
    grid-column: span 5;
  }

  .footer-section:nth-child(2) {
    grid-column: span 3;
  }

  .footer-section:nth-child(3) {
    grid-column: span 4;
  }
}

.footer-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.footer-section p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.footer-section ul {
  list-style: none;
  margin: 0.75rem 0 0 0;
  padding: 0;
}

.footer-section li {
  margin: 0.5rem 0;
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
}

.footer-section a {
  color: hsl(var(--foreground));
  text-decoration: underline;
  text-decoration-offset: 0.25rem;
  transition: text-decoration-color 300ms;
}

.footer-section a:hover {
  text-decoration-color: hsl(var(--primary));
}

.footer-bottom {
  border-top: 1px solid hsl(var(--border));
  padding: 1.25rem 0;
  font-size: 0.75rem;
  color: hsl(var(--muted-foreground));
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.hidden {
  display: none;
}

@media (min-width: 640px) {
  .sm\:block {
    display: block;
  }
}

@media (min-width: 768px) {
  .md\:flex {
    display: flex;
  }

  .md\:block {
    display: block;
  }

  .md\:py-20 {
    padding: 5rem 0;
  }

  .md\:p-8 {
    padding: 2rem;
  }

  .md\:items-center {
    align-items: center;
  }

  .md\:justify-end {
    justify-content: flex-end;
  }

  .md\:col-span-4 {
    grid-column: span 4;
  }

  .md\:col-span-5 {
    grid-column: span 5;
  }

  .md\:col-span-6 {
    grid-column: span 6;
  }

  .md\:col-span-8 {
    grid-column: span 8;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reduce-motion * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================
   WORDPRESS SPECIFIC STYLES
   ============================================ */

.wp-block-image {
  margin: 1rem auto;
}

.wp-block-image img {
  max-width: 100%;
  height: auto;
}

.wp-block-paragraph {
  margin-bottom: 1rem;
}

.alignfull {
  max-width: none;
}

.wp-site-blocks > * + * {
  margin-block-start: 2rem;
}

/* Add support for WordPress editor styling */
.entry-content {
  max-width: 100%;
}
