/*
Theme Name: Freelancer Studio
Theme URI: https://yoursite.com
Author: Your Name
Author URI: https://yoursite.com
Description: A modern freelancer portfolio theme with sidebar navigation and contextual article panel.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: freelancer-studio
Tags: portfolio, freelancer, custom-menu, custom-sidebar, blog
*/

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-outer:      #7ecfc0;
  --bg-app:        #f5f0ea;
  --sidebar-bg:    #1a1a1a;
  --sidebar-icon:  #888;
  --sidebar-icon-active: #fff;
  --card-pink:     #f4a0a0;
  --card-orange:   #f5c48a;
  --card-purple:   #c5b8e8;
  --card-tan:      #e8d5b0;
  --card-blue:     #a8c8e8;
  --right-bg:      #ffffff;
  --text-main:     #1a1a1a;
  --text-muted:    #888888;
  --radius-card:   16px;
  --radius-pill:   100px;
  --font-sans:     'DM Sans', sans-serif;
  --font-serif:    'DM Serif Display', serif;
}

html, body {
  height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-outer);
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============================================================
   LAYOUT WRAPPER
   ============================================================ */
.app-wrapper {
  display: flex;
  width: 100%;
  min-height: 100vh;
  background: var(--bg-app);
}

/* ============================================================
   LEFT SIDEBAR
   ============================================================ */
.sidebar-nav {
  width: 64px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 16px;
  gap: 6px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow: hidden;
  transition: width 0.3s cubic-bezier(.4,0,.2,1);
}

.sidebar-nav:hover,
.sidebar-nav.expanded {
  width: 200px;
}

.sidebar-logo {
  width: 36px; height: 36px;
  background: #fff;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform 0.2s;
}
.sidebar-logo:hover { transform: scale(1.05); }
.sidebar-logo svg { width: 20px; height: 20px; }

.sidebar-menu {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 13px;
  color: var(--sidebar-icon);
  font-size: 13px;
  font-weight: 500;
  border-radius: 10px;
  margin: 0 6px;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
  overflow: hidden;
  position: relative;
}
.sidebar-link:hover {
  background: rgba(255,255,255,0.1);
  color: var(--sidebar-icon-active);
}
.sidebar-link.current-menu-item,
.sidebar-link.active {
  background: rgba(255,255,255,0.15);
  color: var(--sidebar-icon-active);
}
.sidebar-link svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sidebar-link-label {
  opacity: 0;
  transition: opacity 0.2s 0.05s;
  font-size: 13px;
}
.sidebar-nav:hover .sidebar-link-label,
.sidebar-nav.expanded .sidebar-link-label {
  opacity: 1;
}

.sidebar-spacer { flex: 1; }

.sidebar-footer {
  width: 100%;
  padding: 0 6px;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.18s;
  overflow: hidden;
}
.sidebar-profile:hover { background: rgba(255,255,255,0.1); }
.sidebar-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, #c5b8e8, #f4a0a0);
  overflow: hidden; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: #fff;
}
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-profile-name {
  font-size: 12px; font-weight: 600; color: #fff;
  opacity: 0; transition: opacity 0.2s 0.05s; white-space: nowrap;
}
.sidebar-nav:hover .sidebar-profile-name,
.sidebar-nav.expanded .sidebar-profile-name { opacity: 1; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  flex: 1;
  margin-left: 64px;
  margin-right: 280px;
  min-height: 100vh;
  padding: 40px 36px;
  max-width: calc(100vw - 64px - 280px);
}

/* ============================================================
   RIGHT PANEL
   ============================================================ */
.right-panel {
  width: 280px;
  background: var(--right-bg);
  border-left: 1px solid rgba(0,0,0,0.06);
  position: fixed;
  top: 0; right: 0; bottom: 0;
  overflow-y: auto;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.right-panel::-webkit-scrollbar { width: 4px; }
.right-panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 4px; }

.panel-header {
  display: flex; justify-content: space-between; align-items: center;
}
.panel-header-title {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
}
.panel-header svg {
  width: 16px; height: 16px; color: var(--text-muted); cursor: pointer;
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* Article cards in right panel */
.article-card {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  background: var(--bg-app);
}
.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.article-card-thumb {
  height: 80px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.article-card-body { padding: 12px; }
.article-card-tag {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); margin-bottom: 4px;
}
.article-card-title {
  font-size: 12px; font-weight: 600; color: var(--text-main);
  line-height: 1.4;
}
.article-card-meta {
  font-size: 11px; color: var(--text-muted); margin-top: 6px;
}

/* ============================================================
   HERO / PAGE TITLE
   ============================================================ */
.page-hero { margin-bottom: 32px; }
.page-hero .eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px;
}
.page-hero h1 {
  font-family: var(--font-serif);
  font-size: 42px;
  line-height: 1.1;
  color: var(--text-main);
  max-width: 420px;
}
.page-hero .subtitle {
  font-size: 15px; color: var(--text-muted);
  margin-top: 12px; max-width: 380px; line-height: 1.6;
}

/* ============================================================
   SERVICE CARDS (Homepage)
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.service-card {
  border-radius: var(--radius-card);
  padding: 24px;
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(.4,0,.2,1), box-shadow 0.22s;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s;
}
.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.service-card:hover::after { background: rgba(255,255,255,0.08); }

.service-card.pink   { background: var(--card-pink); }
.service-card.orange { background: var(--card-orange); }
.service-card.purple { background: var(--card-purple); }
.service-card.tan    { background: var(--card-tan); }

.card-icon {
  width: 40px; height: 40px;
  background: rgba(255,255,255,0.5);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.card-icon svg {
  width: 20px; height: 20px;
  stroke: rgba(0,0,0,0.6); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

.card-label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: rgba(0,0,0,0.45);
  background: rgba(255,255,255,0.5);
  padding: 3px 10px; border-radius: 100px;
  margin-bottom: 10px;
}

.service-card h2 {
  font-size: 18px; font-weight: 700; color: var(--text-main);
  line-height: 1.3; margin-bottom: 8px;
}
.service-card p {
  font-size: 13px; color: rgba(0,0,0,0.55); line-height: 1.5;
  margin-bottom: 16px;
}

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
}
.card-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: rgba(0,0,0,0.6);
  background: rgba(255,255,255,0.55);
  padding: 5px 12px; border-radius: 100px;
  transition: background 0.18s;
}
.service-card:hover .card-cta { background: rgba(255,255,255,0.8); }
.card-cta svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5; }

.card-projects-count {
  font-size: 11px; color: rgba(0,0,0,0.4); font-weight: 500;
}

/* ============================================================
   FILTER TABS
   ============================================================ */
.filter-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px;
}
.filter-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 16px; border-radius: var(--radius-pill);
  font-size: 13px; font-weight: 500;
  background: rgba(255,255,255,0.7); color: var(--text-muted);
  border: 1.5px solid transparent;
  cursor: pointer; transition: all 0.18s;
  text-decoration: none;
}
.filter-tab:hover { background: #fff; color: var(--text-main); }
.filter-tab.active {
  background: var(--text-main); color: #fff; border-color: var(--text-main);
}
.filter-tab svg {
  width: 13px; height: 13px;
  stroke: currentColor; fill: none; stroke-width: 2;
}

/* ============================================================
   PORTFOLIO GRID
   ============================================================ */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.portfolio-item {
  border-radius: var(--radius-card);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  background: #fff;
}
.portfolio-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.portfolio-thumb {
  height: 140px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
}
.portfolio-body { padding: 14px 16px; }
.portfolio-category {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-muted); margin-bottom: 4px;
}
.portfolio-title {
  font-size: 14px; font-weight: 600; color: var(--text-main); line-height: 1.35;
}
.portfolio-meta {
  font-size: 11px; color: var(--text-muted); margin-top: 6px;
}

/* ============================================================
   SECTION LABEL
   ============================================================ */
.section-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
  margin-bottom: 16px;
}

/* ============================================================
   BLOG POSTS
   ============================================================ */
.posts-list { display: flex; flex-direction: column; gap: 12px; }
.post-item {
  background: #fff; border-radius: var(--radius-card);
  padding: 20px; cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
  text-decoration: none; display: block;
}
.post-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.post-meta {
  display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
}
.post-tag {
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.07em; padding: 3px 10px; border-radius: 100px;
}
.post-tag.websites { background: #fde8e8; color: #c05050; }
.post-tag.design   { background: #ede8fd; color: #6050c0; }
.post-tag.gestao   { background: #e8f4fd; color: #3070a0; }
.post-tag.branding { background: #fdf4e8; color: #a07030; }
.post-date { font-size: 11px; color: var(--text-muted); }
.post-title {
  font-size: 16px; font-weight: 600; color: var(--text-main);
  line-height: 1.35; margin-bottom: 6px;
}
.post-excerpt { font-size: 13px; color: var(--text-muted); line-height: 1.55; }

/* ============================================================
   CONTACT / BUDGET FORMS
   ============================================================ */
.form-card {
  background: #fff; border-radius: var(--radius-card);
  padding: 28px; max-width: 520px;
}
.form-card h2 {
  font-family: var(--font-serif);
  font-size: 26px; color: var(--text-main); margin-bottom: 6px;
}
.form-card .form-subtitle {
  font-size: 14px; color: var(--text-muted); margin-bottom: 24px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block; font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted); margin-bottom: 6px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid #e8e0d8; border-radius: 10px;
  font-family: var(--font-sans); font-size: 14px;
  color: var(--text-main); background: var(--bg-app);
  transition: border-color 0.18s, box-shadow 0.18s;
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--text-main);
  box-shadow: 0 0 0 3px rgba(26,26,26,0.08);
}
.form-group textarea { min-height: 100px; resize: vertical; }

.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--text-main); color: #fff;
  padding: 11px 24px; border-radius: var(--radius-pill);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background 0.18s, transform 0.15s;
  border: none; font-family: var(--font-sans);
}
.btn-primary:hover { background: #333; transform: translateY(-1px); }
.btn-primary svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2.5; }

.service-options {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px;
}
.service-option {
  padding: 10px 14px; border-radius: 10px;
  border: 1.5px solid #e8e0d8; cursor: pointer;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  transition: all 0.18s; text-align: center;
  background: var(--bg-app);
}
.service-option:hover,
.service-option.selected {
  border-color: var(--text-main); color: var(--text-main);
  background: #fff;
}

/* ============================================================
   MEETING SCHEDULER
   ============================================================ */
.calendar-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  margin-bottom: 16px;
}
.cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all 0.15s;
}
.cal-day.header { font-size: 10px; font-weight: 600; color: var(--text-muted); cursor: default; }
.cal-day.empty  { cursor: default; }
.cal-day.available:hover { background: var(--bg-app); }
.cal-day.selected { background: var(--text-main); color: #fff; }
.cal-day.today { font-weight: 700; color: var(--text-main); }
.cal-day.past  { color: #ccc; cursor: default; }

.time-slots {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
}
.time-slot {
  padding: 8px; border-radius: 8px;
  border: 1.5px solid #e8e0d8; font-size: 12px; font-weight: 500;
  text-align: center; cursor: pointer; transition: all 0.15s;
  color: var(--text-muted); background: var(--bg-app);
}
.time-slot:hover, .time-slot.selected {
  border-color: var(--text-main); color: var(--text-main); background: #fff;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-hero    { animation: fadeUp 0.45s ease both 0.05s; }
.filter-tabs  { animation: fadeUp 0.45s ease both 0.12s; }
.services-grid,
.portfolio-grid,
.posts-list,
.form-card    { animation: fadeUp 0.45s ease both 0.2s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .right-panel { display: none; }
  .main-content { margin-right: 0; max-width: calc(100vw - 64px); }
}
@media (max-width: 700px) {
  .services-grid,
  .portfolio-grid { grid-template-columns: 1fr; }
  .main-content { padding: 28px 20px; }
}

/* ============================================================
   WORDPRESS ALIGNMENTS
   ============================================================ */
.aligncenter { display: block; margin: 0 auto 1.5em; }
.alignleft   { float: left; margin: 0 1.5em 1em 0; }
.alignright  { float: right; margin: 0 0 1em 1.5em; }
.wp-caption  { max-width: 100%; }
