/* ==========================================================================
   ESES GRUP - Modern Executive Architectural Design System
   Dual Theme System: Slate Charcoal (Dark) & Alabaster Titanium (Light)
   ========================================================================== */

/* DARK THEME (Default) */
:root,
html.dark {
  --bg-main: #171920;
  --bg-card: rgba(30, 34, 44, 0.75);
  --bg-card-hover: rgba(36, 41, 54, 0.9);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.18);
  --border-light: rgba(255, 255, 255, 0.12);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-faint: #475569;

  --preview-overlay: linear-gradient(to top, rgba(23, 27, 35, 0.95) 0%, rgba(23, 27, 35, 0.2) 60%, transparent 100%);
  --preview-bg: #1a1e27;

  --btn-visit-bg: rgba(255, 255, 255, 0.05);
  --btn-visit-color: #f1f5f9;
  --btn-visit-border: rgba(255, 255, 255, 0.08);
  --btn-visit-hover-bg: #ffffff;
  --btn-visit-hover-color: #0f172a;

  --btn-ig-bg: rgba(255, 255, 255, 0.05);
  --btn-ig-color: #cbd5e1;
  --btn-ig-border: rgba(255, 255, 255, 0.08);
  --btn-ig-hover-bg: rgba(255, 255, 255, 0.12);
  --btn-ig-hover-color: #ffffff;

  --badge-bg: rgba(255, 255, 255, 0.08);
  --badge-color: #e2e8f0;
  --badge-border: rgba(255, 255, 255, 0.1);

  --avatar-ring-border: rgba(255, 255, 255, 0.14);
  --avatar-ring-hover: rgba(255, 255, 255, 0.35);

  --grid-line-color: rgba(255, 255, 255, 0.02);
  --logo-filter: none;

  --card-shadow: 0 4px 16px -2px rgba(0, 0, 0, 0.2);
  --card-shadow-hover: 0 8px 24px -4px rgba(0, 0, 0, 0.35);
}

/* LIGHT THEME */
html.light {
  --bg-main: #f5f7fa;
  --bg-card: #ffffff;
  --bg-card-hover: #ffffff;
  
  --border-subtle: #e2e8f0;
  --border-hover: #cbd5e1;
  --border-light: #f1f5f9;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-faint: #94a3b8;

  --preview-overlay: linear-gradient(to top, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.25) 60%, transparent 100%);
  --preview-bg: #e2e8f0;

  --btn-visit-bg: #0f172a;
  --btn-visit-color: #ffffff;
  --btn-visit-border: #0f172a;
  --btn-visit-hover-bg: #1e293b;
  --btn-visit-hover-color: #ffffff;

  --btn-ig-bg: #f1f5f9;
  --btn-ig-color: #334155;
  --btn-ig-border: #e2e8f0;
  --btn-ig-hover-bg: #0f172a;
  --btn-ig-hover-color: #ffffff;

  --badge-bg: #f1f5f9;
  --badge-color: #334155;
  --badge-border: #e2e8f0;

  --avatar-ring-border: #cbd5e1;
  --avatar-ring-hover: #94a3b8;

  --grid-line-color: rgba(0, 0, 0, 0.03);
  --logo-filter: invert(1);

  --card-shadow: 0 2px 8px -2px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.04);
  --card-shadow-hover: 0 8px 20px -4px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Minimalist Background Grid */
.bg-grid-subtle {
  background-image: linear-gradient(to right, var(--grid-line-color) 1px, transparent 1px),
                    linear-gradient(to bottom, var(--grid-line-color) 1px, transparent 1px);
  background-size: 36px 36px;
}

/* Glass Card */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-light);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.3s ease;
}

.glass-panel:hover {
  border-color: var(--border-hover);
  box-shadow: var(--card-shadow-hover);
}

/* Website Card Styles */
.website-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-light);
  box-shadow: var(--card-shadow);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.3s ease;
  min-height: 270px;
  min-width: 0;
}

.website-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  justify-content: center;
  width: min(100%, 1120px);
}

.website-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--card-shadow-hover);
}

.website-card .preview-wrap {
  position: relative;
  width: 100%;
  height: 118px;
  overflow: hidden;
  background-color: var(--preview-bg);
}

.website-card .preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.website-card .preview-overlay {
  position: absolute;
  inset: 0;
  background: var(--preview-overlay);
}

.badge-refined {
  background: var(--badge-bg);
  color: var(--badge-color);
  border: 1px solid var(--badge-border);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
}

.btn-visit {
  background: var(--btn-visit-bg);
  color: var(--btn-visit-color);
  border: 1px solid var(--btn-visit-border);
  padding: 8px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
  width: 100%;
}

.btn-visit:hover {
  background: var(--btn-visit-hover-bg);
  color: var(--btn-visit-hover-color);
  border-color: var(--btn-visit-hover-bg);
}

/* Instagram Card */
.instagram-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  height: 232px;
  min-height: 232px;
  padding: 16px 10px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  box-shadow: var(--card-shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
  text-decoration: none;
  color: inherit;
}

/* High-contrast light presentation */
.text-slate-300,
.text-slate-400,
.text-slate-500,
.text-slate-600,
.text-slate-700,
.text-zinc-400,
.text-zinc-500 {
  color: #000 !important;
}

.instagram-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  box-shadow: var(--card-shadow-hover);
}

.avatar-ring {
  padding: 2px;
  border-radius: 50%;
  border: 1.5px solid var(--avatar-ring-border);
  display: inline-block;
  margin: auto 0 0;
  transition: border-color 0.2s ease;
}

.instagram-card:hover .avatar-ring {
  border-color: var(--avatar-ring-hover);
}

.avatar-img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.instagram-avatar-icon {
  display: grid;
  place-items: center;
  padding: 10px;
  color: #fff;
  background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 52%, #fcb045 100%);
}

.instagram-avatar-icon svg {
  width: 100%;
  height: 100%;
}

.btn-ig-action {
  background: var(--btn-ig-bg);
  color: var(--btn-ig-color);
  border: 1px solid var(--btn-ig-border);
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  transition: all 0.2s ease;
  width: 100%;
  margin-bottom: 5px;
}

.ig-card-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: auto;
}

.ig-card-title {
  margin: 0;
  min-height: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #000;
  overflow-wrap: anywhere;
}

@media (min-width: 1024px) {
  .website-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  .instagram-card {
    height: 206px;
    min-height: 206px;
    padding: 12px 7px 0;
  }

  .avatar-img {
    width: 56px;
    height: 56px;
  }

  .btn-ig-action {
    font-size: 0.62rem;
    padding: 6px 4px;
  }
}

.instagram-card:hover .btn-ig-action {
  background: var(--btn-ig-hover-bg);
  border-color: var(--btn-ig-hover-bg);
  color: var(--btn-ig-hover-color);
}

/* Logo adaptivity in light mode */
.brand-logo-img {
  filter: none !important;
  transition: filter 0.3s ease;
}

/* Subtle Pulse Dot */
.pulse-dot-subtle {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #22c55e;
  display: inline-block;
  box-shadow: 0 0 6px #22c55e;
}

/* Clean Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
