/*
Theme Name: Avocat
Theme URI: http://localhost/
Author: Maria Curbet
Author URI: http://localhost/
Description: Tema avocat profesional bazată pe Avocat Maria Curbet, structurată ca Twenty Twenty-Five.
Version: 4.4
Requires at least: 6.7
Tested up to: 7.0
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: avocat
Tags: one-column, custom-menu, custom-logo, editor-style, block-styles, wide-blocks, accessibility-ready, translation-ready
*/

:root {
  --primary: #1a3a52;
  --primary-light: #2c5aa0;
  --gold: #d4af37;
  --gold-light: #e8c84a;
  --bg: #f8f9fa;
  --text: #2c3e50;
  --text-muted: #7f8c8d;
  --border: #e9ecef;
  --white: #ffffff;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.7;
  background: var(--bg);
}

a {
  color: var(--primary);
  transition: color 0.25s ease;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 60px;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-right: 1rem;
}

.site-title a {
  color: var(--white);
  text-decoration: none;
}

.site-title a:hover {
  color: var(--gold);
}

/* Hamburger */
.nav-toggle {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  min-width: 0;
}

.main-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0.1rem;
}

.main-nav a {
  display: block;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 5px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
  background: rgba(255,255,255,0.12);
  color: var(--white);
}

.user-menu {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-left: 0.5rem;
  border-left: 1px solid rgba(255,255,255,0.15);
}

.user-menu-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-menu-inner img {
  border-radius: 50%;
  width: 24px;
  height: 24px;
}

.user-menu-name {
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  font-weight: 500;
}

.user-menu-logout {
  font-size: 0.8rem;
  color: var(--gold);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.user-menu-logout:hover {
  color: var(--gold-light);
}

.user-menu-logout:hover {
  color: #e74c3c;
}

.user-menu-login {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  padding: 0.35rem 0.85rem;
  border: 2px solid var(--gold);
  border-radius: 6px;
  transition: all 0.2s;
}

.user-menu-login:hover {
  background: var(--gold);
  color: var(--primary);
}

.nav-header {
  display: none;
}

.nav-close {
  display: none;
}

.nav-overlay {
  display: none;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 5rem 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--gold);
  line-height: 1.2;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ===== BUTTONS ===== */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--gold);
  color: var(--primary);
  border: 2px solid var(--gold);
}

.btn-primary:hover {
  background: transparent;
  color: var(--gold);
}

.btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 2px solid var(--gold);
}

.btn-secondary:hover {
  background: var(--gold);
  color: var(--primary);
}

/* ===== CONTENT WRAPPER ===== */
.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  padding: 3rem 0;
}

.page-title {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--gold);
}

/* ===== ABOUT SECTION ===== */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin: 2rem 0;
}

.about-image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image img {
  width: 100%;
  height: auto;
  display: block;
}

.about-text h2 {
  color: var(--primary);
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ===== CARDS ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card h3 {
  color: var(--primary);
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== BLOG POSTS ===== */
.post-item {
  display: flex;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow);
}

.post-item:hover {
  box-shadow: var(--shadow-lg);
}

.post-item .post-thumbnail-link {
  flex-shrink: 0;
  width: 280px;
  min-height: 200px;
  overflow: hidden;
  position: relative;
}

.post-item .post-thumbnail-link img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.post-item:hover .post-thumbnail-link img {
  transform: scale(1.05);
}

.post-content {
  padding: 1.5rem;
  flex: 1;
  min-width: 0;
}

.post-title {
  color: var(--primary);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.post-title a {
  text-decoration: none;
  color: var(--primary);
}

.post-title a:hover {
  color: var(--gold);
}

.post-meta {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.post-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* ===== CONTACT CTA ===== */
/* ===== CONTACT PAGE ===== */
.contact-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.contact-card .contact-hero {
  text-align: center;
  background: var(--primary);
  color: var(--white);
  padding: 3.5rem 2rem;
}

.contact-card .contact-hero h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.contact-card .contact-hero p {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 2rem;
}

.contact-card .contact-hero .cta-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold);
  color: var(--primary);
  padding: 0.85rem 2.5rem;
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid var(--gold);
}

.contact-card .contact-hero .cta-phone:hover {
  background: transparent;
  color: var(--gold);
}

.contact-card .contact-hero .cta-phone svg {
  flex-shrink: 0;
}

.contact-card .contact-form-section {
  padding: 2.5rem;
}

.contact-card .contact-form-intro {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.contact-form-intro {
  text-align: center;
  color: var(--text-muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

/* ===== TESTIMONIALS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.testimonial-stars {
  margin-bottom: 0.75rem;
}

.testimonial-stars .stars {
  display: inline-flex;
  gap: 2px;
}

.testimonial-text {
  color: var(--text);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.testimonial-author {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9rem;
}

/* Testimonial form */
.testimonial-form-wrap {
  max-width: 500px;
  margin: 2rem auto 0;
  text-align: center;
}

.testimonial-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  text-align: left;
}

.testimonial-form h3 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.star-rating {
  margin-bottom: 1rem;
}

.star-rating p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.star-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 0.25rem;
}

.star-input input {
  display: none;
}

.star-input label {
  cursor: pointer;
  display: inline-flex;
  transition: transform 0.15s ease;
}

.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label {
  transform: scale(1.1);
}

.star-input label:hover svg,
.star-input label:hover ~ label svg,
.star-input input:checked ~ label svg {
  fill: var(--gold);
}

.testimonial-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 100px;
  margin-bottom: 1rem;
}

.testimonial-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

.testimonial-form .btn-primary {
  width: 100%;
  text-align: center;
}

.user-session-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  padding: 0 0 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.user-session-info .logged-in-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  width: 100%;
}

.user-session-info .user-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.user-session-info .user-info img {
  border-radius: 50%;
  width: 28px;
  height: 28px;
}

.user-session-info .user-info span {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9rem;
}

.user-session-info .logout-link {
  font-size: 0.85rem;
  color: #c0392b;
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.2s;
}

.user-session-info .logout-link:hover {
  opacity: 0.7;
}

.testimonial-login {
  padding: 2rem;
  text-align: center;
}

.testimonial-login p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.testimonial-login div.nsl-container[data-align="left"] {
  text-align: center;
}

.testimonial-login div.nsl-container .nsl-container-buttons {
  display: flex;
  justify-content: center;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--primary);
  color: var(--white);
  padding: 3rem 1.5rem 1.5rem;
  margin-top: 4rem;
  border-top: 3px solid var(--gold);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--gold);
  font-size: 1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.25s ease;
}

.footer-section ul a:hover {
  color: var(--gold);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}

/* ===== VIDEO ===== */
.post-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
}

.post-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ===== SKIP LINK ===== */
.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  background: var(--primary);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 0;
  z-index: 99999;
  clip: auto;
  overflow: visible;
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .about-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .post-item .post-thumbnail-link {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    justify-content: flex-start;
    gap: 0.75rem;
  }

  .hamburger {
    display: flex;
    order: -1;
  }

  .site-title {
    flex: 0 1 auto;
    text-align: center;
    margin-right: 0;
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* Overlay */
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .nav-toggle:checked ~ .nav-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  /* Left drawer */
  .main-nav {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100dvh;
    background: var(--primary);
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    overflow-y: auto;
  }

  .nav-toggle:checked ~ .main-nav {
    left: 0;
  }

  .nav-toggle:checked ~ .hamburger {
    display: none;
  }

  .nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }

  .nav-title {
    color: var(--gold);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
  }

  .nav-close {
    font-size: 1.6rem;
    line-height: 1;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 0 0.25rem;
  }

  .nav-close:hover {
    color: var(--white);
  }

  .main-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 0.5rem 0;
  }

  .main-nav ul a {
    padding: 0.75rem 1.25rem;
    width: 100%;
    border-radius: 0;
    white-space: normal;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  .user-menu {
    margin: auto 0 0;
    padding: 1rem 1.25rem;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .user-menu-name {
    display: inline;
    color: rgba(255,255,255,0.8);
    font-size: 0.85rem;
  }

  .user-menu-logout {
    margin-left: auto;
  }

  .user-menu-login {
    width: 100%;
    text-align: center;
  }

  /* Hero */
  .hero {
    padding: 3rem 1.25rem;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  /* Blog */
  .post-item {
    flex-direction: column;
  }

  .post-item .post-thumbnail-link {
    width: 100%;
    min-height: 180px;
    position: relative;
  }

  .post-content {
    padding: 1.25rem;
  }

  /* Cards */
  .cards-grid {
    grid-template-columns: 1fr;
  }

  /* Buttons */
  .btn-primary,
  .btn-secondary {
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
  }

  /* Contact page */
  .contact-card .contact-hero {
    padding: 2.5rem 1.5rem;
  }

  .contact-card .contact-hero h2 {
    font-size: 1.5rem;
  }

  .contact-card .contact-hero .cta-phone {
    font-size: 1.1rem;
    padding: 0.7rem 1.5rem;
  }

  .contact-card .contact-form-section {
    padding: 1.5rem;
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }

  main {
    padding: 2rem 0;
  }
}

@media (max-width: 480px) {
  .site-title {
    font-size: 1.05rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  .page-title {
    font-size: 1.4rem;
  }
}

/* ===== LOAD MORE ===== */
.load-more-wrap {
  text-align: center;
  margin: 2.5rem 0;
}

#load-more:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== CONTACT FORM 7 ===== */
.wpcf7-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.wpcf7-form p {
  margin-bottom: 1.25rem;
}

.wpcf7-form label {
  display: block;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
  background: var(--white);
}

.wpcf7-form textarea {
  resize: vertical;
  min-height: 120px;
}

.wpcf7-form input[type="submit"] {
  display: inline-block;
  padding: 0.75rem 2.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--gold);
  color: var(--primary);
  border: 2px solid var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wpcf7-form input[type="submit"]:hover {
  background: transparent;
  color: var(--gold);
}

.wpcf7-form input[type="submit"]:active {
  transform: scale(0.97);
}

.wpcf7-form .wpcf7-response-output {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.wpcf7-form .wpcf7-not-valid-tip {
  font-size: 0.8rem;
  color: #c0392b;
  margin-top: 0.3rem;
}

.wpcf7-form .wpcf7-spinner {
  display: block;
  margin: 0.5rem auto 0;
}
