@import "tailwindcss";
@import "tw-animate-css";

@custom-variant dark (&:is(.dark *));

:root {
  /* --primary: #005F36; */
  --primary: #7F2828;
  --secondary: #005F36;
  --radius: 0.625rem;
  --background: #ffffff;
  --foreground: #171717;
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --primary-foreground: oklch(0.985 0 0);
  --secondary-foreground: oklch(0.205 0 0);
  --muted: oklch(0.97 0 0);
  --muted-foreground: oklch(0.556 0 0);
  --accent: oklch(0.97 0 0);
  --accent-foreground: oklch(0.205 0 0);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.922 0 0);
  --input: oklch(0.922 0 0);
  --ring: oklch(0.708 0 0);
  --chart-1: oklch(0.646 0.222 41.116);
  --chart-2: oklch(0.6 0.118 184.704);
  --chart-3: oklch(0.398 0.07 227.392);
  --chart-4: oklch(0.828 0.189 84.429);
  --chart-5: oklch(0.769 0.188 70.08);
  --sidebar: oklch(0.985 0 0);
  --sidebar-foreground: oklch(0.145 0 0);
  --sidebar-primary: oklch(0.205 0 0);
  --sidebar-primary-foreground: oklch(0.985 0 0);
  --sidebar-accent: oklch(0.97 0 0);
  --sidebar-accent-foreground: oklch(0.205 0 0);
  --sidebar-border: oklch(0.922 0 0);
  --sidebar-ring: oklch(0.708 0 0);
}


@theme inline {
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-primary: var(--primary);
  --color-secondary: var(--secondary);
  --font-sans: var(--font-geist-sans);
  --font-mono: var(--font-geist-mono);
  --font-cormorant: var(--font-cormorant);
  --font-lato: var(--font-lato);
  --font-outfit: var(--font-outfit);
  --font-poppins: var(--font-poppins);
  --font-trocchi: var(--font-trocchi);
  --color-sidebar-ring: var(--sidebar-ring);
  --color-sidebar-border: var(--sidebar-border);
  --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
  --color-sidebar-accent: var(--sidebar-accent);
  --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
  --color-sidebar-primary: var(--sidebar-primary);
  --color-sidebar-foreground: var(--sidebar-foreground);
  --color-sidebar: var(--sidebar);
  --color-chart-5: var(--chart-5);
  --color-chart-4: var(--chart-4);
  --color-chart-3: var(--chart-3);
  --color-chart-2: var(--chart-2);
  --color-chart-1: var(--chart-1);
  --color-ring: var(--ring);
  --color-input: var(--input);
  --color-border: var(--border);
  --color-destructive: var(--destructive);
  --color-accent-foreground: var(--accent-foreground);
  --color-accent: var(--accent);
  --color-muted-foreground: var(--muted-foreground);
  --color-muted: var(--muted);
  --color-secondary-foreground: var(--secondary-foreground);
  --color-primary-foreground: var(--primary-foreground);
  --color-popover-foreground: var(--popover-foreground);
  --color-popover: var(--popover);
  --color-card-foreground: var(--card-foreground);
  --color-card: var(--card);
  --radius: var(--radius);
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --animate-spin-slow: spin 10s linear infinite;
}


body {
  font-family: var(--font-poppins);
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }

  body {
    @apply bg-background text-foreground;
  }
}

/* Global Scrollbar Styling */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: var(--primary);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: color-mix(in oklch, var(--primary) 80%, transparent);
}

.scrollbar-hidden,
.no-scrollbar {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scrollbar-hidden::-webkit-scrollbar {
  display: none;
}

/* CKEditor */
.ck-balloon-panel {
  z-index: 9999 !important;
  pointer-events: all !important;
}
.ck-editor__editable {
  padding-left: 30px !important;
}
.ck.ck-dropdown__panel,
.ck.ck-dropdown__panel .ck-list {
  background: var(--background) !important;
}

.ck.ck-dropdown__panel .ck-button.ck-list-item-button,
.ck.ck-dropdown__panel .ck-button.ck-list-item-button .ck-button__label,
.ck.ck-dropdown__panel .ck-button.ck-list-item-button .ck-list-item-button__title {
  color: var(--foreground) !important;
}

.ck.ck-dropdown__panel .ck-button.ck-list-item-button:hover,
.ck.ck-dropdown__panel .ck-button.ck-list-item-button:focus {
  background: var(--muted) !important;
}

/* CKEditor 5 Image Styles for Frontend */
.image-style-align-left {
  float: left;
}

.image-style-align-right {
  float: right;
}

.image-style-align-center {
  margin-left: auto;
  margin-right: auto;
  display: block;
  text-align: center;
}

.image-style-side {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  max-width: 50%;
}

figure.image {
  display: table;
  clear: both;
  margin: 1rem auto;
}

figure.image-style-align-left {
  float: left;
  margin-right: 1.5rem;
}

figure.image-style-align-right {
  float: right;
  margin-left: 1.5rem;
}

figure.image img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* Remove ALL rounded corners + background inside Navbar ONLY */
.navbar-reset *,
.navbar-reset {
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;

  /* Reset shadcn / global radius variables */
  --radius: 0px !important;
  --radius-sm: 0px !important;
  --radius-md: 0px !important;
  --radius-lg: 0px !important;
  --radius-xl: 0px !important;

  /* Remove inherited padding causing pill shape */
  padding: 0 !important;
}

/* Fade-in animation for card images */
.fade-in-img {
  animation: fadeInImg 1s ease-out forwards;
}

@keyframes fadeInImg {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* Shine Animation */
@keyframes shine {
  0% {
    left: -100%;
    opacity: 0;
  }
  20% {
    left: 100%;
    opacity: 0.5;
  }
  100% {
    left: 100%;
    opacity: 0;
  }
}

.shine-effect {
  position: relative;
  overflow: hidden;
}

.shine-effect::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -100%;
  width: 50px;
  height: 200%;
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(20deg);
  animation: shine 3s infinite linear;
  pointer-events: none;
}

/* Premium Editor Content Styles for Gallery and Split Sections */
.premium-img-grid figure.image,
.premium-split-section figure.image {
  border-radius: 1rem !important;
  overflow: hidden !important;
  margin: 1rem 0 !important;
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1) !important;
  transition: all 0.5s ease-in-out !important;
}

.premium-img-grid figure.image img,
.premium-split-section figure.image img {
  border-radius: 1rem !important;
  object-fit: cover !important;
  width: 100% !important;
  height: auto !important;
  display: block !important;
}

.premium-img-grid figure.image img {
  aspect-ratio: 4 / 3 !important;
}

.premium-img-grid figure.image:hover {
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25) !important;
}

/* Ensure mobile responsiveness for these custom grids */
@media (max-width: 768px) {
  .premium-img-grid {
    grid-template-columns: 1fr !important;
  }
}
