:root{
  /* Текст и границы */
  --text: #000;
  --text-muted: #9ca3af;
  --border: #ececec; /* базовый серый (все линии/бордеры) */

  /* Акцент */
  --green: #10b981;
  --green-light: #34d399;

  /* Шапка и геро-секции */
  --header-h: 64px;
  --hero-h: 70vh;

  /* Нижняя горизонтальная линия */
  --hline-color: var(--border);
  --hline-w: 100%;
  --hline-y: 20px;
}

/* =========================================================
   BASE / RESET
   ========================================================= */
*{ box-sizing: border-box; }
html, body{ margin:0; padding:0; }
body{
  font-family: "Annek Latin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background:#fff; 
  color:#111; 
  line-height:1.5;

  /* Только нижняя горизонтальная линия */
  background-image: linear-gradient(var(--hline-color), var(--hline-color));
  background-repeat: no-repeat;
  background-size: var(--hline-w) 1px;
  background-position: 50% calc(100% - var(--hline-y));
  background-attachment: fixed;
}

/* Контейнер по ширине */
.container{ max-width:1200px; margin:0 auto; padding:0 20px; }

/* =========================================================
   TOP LOADING LINE (как на GitHub)
   ========================================================= */
.top-loader{
  position:fixed; left:0; top:0; width:100%; height:3px;
  background:transparent; opacity:0; transition:opacity .2s ease;
  z-index:9999; pointer-events:none; overflow:hidden;
}
.top-loader.is-active{ opacity:1; }
.top-loader.is-active::after{
  content:""; position:absolute; left:-30%; top:0; height:100%; width:30%;
  background: linear-gradient(to right, transparent, var(--green-light), var(--green));
  animation: loader-run .6s linear infinite;
}
@keyframes loader-run{ 0%{left:-30%} 100%{left:100%} }
@media (prefers-reduced-motion: reduce){
  .top-loader.is-active::after{
    animation: loader-run .9s linear 0s 3 forwards;
  }
}

/* =========================================================
   HEADER & MENU
   ========================================================= */
.header{
  position:sticky; top:0; z-index:10; background:#fff;
  border-bottom:1px solid var(--border); min-height: var(--header-h);
  display:flex; align-items:center;
}
.header .bar{
  display:grid; grid-template-columns: auto 1fr auto; align-items:center; gap:16px;
  max-width:1200px; margin:0 auto; padding:10px 20px;
  width:100%;
  height:100%;
  min-height: var(--header-h);
}
.menu{ display:flex; gap:28px; justify-content:center; align-items:center; height:100%; }
.menu a{
  color:var(--text); text-decoration:none; font-weight:600;
  text-transform:uppercase; letter-spacing:.08em;
  position:relative; padding:0; line-height:1;
  transition:color .25s ease; display:flex; align-items:center;
}
.menu a::after{
  content:""; position:absolute; left:0; bottom:-25px; width:0; height:2px;
  background:var(--text); transition:width .25s ease, background-color .25s ease;
}
.menu a:hover{ color:var(--text-muted); }
.menu a:hover::after, .menu a.active::after{ width:100%; background:var(--text-muted); }
.logo{ font-size:20px; font-weight:700; color:var(--text); text-decoration:none; letter-spacing:-.02em; justify-self:flex-end; }
.logo:hover{ color:var(--text-muted); }
.auth-links{ display:flex; gap:20px; justify-content:flex-start; align-items:center; height:100%; order:-1; }
.auth-links a{
  color:var(--text); text-decoration:none; font-weight:600;
  font-size:14px; text-transform:none; letter-spacing:0;
  transition:color .25s ease; display:flex; align-items:center;
  padding:6px 0;
  white-space:nowrap;
  position:relative;
}
.auth-links a::after{
  content:""; position:absolute; left:0; bottom:0; width:0; height:2px;
  background:var(--text); transition:width .25s ease;
}
.auth-links a:hover{ color:var(--text-muted); }
.auth-links a:hover::after, .auth-links a.active::after{ width:100%; background:var(--text-muted); }

/* Profile Dropdown Menu */
.profile-dropdown{
  position:relative;
  display:inline-block;
}
.profile-dropdown-toggle{
  color:var(--text);
  text-decoration:none;
  font-weight:600;
  font-size:14px;
  text-transform:none;
  letter-spacing:0;
  transition:color .25s ease;
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 0;
  white-space:nowrap;
  position:relative;
  background:none;
  border:none;
  cursor:pointer;
  font-family:inherit;
}
.profile-dropdown-toggle::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:0;
  height:2px;
  background:var(--text);
  transition:width .25s ease;
}
.profile-dropdown-toggle:hover{
  color:var(--text-muted);
}
.profile-dropdown-toggle:hover::after,
.profile-dropdown-toggle[aria-expanded="true"]::after{
  width:100%;
  background:var(--text-muted);
}
.profile-dropdown-toggle svg{
  transition:transform .2s ease;
  flex-shrink:0;
}
.profile-dropdown-toggle[aria-expanded="true"] svg{
  transform:rotate(180deg);
}
.profile-dropdown-menu{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  min-width:220px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:8px;
  box-shadow:0 4px 12px rgba(0,0,0,.1);
  opacity:0;
  visibility:hidden;
  transform:translateY(-8px);
  transition:opacity .2s ease,transform .2s ease,visibility .2s ease;
  z-index:1000;
  padding:8px 0;
  margin:0;
}
.profile-dropdown-menu.is-open{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}
.profile-dropdown-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 16px;
  color:var(--text);
  text-decoration:none;
  font-size:14px;
  font-weight:500;
  transition:background-color .15s ease,color .15s ease;
  border:none;
  background:none;
  width:100%;
  text-align:left;
}
.profile-dropdown-item:hover{
  background-color:#f6f8fa;
  color:var(--text);
}
.profile-dropdown-item svg{
  width:16px;
  height:16px;
  flex-shrink:0;
  opacity:.8;
}
.profile-dropdown-divider{
  height:1px;
  background:var(--border);
  margin:8px 0;
}

/* =========================================================
   LAYOUT SECTIONS
   ========================================================= */
.split-band{
  display:grid; grid-template-columns:1fr 1fr;
  min-height: var(--hero-h);
  width:100%; overflow:hidden; background:#fff;
}
.split-band .side{ display:flex; align-items:center; justify-content:center; }
.split-band .side.text{ padding:40px 30px; }
.split-band .side.image{ padding:0; }
.split-band .side.image img{
  width:100%; height:100%; object-fit:cover; display:block; border-radius:.24px;
}

/* Двухколоночный контент-блок */
.section{ margin:30px 0 50px; background:#fff; }
.two-columns{ display:grid; grid-template-columns:1fr 1fr; gap:0; }
.col{ padding:20px; }
.col figure{ margin:0; }
.col figure img{ display:block; width:100%; height: auto; border:1px solid var(--border); border-radius:.24px; }

/* Медленный зум картинок по ховеру */
.split-band .side.image,
.two-columns .col figure{ overflow:hidden; }
.split-band .side.image img,
.two-columns .col figure img{
  transform-origin:center center; transition: transform .9s ease; will-change: transform;
}
.split-band .side.image:hover img,
.split-band .side.image:focus-within img,
.two-columns .col figure:hover img,
.two-columns .col figure:focus-within img{
  transform: scale(1.06);
}

/* =========================================================
   CONTACT
   ========================================================= */
.contact-hero{ background:#f7f7f7; padding:60px 0 80px; position:relative; }
.contact-hero .wrap{ max-width:900px; margin:0 auto; padding:0 20px; position:relative; z-index:2; }
.contact-hero h1{ font-size:48px; margin:0 0 12px; }
.contact-hero p.lead{ color:#333; margin:0 0 28px; }

/* =========================================================
   MODERN HOME
   ========================================================= */
.hero-modern{
  background: radial-gradient(1000px 500px at 10% -10%, #e6fff5 10%, transparent 60%),
              radial-gradient(800px 400px at 100% 0%, #eef2ff 10%, transparent 60%),
              #ffffff;
  padding: 60px 0 0;
  border-bottom: 1px solid var(--border);
}
.hero-inner{
  max-width: 1200px; margin: 0 auto; padding: 0 20px 40px;
  display: grid; grid-template-columns: 1fr; gap: 28px;
}
.hero-content{ padding: 10px 0; }
.hero-title{ font-size: 56px; line-height:1.05; margin:0 0 12px; letter-spacing:-.02em; }
.hero-subtitle{ font-size: 18px; color:#374151; margin:0 0 22px; max-width: 56ch; }
.hero-actions{ display:flex; gap:12px; flex-wrap:wrap; }
.hero-art img{ width:100%; height:auto; border-radius:16px; border:1px solid var(--border); }

/* Hero video full width */
.hero-video-fullwidth{ position:relative; width:100%; padding-top:30%; overflow:hidden; background:#000; }
.hero-video-fullwidth video{ position:absolute; top:0; left:0; width:100%; height:100%; object-fit:cover; border:none; }

/* removed custom .btn styles in favor of existing .gh-btn */

.features-modern{ background:#fff; padding: 48px 0 56px; }
.features-modern .wrap{ max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.features-modern h2{ font-size:32px; margin:0 0 18px; }
.features-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap:16px; }
.card{ background:#fff; border:1px solid var(--border); border-radius:14px; padding:18px; display:flex; flex-direction:column; }
.card h3{ margin:0 0 8px; font-size:18px; }
.card p{ margin:0 0 16px; color:#374151; flex:1; }
.card .gh-btn{ align-self:flex-start; }

.cta-band{ background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%); border-top:1px solid var(--border); padding: 48px 0; text-align:center; }
.cta-band .wrap{ max-width: 900px; margin: 0 auto; padding: 0 20px; }
.cta-band h2{ margin: 0 0 6px; font-size:28px; }
.cta-band p{ margin: 0 0 18px; color:#374151; }

/* Video Section */
.video-section{ background:#fff; padding: 48px 0 56px; border-top:1px solid var(--border); }
.video-section .wrap{ max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.video-section h2{ font-size:32px; margin:0 0 20px; }
.video-player-wide{ position:relative; width:100%; padding-top:25%; border-radius:12px; overflow:hidden; border:1px solid var(--border); box-shadow:0 4px 12px rgba(0,0,0,.08); background:#000; }
.video-player-wide iframe{ position:absolute; top:0; left:0; width:100%; height:100%; border:none; }
.video-actions{ margin-top:20px; text-align:right; }

/* =========================================================
   FORM FIELDS
   ========================================================= */
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
label{ display:block; font-weight:600; margin:16px 0 6px; }
small.muted{ color:#6b7280; font-weight:400; margin-left:6px; }

input[type="text"], input[type="email"], textarea{
  width:100%; padding:14px 18px;
  border:2px solid #fff;
  background:#fff;
  border-radius:9999px; outline:none;
  transition: border-color .25s ease, background-color .25s ease;
}
textarea{ border-radius:20px; min-height:160px; resize:vertical; }

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus{
  background:#fff;
  border-color: var(--border);
  box-shadow:none;
}

input[type="password"] {
  width:100%; padding:14px 18px;
  border:2px solid #fff;
  background:#fff;
  border-radius:9999px; outline:none;
  transition: border-color .25s ease, background-color .25s ease;
}

input[type="password"]:focus {
  background:#fff;
  border-color: var(--border);
  box-shadow:none;
}

input::placeholder, textarea::placeholder{ color:#9ca3af; }

/* File Upload */
.file-upload-area{
  border:2px dashed var(--border);
  border-radius:12px;
  padding:32px;
  background:#fafafa;
  cursor:pointer;
  transition:all .25s ease;
  position:relative;
}
.file-upload-area:hover{
  border-color:#9ca3af;
  background:#f6f8fa;
}
.file-upload-area.drag-over{
  border-color:var(--text);
  background:#f0f4ff;
}
.file-upload-content{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  pointer-events:none;
}
.file-upload-content svg{
  color:var(--text-muted);
  opacity:.6;
}
.file-upload-text{
  color:var(--text);
  font-size:16px;
  margin:0;
}
.file-upload-link{
  color:var(--text);
  text-decoration:underline;
  font-weight:600;
  pointer-events:auto;
}
.file-upload-hint{
  color:var(--text-muted);
  font-size:13px;
  margin:0;
}
.file-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.file-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:8px;
}
.file-icon{
  font-size:20px;
  flex-shrink:0;
}
.file-info{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}
.file-name{
  font-size:14px;
  color:var(--text);
  font-weight:500;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.file-size{
  font-size:12px;
  color:var(--text-muted);
}
.file-remove{
  background:none;
  border:none;
  color:var(--text-muted);
  font-size:24px;
  line-height:1;
  cursor:pointer;
  padding:0;
  width:24px;
  height:24px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:4px;
  transition:all .2s ease;
  flex-shrink:0;
}
.file-remove:hover{
  background:#fee;
  color:#dc2626;
}

/* Form Messages */
.form-message{
  margin-top:16px;
  padding:12px 16px;
  border-radius:8px;
  font-size:14px;
}
.form-message.success{
  background:#d1fae5;
  color:#065f46;
  border:1px solid #6ee7b7;
}
.form-message.error{
  background:#fee2e2;
  color:#991b1b;
  border:1px solid #fca5a5;
}
.form-message.info{
  background:#dbeafe;
  color:#1e40af;
  border:1px solid #93c5fd;
}


/* GitHub-like кнопка */




/* ========================
   button)
   ======================== */

/* GitHub-like pill button */
:root{
  --gh-text:#24292f;
  --gh-border:#d0d7de;
  --gh-bg:#ffffff;
  --gh-bg-hover:#f6f8fa;
  --gh-bg-active:#eef1f4;
  --gh-ring:#0969da; /* focus ring */
}

.gh-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 14px;            /* comfy size */
  font:600 14px/1 "Annek Latin", system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  color:var(--gh-text);
  background:var(--gh-bg);
  border:1px solid var(--gh-border);
  border-radius:9999px;         /* pill */
  box-shadow:0 1px 0 rgba(27,31,36,.04);
  cursor:pointer;
  text-decoration:none;
  transition:background-color .15s ease,border-color .15s ease,
             box-shadow .15s ease,transform .05s ease;
}

.gh-btn:hover{ background:var(--gh-bg-hover); }
.gh-btn:active{
  background:var(--gh-bg-active);
  transform:translateY(1px);
  box-shadow:inset 0 1px 0 rgba(27,31,36,.12);
}
.gh-btn:focus-visible{
  outline:none;
  box-shadow:0 0 0 3px rgba(9,105,218,.28), 0 1px 0 rgba(27,31,36,.04);
}

.gh-btn .caret{
  width:12px; height:12px;
  margin-left:2px;
  flex-shrink:0;
  opacity:.8;
}

/* Caret visibility + rotation when "open" */
.gh-btn .caret {
  display: inline-block;
  transition: transform .15s ease;
}

.gh-btn.gh-btn--no-caret .caret {   /* hide caret */
  display: none;
}

.gh-btn[aria-expanded="true"] .caret {  /* rotate when "open" */
  transform: rotate(180deg);
}


/* =========================================================
   FOOTER
   ========================================================= */
html, body {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.footer {
  margin-top: auto;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: #C4C4C4;
  text-decoration: none;
  font-size: 14px;
  transition: color .25s ease;
}

.footer-links a:hover {
  color: #9CD4FF;
}

.footer .copy {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (prefers-reduced-motion: reduce){
  .split-band .side.image img,
  .two-columns .col figure img{
    transition: none; transform: none !important;
  }
}
@media (max-width:900px){
  .header .bar{
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    gap:12px;
    padding:12px 20px;
  }
  .menu{
    justify-content:center;
    flex-wrap:wrap;
    gap:16px;
    order:2;
  }
  .logo{
    justify-self:center;
    order:3;
  }
  .auth-links{
    justify-content:center;
    order:1;
  }
  .split-band, .two-columns{ grid-template-columns:1fr; }
  .split-band{ min-height:auto; }
  .split-band .side.text{ padding:24px 20px; }
  .form-grid{ grid-template-columns:1fr; }
  .contact-hero h1{ font-size:36px; }
  .hero-inner{ grid-template-columns:1fr; }
  .hero-title{ font-size:40px; }
  .features-grid{ grid-template-columns: 1fr 1fr; }
  .gallery-grid{ grid-template-columns: 1fr; gap:16px; }
  .video-player-wide{ padding-top:40%; }
}

@media (max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}






.video-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
}
.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Optional: adjust for smaller screens */
@media (max-width: 900px) {
  .split-band {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   LIVE COMMENTS SECTION
   ========================================================= */
.comments-section {
  background: #fff;
  padding: 60px 0 80px;
  border-top: 1px solid var(--border);
}

.comments-section .wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

.comments-section h2 {
  font-size: 36px;
  margin: 0 0 12px;
}

.comments-section .lead {
  color: #333;
  margin: 0 0 32px;
}

/* Comment Form */
.comment-form {
  margin-bottom: 40px;
}

.comment-input-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-input-group input[type="text"] {
  border-radius: 9999px;
}

.comment-input-group textarea {
  border-radius: 20px;
  min-height: 120px;
  resize: vertical;
}

.comment-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.char-count {
  font-size: 14px;
  color: var(--text-muted);
}

/* Comments Container */
.comments-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.no-comments {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-style: italic;
}

/* Individual Comment */
.comment {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  animation: fadeInUp 0.3s ease-out;
  transition: box-shadow 0.2s ease;
}

.comment:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  overflow: hidden;
}

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

.comment-avatar-default {
  width: 40px;
  height: 40px;
  color: var(--text-muted);
}

.comment-author-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.comment-author {
  font-weight: 600;
  color: var(--text);
  font-size: 16px;
}

.comment-date {
  font-size: 13px;
  color: var(--text-muted);
}

.comment-body {
  color: #333;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Empty state */
.no-comments {
  display: block;
}

.comments-container.has-comments .no-comments {
  display: none;
}

/* Comment Login Prompt */
.comment-login-prompt {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  margin-bottom: 32px;
}

.comment-login-prompt p {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 15px;
}

.comment-login-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 600px) {
  .comments-section h2 {
    font-size: 28px;
  }
  
  .comment {
    padding: 16px;
  }
  
  .comment-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .comment-actions button {
    width: 100%;
  }
}

/* =========================================================
   SERVICES GALLERY - APPLE STYLE
   ========================================================= */
.services-gallery-section {
  background: #fff;
  padding: 60px 0 80px;
  border-top: 1px solid var(--border);
}

.services-gallery-section .wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.services-gallery-section h2 {
  font-size: 48px;
  margin: 0 0 12px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.gallery-subtitle {
  color: var(--text-muted);
  font-size: 18px;
  margin: 0 0 48px;
}

/* Apple-style Gallery Grid */
.apple-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  padding: 0;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  background: #f5f5f7;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.gallery-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

/* Modal Lightbox - Apple Style */
.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              visibility 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  isolation: isolate;
}

.gallery-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  transition: background 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
              backdrop-filter 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: background;
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(40px)) {
  .modal-backdrop {
    background: rgba(0, 0, 0, 0.92);
  }
}

.gallery-modal.is-open .modal-backdrop {
  background: rgba(0, 0, 0, 0.88);
}

@supports not (backdrop-filter: blur(40px)) {
  .gallery-modal.is-open .modal-backdrop {
    background: rgba(0, 0, 0, 0.95);
  }
}

/* Modal Info Panel */
.modal-info-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  padding: 40px 32px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  z-index: 10000;
}

.gallery-modal.is-open .modal-info-panel {
  opacity: 1;
  transform: translateX(0);
}

.modal-info-title {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.modal-info-description {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 0 24px;
  line-height: 1.6;
}

.modal-info-counter {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 1024px) {
  .modal-content {
    right: 0;
    max-width: 100vw;
    padding: 80px 20px 20px;
  }
  
  .modal-close {
    right: 20px;
  }
  
  .modal-info-panel {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 32px;
    transform: translateY(100%);
    max-height: 40vh;
    overflow-y: auto;
  }
  
  .gallery-modal.is-open .modal-info-panel {
    transform: translateY(0);
  }
}

.modal-image-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal-content img {
  max-width: 100%;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 
              0 0 0 1px rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.92);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
  pointer-events: auto;
  position: absolute;
  top: 50%;
  left: 50%;
}

.gallery-modal.is-open .modal-content img {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.modal-image-slide {
  opacity: 0 !important;
  pointer-events: none;
  display: none;
}

.modal-content img.slide-out-left {
  animation: slideOutLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.modal-content img.slide-out-right {
  animation: slideOutRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.modal-content img.slide-in-left {
  animation: slideInLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.modal-content img.slide-in-right {
  animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideOutLeft {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateX(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9) translateX(-100px);
  }
}

@keyframes slideOutRight {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateX(0);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9) translateX(100px);
  }
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9) translateX(100px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateX(0);
  }
}

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9) translateX(-100px);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateX(0);
  }
}

/* Close Button - Arrow Style */
.modal-close {
  position: fixed;
  top: 20px;
  right: 340px;
  z-index: 10001;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  color: transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: auto;
  padding: 0;
}

.gallery-modal.is-open .modal-close {
  opacity: 1;
}

.modal-close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
  border-radius: 4px;
}

.modal-close:hover {
  transform: scale(1.1);
}

.modal-close:active {
  transform: scale(0.95);
}

.modal-close svg {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6)) 
          drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
  transition: filter 0.2s ease;
}

.modal-close:hover svg {
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.7)) 
          drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* Navigation Arrows */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  color: transparent;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  pointer-events: auto;
  padding: 0;
}

.modal-nav:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 4px;
  border-radius: 4px;
}

.gallery-modal.is-open .modal-nav {
  opacity: 1;
}

.modal-nav:hover {
  transform: translateY(-50%) scale(1.1);
}

.modal-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.modal-nav svg {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6)) 
          drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4));
  transition: filter 0.2s ease;
}

.modal-nav:hover svg {
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.7)) 
          drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.modal-nav-prev {
  left: 20px;
}

.modal-nav-next {
  right: 20px;
}


.modal-nav:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

.modal-nav:disabled svg {
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.3));
}

.modal-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 320px;
  bottom: 0;
  z-index: 1;
  max-width: calc(100vw - 320px);
  max-height: 100vh;
  width: auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 20px;
  pointer-events: none;
}

/* Responsive Design */
@media (max-width: 900px) {
  .services-gallery-section h2 {
    font-size: 36px;
  }
  
  .apple-gallery {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
  }
  
  .gallery-item {
    border-radius: 10px;
  }
  
  .modal-nav {
    width: 40px;
    height: 40px;
  }
  
  .modal-nav-prev {
    left: 10px;
  }
  
  .modal-nav-next {
    right: 10px;
  }
  
  .modal-close {
    top: 10px;
    right: 10px;
    width: 48px;
    height: 48px;
  }
  
  .modal-close svg {
    width: 28px;
    height: 28px;
  }
  
  .modal-content {
    padding: 60px 10px 10px;
    max-width: 95vw;
  }
  
  .modal-info-panel {
    padding: 20px 24px;
  }
}

@media (max-width: 600px) {
  .services-gallery-section {
    padding: 40px 0 60px;
  }
  
  .services-gallery-section h2 {
    font-size: 28px;
  }
  
  .gallery-subtitle {
    font-size: 16px;
    margin-bottom: 32px;
  }
  
  .apple-gallery {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .gallery-item:hover {
    transform: translateY(-4px) scale(1.01);
  }
  
  .modal-nav {
    display: none;
  }
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .gallery-item,
  .gallery-item img,
  .gallery-item-overlay,
  .gallery-modal,
  .modal-content img,
  .modal-close,
  .modal-nav,
  .modal-backdrop,
  .modal-image-container {
    transition: none;
    animation: none !important;
  }
  
  .gallery-item:hover {
    transform: none;
  }
  
  .gallery-item:hover img {
    transform: none;
  }
  
  .modal-content img.slide-out-left,
  .modal-content img.slide-out-right,
  .modal-content img.slide-in-left,
  .modal-content img.slide-in-right {
    animation: none !important;
  }
}

/* Performance optimizations */
@media (max-width: 768px) {
  .modal-backdrop {
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
  }
}

/* =========================================================
   AUTH PAGES (LOGIN/REGISTER)
   ========================================================= */
.auth-section {
  background: #fff;
  padding: 60px 0 80px;
  border-top: 1px solid var(--border);
}

.auth-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 20px;
}

.auth-section h2 {
  font-size: 32px;
  margin: 0 0 8px;
  text-align: center;
}

.auth-subtitle {
  color: var(--text-muted);
  text-align: center;
  margin: 0 0 32px;
  font-size: 15px;
}

/* Social Auth Buttons */
.social-auth {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  border: 2px solid var(--border);
  border-radius: 9999px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: "Annek Latin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.social-btn:hover {
  background: #f9fafb;
  border-color: #d0d7de;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.social-btn:active {
  transform: translateY(0);
}

.social-btn svg {
  flex-shrink: 0;
}

.social-btn-apple {
  background: #000;
  color: #fff;
  border-color: #000;
}

.social-btn-apple:hover {
  background: #1a1a1a;
  border-color: #1a1a1a;
  color: #fff;
}

.social-btn-google {
  background: #fff;
  border-color: #dadce0;
}

.social-btn-google:hover {
  background: #f8f9fa;
  border-color: #dadce0;
}

/* Auth Divider */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.auth-divider span {
  padding: 0 16px;
}

/* Auth Form */
.auth-form {
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin: 0 0 8px;
  font-size: 14px;
}

.password-hint {
  display: block;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 400;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 14px;
  cursor: pointer;
  margin: 0;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
  accent-color: var(--text);
}

.checkbox-label a {
  color: var(--text);
  text-decoration: underline;
}

.checkbox-label a:hover {
  color: var(--text-muted);
}

.forgot-link {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.25s ease;
}

.forgot-link:hover {
  color: var(--text-muted);
  text-decoration: underline;
}

.auth-submit-btn {
  width: 100%;
  justify-content: center;
  padding: 12px 20px;
  font-size: 15px;
  margin-bottom: 16px;
}

.verification-step {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding-top: 16px;
  display: none;
  flex-direction: column;
  gap: 16px;
}

.verification-step .form-group {
  margin-bottom: 0;
}

.verification-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.verification-actions .gh-btn {
  flex: 1 1 240px;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  font: 500 15px/1 "Annek Latin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 9999px;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ghost-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--text-muted);
  color: var(--text-muted);
}

.ghost-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.28);
}

.auth-footer-text {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.auth-footer-text a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.25s ease;
}

.auth-footer-text a:hover {
  color: var(--text-muted);
  text-decoration: underline;
}

/* Responsive Auth */
@media (max-width: 600px) {
  .auth-section {
    padding: 40px 0 60px;
  }
  
  .auth-section h2 {
    font-size: 28px;
  }
  
  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .social-btn {
    padding: 12px 18px;
    font-size: 14px;
  }
}

/* =========================================================
   PROFILE PAGE
   ========================================================= */
.profile-section {
  background: #fff;
  padding: 60px 0 80px;
  border-top: 1px solid var(--border);
}

.profile-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 20px;
}

.profile-section h1 {
  font-size: 36px;
  margin: 0 0 8px;
}

.profile-subtitle {
  color: var(--text-muted);
  margin: 0 0 40px;
  font-size: 15px;
}

.profile-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.profile-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
}

.profile-card h3 {
  font-size: 20px;
  margin: 0 0 20px;
  font-weight: 600;
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.profile-avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f5f5f7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  overflow: hidden;
  position: relative;
}

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

.profile-avatar #profile-avatar-img {
  display: none;
}

.profile-avatar #profile-avatar-img[src] {
  display: block;
}

.avatar-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: "Annek Latin", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.avatar-upload-btn:hover {
  background: #f9fafb;
  border-color: var(--text-muted);
}

.profile-info h2 {
  font-size: 24px;
  margin: 0 0 4px;
  font-weight: 600;
}

.profile-info p {
  color: var(--text-muted);
  margin: 0;
  font-size: 15px;
}

.email-verification-status {
  margin-top: 12px;
}

.verification-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
}

.verification-badge-verified {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.verification-badge-unverified {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.verification-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.verification-info {
  color: var(--text-muted);
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
}

.verification-code-section {
  margin-top: 20px;
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-form .form-group {
  margin-bottom: 0;
}

.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form input[type="tel"],
.profile-form input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  background: #fff;
  border-radius: 8px;
  outline: none;
  transition: border-color .25s ease;
  font-size: 15px;
}

.profile-form input:focus {
  border-color: var(--text);
}

.profile-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.danger-btn {
  background: #fff;
  border-color: #dc2626;
  color: #dc2626;
}

.danger-btn:hover {
  background: #fee2e2;
  border-color: #dc2626;
  color: #991b1b;
}

@media (max-width: 600px) {
  .profile-section {
    padding: 40px 0 60px;
  }
  
  .profile-section h1 {
    font-size: 28px;
  }
  
  .profile-header {
    flex-direction: column;
    text-align: center;
  }
  
  .profile-actions {
    flex-direction: column;
  }
  
  .profile-actions button {
    width: 100%;
  }
}
