/* ===== RESET & BODY (OPTIMIZAT CONTEXT CLEAN) ===== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* Previne scroll-ul stânga-dreapta accidental pe mobil */
    font-family: Arial, sans-serif;
    background: #f4f7fa;
    color: #333;
}

/* ===== HEADER / HERO ===== */
.pagina-separata-header {
    background: linear-gradient(135deg, rgb(15,112,183), #084f82);
    color: #fff;
    padding: 60px 20px 40px;
    text-align: center;
}

/* ===== HEADER FORM ===== */
.header-form-section {
    display: flex;
    gap: 30px;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.header-image {
    flex: 1;
    min-width: 300px;
}

.header-image img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* ===== FORM CONTEXT ===== */
.reservation-form {
    width: 100%;
    max-width: 400px; /* Transformat din lățime fixă în max-width pentru adaptabilitate */
    min-width: 280px;
    background-color: #2b3438;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.reservation-form h2 {
    color: #f39200;
    margin-bottom: 1em;
    text-align: center;
    font-size: 1.5em;
}

.reservation-form input,
.reservation-form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 1px solid #ddd;
    font-size: 1em;
    box-sizing: border-box;
    outline: none;
}

.reservation-form input:focus,
.reservation-form select:focus {
    border-color: rgb(15,112,183);
}

.reservation-form button {
    width: 100%;
    padding: 14px;
    background-color: rgb(243,146,0);
    color: #fff;
    border: none;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.reservation-form button:hover {
    background-color: rgb(220,130,0);
}

/* ===== WRAP GENERAL ===== */
.wrap {
    width: auto;
    margin: auto;
    padding: 20px;
    box-sizing: border-box;
}

/* ===================================================
   STRUCTURĂ FILTRE - NEO-BRUTALIST CLEAN / FLUIDĂ
=================================================== */
.filter-page {
  max-width: 1100px;
  margin: auto;
  padding: 20px;
  box-sizing: border-box;
}

.filter-hero {
  text-align: center;
  margin-bottom: 40px;
}

.filter-hero h1 {
  font-size: 30px;
  color: #0f172a;
  margin-bottom: 10px;
}

.filter-hero p {
  font-size: 16px;
  color: #555;
  max-width: 800px;
  margin: auto;
  line-height: 1.6;
}

/* GRILA DE BLOCURI TEHNICE */
.filter-types {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.filter-type {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: stretch;
  background: #ffffff;
  padding: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  box-sizing: border-box;
}

.filter-type.reverse {
  direction: rtl;
}

.filter-type.reverse .filter-info,
.filter-type.reverse .segment-media {
  direction: ltr;
}

/* CONTAINERUL IMAGINII ȘI AL LEGENDEDI */
.segment-media {
  position: relative;
  border-radius: 0;
  border: 1px solid #e2e8f0;
  padding: 8px;
  background: #ffffff;
  display: flex;          
  flex-direction: column;   
  align-items: stretch;
  height: 100%;          
  box-sizing: border-box;
}

.segment-media img {
  width: 100%;
  flex-grow: 1;              
  height: auto;              
  min-height: 300px;     
  object-fit: cover;     
  display: block;
}

/* BARA DE SPECIFICAȚII SUB IMAGINE */
.media-tech-specs {
  position: static; 
  background: #f0f7ff;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  color: rgb(15,112,183);
  font-size: 12px;
  font-weight: 600;
  margin-top: 8px;          
  border: 1px solid #e2e8f0; 
}

.filter-info h2 {
  font-size: 24px;
  margin-top: 0;
  margin-bottom: 12px;
  color: #111827;
}

.filter-info p {
  font-size: 15px;
  line-height: 1.6;
  color: #444;
}

.filter-info ul {
  margin-top: 15px;
  padding-left: 20px;
}

.filter-info ul li {
  margin-bottom: 8px;
  color: #374151;
  line-height: 1.4;
}

/* ===================================================
   TABEL PREȚURI FILTRE
=================================================== */
.filter-price-table {
  max-width: 1100px;
  margin: 50px auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
  box-sizing: border-box;
}

.filter-price-table h2 {
  text-align: center;
  margin: 25px 0;
  color: #0f172a;
  font-size: 24px;
}

.filter-price-table table {
  width: 100%;
  border-collapse: collapse;
}

.filter-price-table thead {
  background: rgb(243, 146, 0);
  color: #fff;
}

.filter-price-table th,
.filter-price-table td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  font-size: 14px;
}

.filter-price-table tbody tr:hover {
  background: #f8fafc;
}

.filter-price-table tbody tr:last-child td,
.filter-price-table tbody tr:nth-last-child(2) td,
.filter-price-table tbody tr:nth-last-child(3) td {
  font-weight: bold;
  color: #111827;
}

/* ===================================================
   SERVICE BLOCKS (GRID)
=================================================== */
.filter-diagnostic-section {
  margin-top: 80px;
  background: #ffffff;
  padding: 60px 0;
}

.diagnostic-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.diagnostic-header {
  margin-bottom: 50px;
}

.diagnostic-tag {
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgb(243, 146, 0);
  font-weight: 700;
  margin-bottom: 10px;
}

.diagnostic-header h2 {
  font-size: 30px;
  color: #0f172a;
  margin: 0 0 15px 0;
  font-weight: 800;
}

.diagnostic-header p {
  font-size: 16px;
  color: #475569;
  max-width: 750px;
  margin: 0;
  line-height: 1.6;
}

.diagnostic-list {
  display: flex;
  flex-direction: column;
}

.diagnostic-row {
  display: grid;
  grid-template-columns: 40px 1fr 140px;
  align-items: center;
  gap: 25px;
  padding: 30px 0;
  border-bottom: 1px solid #e2e8f0;
  transition: all 0.25s ease;
}

.diagnostic-row:last-child {
  border-bottom: none;
}

.diagnostic-alert-marker {
  font-size: 20px;
  opacity: 0.4;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.diagnostic-info h3 {
  font-size: 18px;
  color: #0f172a;
  margin: 0 0 8px 0;
  font-weight: 600;
  transition: color 0.3s ease;
}

.diagnostic-info p {
  font-size: 14.5px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

.diagnostic-urgency {
  justify-self: end;
  font-size: 12px;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  padding: 6px 14px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.diagnostic-urgency.critical {
  background: #fef2f2;
  color: #991b1b;
}

.diagnostic-row:hover {
  padding-left: 10px;
}

.diagnostic-row:hover .diagnostic-alert-marker {
  opacity: 1;
  transform: scale(1.1);
}

.diagnostic-row:hover .diagnostic-info h3 {
  color: rgb(15, 112, 183);
}

/* ===================================================
   FAQ ACCORDION STYLE
=================================================== */
.srv-faq {
    max-width: 1000px;
    margin: 50px auto 0 auto;
    padding: 0 15px;
    box-sizing: border-box;
}

.srv-faq h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #0f172a;
    font-size: 28px;
    font-weight: 700;
}

.faq-item {
    margin-bottom: 12px;
    border: 1px solid #e5e5e5;
    background: #fff;
}

.faq-item summary {
    cursor: pointer;
    padding: 18px 20px;
    font-weight: 600;
    font-size: 16px;
    background: #f7f7f7;
    color: #1e293b;
    outline: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker,
.faq-item summary::marker {
    display: none;
}

.faq-item details[open] summary {
    background: #e8f3ff;
    border-bottom: 1px solid #e5e5e5;
}

.faq-item summary::after {
    content: '+';
    font-size: 20px;
    color: #64748b;
}

.faq-item details[open] summary::after {
    content: '−';
    color: #2563eb;
}

.faq-item p {
    margin: 0;
    padding: 18px 20px;
    line-height: 1.6;
    color: #444;
    font-size: 15px;
}

/* ===== AVANTAJE ===== */
.avantaje {
    background: #f4f7fa;
    padding: 60px 20px;
    text-align: center;
}

.avantaje h2 {
    font-size: 28px;
    color: rgb(15,112,183);
}

.avantaje-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 35px;
}

.avantaj {
    background: #fff;
    padding: 30px 20px;
    border: 1px solid #e2e8f0;
}

.avantaj-icon {
    width: 60px;
    height: 60px;
    background: rgb(15,112,183);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 15px auto;
}

.avantaj-icon img {
    width: 30px;
    height: 30px;
}

/* ===== CTA FINAL ===== */
.cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    background: rgb(15,112,183);
    color: #fff;
    padding: 40px 20px;
    margin-top: 50px;
    box-sizing: border-box;
}

.cta-image { flex: 1; min-width: 200px; text-align: center; }
.cta-image img { width: 45%; }
.cta-text { flex: 2; min-width: 250px; }
.cta-text h2 { font-size: 28px; color: #fff !important; margin-bottom: 10px; }
.cta-text p { font-size: 16px; margin-bottom: 20px; }
.cta-text a {
    display: inline-block;
    background: rgb(243,146,0);
    color: #fff !important;
    padding: 14px 28px;
    font-size: 16px;
    text-decoration: none;
    font-weight: bold;
}

a i.fa-phone {
    margin-right: 8px;
    color: #000;
}

/* ===================================================
   RESPONSIVE DESIGN COMPACT (ADAPTARE PREMIUM MOBIL)
=================================================== */
@media (max-width: 900px) {
  .filter-type {
    grid-template-columns: 1fr; /* Trece în mod listă pe ecrane medii */
    gap: 20px;
    padding: 16px;
  }
  .filter-type.reverse {
    direction: ltr; /* Elimină inversarea coloanelor pentru lizibilitate */
  }
  .segment-media img {
    min-height: 220px; /* Adaptează proporțiile imaginii pe ecrane mai mici */
  }
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
    /* Resetare structură pe mobil - Elementele merg până în margini */
    .wrap, .filter-page {
        padding: 10px 4px !important; /* Spațiu minim controlat pe laterale */
    }

    .header-form-section { 
        flex-direction: column; 
        gap: 15px;
        margin: 10px 0;
    }
    
    .header-image, .reservation-form {
        flex: 100%;
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 0; /* Aspect nativ perfect aliniat pe margins */
    }

    .header-image img {
        height: auto;
        min-height: 240px;
        border-radius: 0;
    }

    .reservation-form {
        padding: 24px 16px;
    }

    .reservation-form h2, .reservation-form p {
        text-align: center;
    }

    /* ===== TRANSFORMARE TABEL IN CARDURI PE MOBIL ===== */
    .filter-price-table table, 
    .filter-price-table thead, 
    .filter-price-table tbody, 
    .filter-price-table th, 
    .filter-price-table td, 
    .filter-price-table tr { 
        display: block; 
    }
    
    /* Ascundem capul de tabel rigid */
    .filter-price-table thead tr { 
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    /* Fiecare rând devine o cutie (card) albă curată */
    .filter-price-table tbody tr { 
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        margin: 12px 6px;
        padding: 10px 14px;
        box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    }
    
    .filter-price-table tbody tr:hover {
        background: #ffffff;
    }
    
    /* Adaptare celule pe verticală */
    .filter-price-table td { 
        border: none;
        border-bottom: 1px dashed #f1f5f9; /* Separator subtil */
        padding: 10px 0;
        text-align: left;
        font-size: 14.5px;
        color: #334155;
    }

    /* Ultima celulă (Prețul / Manopera) primește evidențiere stilizată */
    .filter-price-table td:last-child {
        border-bottom: none;
        background: #fff8ee;
        padding: 10px;
        margin-top: 6px;
        border-radius: 4px;
        font-weight: bold;
    }

    .filter-price-table tbody tr:last-child td,
    .filter-price-table tbody tr:nth-last-child(2) td,
    .filter-price-table tbody tr:nth-last-child(3) td {
        font-weight: normal; 
    }

    /* Secțiunea Diagnoză Tehnică */
    .diagnostic-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px 0;
    }
    
    .diagnostic-alert-marker {
        display: none; /* Ascuns pe mobil pentru maximizarea spațiului de text */
    }
    
    .diagnostic-urgency {
        justify-self: start;
        margin-top: 4px;
    }

    /* Secțiunea Finală CTA */
    .cta { 
        flex-direction: column; 
        text-align: center; 
        padding: 35px 16px;
    }
    .cta-image img {
        width: 55%;
    }
    .cta-text a { 
        width: 100%; 
        box-sizing: border-box; 
        text-align: center; 
    }
}

@media (max-width: 480px) {
  .service-grid {
    grid-template-columns: 1fr;
  }
  .filter-hero h1 {
    font-size: 24px;
  }
  .media-tech-specs {
    font-size: 11px;
    flex-wrap: wrap;
    gap: 6px;
  }
}