/* =============================================
   Δικηγορικό Γραφείο Μπιρπανάγου - Παπαδόπουλου
   Main Stylesheet
   ============================================= */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:        #8B1A1A;
  --red-light:  #A52020;
  --red-dark:   #6B1212;
  --grey-dark:  #2C2C2C;
  --grey-mid:   #666666;
  --grey-light: #F0EEEE;
  --white:      #FFFFFF;
  --border:     #D8D0D0;
  --font-main:  'Noto Serif', Georgia, serif;
  --font-ui:    'Noto Serif', Georgia, serif;
  --max-width:  1160px;
  --section-pad: 80px 20px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-ui);
  color: var(--grey-dark);
  background: var(--white);
  line-height: 1.7;
}

h1, h2, h3, h4 {
  font-family: var(--font-main);
  line-height: 1.25;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Section Titles --- */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--red);
  margin-bottom: 12px;
}
.section-title span { color: inherit; }
.section-divider {
  width: 50px;
  height: 3px;
  background: var(--red);
  margin-bottom: 40px;
}

/* =============================================
   HEADER / NAV
   ============================================= */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  border-bottom: none;
  transition: background 0.4s, border-color 0.4s, backdrop-filter 0.4s;
}
#header.scrolled {
  background: rgba(48, 30, 30, 0.65);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  transition: height 0.4s;
}
#header.scrolled .nav-inner {
  height: 56px;
}

.nav-logo {
  display: flex;
  align-items: center;
}
.nav-logo img {
  height: 44px;
  width: auto;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 32px;
}
.nav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  border-bottom-color: var(--red);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: rgba(255,255,255,0.8);
  transition: all 0.3s;
}

/* Mobile nav */
.nav-mobile {
  display: none;
  background: rgba(48,30,30,0.96);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 16px 20px 24px;
}
.nav-mobile.open { display: block; }
.nav-mobile ul { list-style: none; }
.nav-mobile ul li { border-bottom: 1px solid var(--border); }
.nav-mobile ul a {
  display: block;
  padding: 14px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nav-mobile ul a:hover { color: var(--white); }

/* =============================================
   HERO
   ============================================= */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 120px 20px 80px;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(107,18,18,0.88) 0%, rgba(20,20,20,0.80) 100%);
  z-index: 1;
}
.hero-bg {
  position: absolute;
  inset: -12%;
  background: url('photos/office/057.jpg') center/cover no-repeat;
  animation: kenBurns 20s ease-out forwards;
  z-index: 0;
}
@keyframes kenBurns {
  from { transform: scale(1.12); }
  to   { transform: scale(1.0); }
}

.hero-content {
  position: relative;
  z-index: 2;
}
.hero-logo {
  opacity: 0;
  animation: fadeIn 2s ease forwards;
  animation-delay: 0.6s;
}
.hero-tagline {
  opacity: 0;
  animation: fadeSlideUp 1.6s ease forwards;
  animation-delay: 1.6s;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-content { position: relative; max-width: 780px; }

.hero-logo {
  width: 100%;
  max-width: 480px;
  margin: 0 auto 36px;
  display: block;
  filter: drop-shadow(0 4px 24px rgba(0,0,0,0.4));
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 18px;
  border-radius: 20px;
  margin-bottom: 28px;
}

.hero-tagline {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--white);
  margin: 20px 0 40px;
  font-family: var(--font-main);
  font-style: italic;
}

/* =============================================
   ABOUT
   ============================================= */
#about {
  padding: var(--section-pad);
  background: var(--white);
  position: relative;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-text p {
  color: var(--grey-mid);
  margin-bottom: 16px;
  font-size: 1.0rem;
  line-height: 1.8;
}
.about-values {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.value-card {
  background: var(--grey-light);
  border-left: 3px solid var(--red);
  padding: 20px 18px;
}
.value-card h4 {
  font-size: 0.95rem;
  font-family: var(--font-main);
  margin-bottom: 6px;
  color: var(--red-dark);
}
.value-card p {
  font-size: 0.85rem;
  color: var(--grey-mid);
  line-height: 1.6;
}

/* =============================================
   PRACTICE AREAS
   ============================================= */
#practice {
  padding: var(--section-pad);
  background: #f4f1f1;
  position: relative;
}
#practice .section-title { color: var(--red); }
#practice .section-title span { color: inherit; }
#practice .section-divider { background: var(--red); }
.practice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
}
.practice-card {
  position: relative;
  min-height: 180px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  cursor: default;
}
.practice-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.15) 60%, transparent 100%);
  transition: background 0.35s;
}
.practice-card:hover::before {
  background: linear-gradient(to top, rgba(107,18,18,0.85) 0%, rgba(0,0,0,0.4) 100%);
}
.practice-card-body {
  position: relative;
  z-index: 1;
  padding: 28px 24px;
  transform: translateY(8px);
  transition: transform 0.3s;
}
.practice-card:hover .practice-card-body {
  transform: translateY(0);
}
.practice-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
  line-height: 1.4;
}
.practice-card p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transform: translateY(6px);
  transition: opacity 0.3s 0.05s, transform 0.3s 0.05s, max-height 0.3s 0.05s;
}
.practice-card:hover p {
  opacity: 1;
  max-height: 6em;
  transform: translateY(0);
}
.practice-card::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  right: -30px;
  bottom: -20px;
  background: url('photos/sign%20transparent%202.png') center/contain no-repeat;
  opacity: 0;
  transition: opacity 0.5s, transform 0.5s;
  transform: scale(0.85);
  pointer-events: none;
  z-index: 1;
}
.practice-card:hover::after {
  opacity: 0.12;
  transform: scale(1);
}

/* =============================================
   TEAM
   ============================================= */
#team {
  padding: var(--section-pad);
  background: var(--white);
  position: relative;
}
.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 28px;
}
.team-card {
  text-align: center;
}
.team-photo {
  width: 100%;
  aspect-ratio: 3/4;
  background: var(--grey-light);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey-mid);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  overflow: hidden;
  position: relative;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(107,18,18,0.45) url('photos/sign%20transparent%202.png') center/45% no-repeat;
  opacity: 0;
  transition: opacity 0.4s;
}
.team-card:hover .team-photo::after {
  opacity: 1;
}
.team-card h3 {
  font-size: 1.0rem;
  color: var(--grey-dark);
  line-height: 1.4;
  margin-bottom: 4px;
}
.team-card .team-title {
  font-size: 0.7rem;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 1em 0;
}
.team-card p {
  font-size: 0.85rem;
  color: var(--grey-mid);
  line-height: 1.6;
  margin: 0;
}
.team-card p:not(.team-title) {
  height: calc(4 * 0.85rem * 1.6);
  overflow: hidden;
}
.team-icons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 1em;
}
.team-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}
.team-icons a:hover {
  background: var(--red);
  color: var(--white);
}
.team-icons svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  overflow: visible;
}

/* =============================================
   NEWS
   ============================================= */
#news {
  padding: var(--section-pad);
  background: #f4f1f1;
  position: relative;
}
#news .section-title { color: var(--red); }
#news .section-title span { color: inherit; }
#news .section-divider { background: var(--red); }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
}
.news-card {
  background: #f4f1f1;
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
  cursor: default;
}
.news-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.news-card:hover { background: var(--white); }
.news-card:hover::before { transform: scaleX(1); }

.news-tag {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}
.news-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--grey-dark);
  line-height: 1.45;
  flex: 1;
}
.news-card p {
  font-size: 0.86rem;
  color: var(--grey-mid);
  line-height: 1.75;
}
.news-date {
  font-size: 0.72rem;
  color: var(--grey-mid);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 8px;
}

/* =============================================
   CONTACT
   ============================================= */
#contact {
  padding: var(--section-pad);
  background: var(--white);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact-map {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  border: 0;
}
.contact-info { }
.contact-item {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
  align-items: flex-start;
}
.contact-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.75;
}
.contact-item h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 4px;
  font-weight: 600;
}
.contact-item p {
  font-size: 0.95rem;
  color: var(--grey-dark);
  line-height: 1.5;
}

/* Contact CTA */
.contact-cta {
  text-align: left;
  margin-top: 40px;
}
.contact-cta-btn {
  display: inline-block;
  background: transparent;
  color: var(--red);
  border: 1px solid var(--red);
  padding: 14px 40px;
  font-size: 0.85rem;
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.contact-cta-btn:hover {
  background: var(--red);
  color: var(--white);
}

/* =============================================
   FOOTER
   ============================================= */
#footer {
  background: var(--grey-dark);
  color: rgba(255,255,255,0.7);
  padding: 50px 20px 28px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-logo {
  height: 40px;
  width: auto;
  margin-bottom: 14px;
}
.footer-brand p {
  font-size: 0.85rem;
  line-height: 1.7;
  max-width: 300px;
}
.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.footer-col ul a:hover { color: var(--red); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 24px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

/* =============================================
   PRACTICE AREA DRAWER
   ============================================= */
#page-wrap {
  transform-origin: left center;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              filter 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}
body.panel-open #page-wrap {
  transform: scale(0.96) translateX(-1.5%);
  filter: brightness(0.4);
  pointer-events: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
}
.modal-overlay.open {
  pointer-events: all;
}

/* clicking the left (dark) area closes — covered by the scaled page-wrap */

.modal-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 34vw;
  min-width: 340px;
  max-width: 480px;
  height: 100%;
  background: rgba(18, 10, 10, 0.6);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-left: 1px solid rgba(255,255,255,0.08);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.34, 1.15, 0.64, 1);
  pointer-events: all;
}
.modal-overlay.open .modal-panel {
  transform: translateX(0);
}

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin: 18px 20px 0 0;
  background: none;
  border: none;
  font-size: 1rem;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  z-index: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--white); }

.modal-header {
  padding: 44px 32px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s 0.25s, transform 0.3s 0.25s;
}
.modal-overlay.open .modal-header {
  opacity: 1;
  transform: translateY(0);
}
.modal-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.modal-header p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

.modal-body {
  padding: 28px 32px 40px;
}
.modal-body h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--red);
  font-weight: 600;
  margin-bottom: 24px;
  opacity: 0;
  transition: opacity 0.3s 0.35s;
}
.modal-overlay.open .modal-body h4 {
  opacity: 1;
}

.modal-cases {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.modal-case-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.35s, transform 0.35s;
}
.modal-case-item:last-child { border-bottom: none; }
.modal-overlay.open .modal-case-item:nth-child(1) { opacity:1; transform:none; transition-delay: 0.38s; }
.modal-overlay.open .modal-case-item:nth-child(2) { opacity:1; transform:none; transition-delay: 0.50s; }
.modal-overlay.open .modal-case-item:nth-child(3) { opacity:1; transform:none; transition-delay: 0.62s; }

.modal-case-date {
  font-size: 0.72rem;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.modal-case-text {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.75);
  line-height: 1.7;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
  .practice-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-pad: 60px 20px; }

  .nav-links { display: none; }
  .nav-toggle { display: flex; }

  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .about-values { grid-template-columns: 1fr; }

  .practice-grid { grid-template-columns: 1fr; }

  .team-grid { grid-template-columns: repeat(2, 1fr); }

  .news-grid { grid-template-columns: 1fr; background: none; gap: 1px; }

  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-map { min-height: 300px; }

  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
}

@media (max-width: 480px) {
  .team-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 1.6rem; }
  .modal-panel { width: 100%; min-width: unset; max-width: unset; }
}

/* =============================================
   NEWS CARDS — CLICKABLE
   ============================================= */
a.news-card {
  cursor: pointer;
  display: flex;
}

/* =============================================
   NEWS — VIEW ALL LINK
   ============================================= */
.news-footer {
  text-align: center;
  margin-top: 40px;
}
.news-all-link {
  display: inline-block;
  border: 1px solid var(--red);
  color: var(--red);
  padding: 12px 40px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
}
.news-all-link:hover {
  background: var(--red);
  color: var(--white);
}

/* =============================================
   SUBPAGE BANNER
   ============================================= */
.page-banner {
  background: linear-gradient(135deg, #6B1212 0%, #2C2C2C 100%);
  padding: 110px 20px 56px;
}
.page-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
.page-banner-tag {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 14px;
}
.page-banner h1 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
  color: var(--white);
  max-width: 820px;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.page-banner-date {
  margin-top: 14px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =============================================
   ARTICLE PAGE
   ============================================= */
.article-section {
  padding: 64px 20px 96px;
  background: var(--white);
}
.article-inner {
  max-width: 740px;
  margin: 0 auto;
}
.article-inner p {
  font-size: 1.02rem;
  color: var(--grey-mid);
  line-height: 1.9;
  margin-bottom: 26px;
}
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 44px;
  transition: gap 0.2s;
}
.article-back:hover { gap: 10px; }
.article-back--bottom {
  margin-top: 40px;
  margin-bottom: 0;
}

/* =============================================
   NEWS ARCHIVE PAGE
   ============================================= */
.news-archive-section {
  padding: 64px 20px 96px;
  background: #f4f1f1;
}
.news-archive-section .news-grid {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
  .news-archive-section .news-grid { grid-template-columns: 1fr; }
  .page-banner { padding: 96px 20px 44px; }
}
