/* ICS Menu Stylesheet */
/* Main Content */
.professionals-content {
  flex: 1;
    padding: 2rem;
    max-width: 1720px;
    margin: 0 auto;
    width: 100%;
    display: flex
;
    align-items: center;
    justify-content: center;
}

.protocols-grid {
  display: grid;
  grid-template-columns: 1fr 0.6fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2rem;
}


.protocol-card:nth-child(1) { grid-column: 1; grid-row: 1; } /* VM */
.protocol-card:nth-child(2) { grid-column: 1; grid-row: 2; } /* LGTBI */
.info-card                 { grid-column: 2; grid-row: 1 / 3; } /* Formulari ocupa les dues files */
.protocol-card:nth-child(4) { grid-column: 3; grid-row: 1; } /* Assetjament */
.protocol-card:nth-child(5) { grid-column: 3; grid-row: 2; } /* Conductes */


/* Protocol Cards */
.protocol-card {
  background-color: white;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 35vh; /* altura fija de las tarjetas */
}

.protocol-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.protocol-content {
  display: flex;
  gap: 1rem;
  flex: 1;
  padding: 1rem;
  padding-top: 0rem;
}

.protocol-image {
  flex-shrink: 0;
}

.protocol-img {
  width: 15vh;
  height:auto;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.protocol-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.protocol-title {
  font-size: 1.6rem;
  font-weight: bold;
  color: #0032A0;
  margin-bottom: 0.5rem;
  padding: 1rem;
}

.protocol-description {
  color: #0032A0;
  line-height: 1.4;
  font-size: 1.3rem;
  margin: 0.2rem;
  padding: 0.5rem;
}

.expand-button {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #0032A0;
  color: white;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.expand-button:hover {
  transform: scale(1.1);
}

/* Central Info Card */
.info-card {
  background-color: #8F5BF290;
  border-radius: 16px;
  padding: 2rem;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center; /* centra verticalment dins les dues files */
  min-height: 35vh;   /* limita l'alçada */
  margin: 0 auto;
}

.info-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.info-description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.4;
}

.formulari-button {
  background-color: white;
  color: #4C1D95;
  border: none;
  padding: 1rem 2rem;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.formulari-button:hover {
  transform: translateY(-2px);
}


/* Responsive Design */
@media (max-width: 1500px) {
    /* Central Info Card */
.info-card {
  background-color: #8F5BF280;
  border-radius: 16px;
  padding: 2rem;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center; /* centra verticalment dins les dues files */
  min-height: 35vh;   /* limita l'alçada */
  margin: 0 auto;
}

.info-title {
  font-size: 1.7rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.info-description {
  font-size: 1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.4;
}

.protocol-card {
  background-color: white;
  border-radius: 16px;
  padding: 1rem;
  padding-top: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 35vh; /* altura fija de las tarjetas */
}

.protocols-grid {
    display: grid;
    grid-template-columns: 1fr 0.7fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 2rem;
    height: 90%;
    }

    .protocol-card:nth-child(1) { grid-column: 1; grid-row: 1; } /* VM */
    .protocol-card:nth-child(2) { grid-column: 1; grid-row: 2; } /* LGTBI */
    .info-card                 { grid-column: 2; grid-row: 1 / 3; } /* Formulari ocupa les dues files */
    .protocol-card:nth-child(4) { grid-column: 3; grid-row: 1; } /* Assetjament */
    .protocol-card:nth-child(5) { grid-column: 3; grid-row: 2; } /* Conductes */


  .protocol-img {
    width: 100px;
    height: auto;
  }

  .protocol-title {
    font-size: 1.5rem;
  }

  .protocol-description {
    font-size: 0.9rem;
  }
}


/* Responsive Design */
@media (max-width: 1024px) {
  .protocols-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    gap: 1.5rem;
  }

  /* Reset grid positions for tablet */
  .protocol-card:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
  .protocol-card:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
  .info-card {
    grid-column: 1 / 3;
    grid-row: 2;
  }
  .protocol-card:nth-child(4) {
    grid-column: 1;
    grid-row: 3;
  }
  .protocol-card:nth-child(5) {
    grid-column: 2;
    grid-row: 3;
  }

  .protocol-img {
    width: 100px;
    height: 130px;
  }

  .protocol-title {
    font-size: 1.1rem;
  }

  .protocol-description {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {

  .professionals-content {
    padding: 1rem;
    max-width: 100vw;;
  }

  .protocols-grid {
    grid-template-columns: 2fr;
    gap: 0.5rem;
  }

  /* Reset all grid positions for mobile */
  .protocol-card:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
  .protocol-card:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
  .info-card {
    grid-column: span 2;
    grid-row: 3;
  }
  .protocol-card:nth-child(4) {
    grid-column: 1;
    grid-row: 2;
  }
  .protocol-card:nth-child(5) {
    grid-column: 2;
    grid-row: 2;
  }

  .protocol-content {
    flex-direction: row;
  }

  .protocol-img {
    width: 20vw;
    height: auto;
  }

  .protocol-img {
    width: 13vh;
    height:auto;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .info-card {
    background-color: #8F5BF290;
    border-radius: 0.4rem;
    padding: 2rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    align-self: center; 
    min-height: 20vh;  
    margin: 0 auto;
    margin-top: 1rem;
    width: 100%;
  }

  /* .protocol-info {

  } */

  .info-title {
    font-size: 1.5rem;
  }

  .info-description {
    font-size: 1rem;
    min-height: auto;
  }
}

@media (max-width: 480px) {
  .protocol-card {
    padding: 1rem;
    height: auto;
  }

  .protocol-img {
    width: 35vw;
    height: auto;
  }

  .protocol-title {
    font-size: 1.3rem !important;
  }

  .protocol-description {
    font-size: 0.85rem;
  }

  .expand-button {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }

.info-card {
    background-color: #8F5BF280;
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    grid-column: 1;
    min-height: auto;   /* limita l'alçada */
}

.protocol-img {
  width: 15vh;
  height:auto;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

  .info-title {
    font-size: 1.3rem;
  }

  .protocol-description {
    color: #0032A0;
    margin: 0.2rem;
    padding: 0.5rem;
    min-height: auto;
    }


  .professionals-content {
    flex: 1;
    margin: 0 auto;
    max-width: 100vh;
    display: flex;
    align-items: center;    /* centra verticalmente el contenido dentro del main */
    justify-content: center; /* centra horizontalmente */
  }

  /* Reset all grid positions for mobile */
  .protocol-card:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
  .protocol-card:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }
  .info-card {
    grid-column: 1;
    grid-row: 5;
  }
  .protocol-card:nth-child(4) {
    grid-column: 1;
    grid-row: 4;
  }
  .protocol-card:nth-child(5) {
    grid-column: 1;
    grid-row: 3;
  }

}



/* Styles for the ICS  Circuits */
/* Violence Protocol Specific Styles - Prefixed with 'vp-' */

/* Main content */
.vp-main-content {
    display: grid;
    place-items: center;
    height: 100vh;
    line-height: 1.6;
    margin-left: 20%;
    margin-right: 15%;
    flex: 1;
}

.vp-container {
    max-width: 80vw;
    margin: 0 auto;
}

/* Grid layout - FIXED */
.vp-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .vp-content-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "diagram info";
    }
    
    .vp-diagram-section {
        grid-area: diagram;
    }
    
    .vp-info-section {
        grid-area: info;
    }
}

/* Diagram section */
.vp-diagram-section {
    display: flex;
    justify-content: center;
}

.vp-diagram-container {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    max-width: 35rem;
    width: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vp-diagram-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.vp-diagram-image {
    width: 100%;
    height: auto;
    border-radius: 1.5rem;
    display: block;
}

/* Info section */
.vp-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.vp-info-box {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vp-info-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Box header */
.vp-box-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.vp-icon-container {
    background: #dbeafe;
    padding: 0.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vp-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: #2563eb;
}

.vp-box-title {
    font-size: 1.25rem;
    font-weight: bold;
    color: #1e40af;
    margin: 0;
}

/* Box content */
.vp-box-content {
    margin-top: 1rem;
}

.vp-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.vp-info-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #2563eb;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.vp-info-text {
    flex: 1;
}

.vp-info-subtitle {
    font-weight: 600;
    color: #1d4ed8;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.vp-info-description {
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* List styles */
.vp-info-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vp-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: #4b5563;
    font-size: 0.875rem;
}

.vp-bullet {
    color: #2563eb;
    font-weight: bold;
    margin-top: 0.125rem;
}

@media (max-width: 768px) {
    .vp-main-content {
        min-height: 100vh;
        padding: 1rem 0.5rem;
        line-height: 1.6;
    }

    .vp-container {
        max-width: 100vw;
        margin: 0 auto;
    }
    
    .vp-content-grid {
        gap: 1.5rem;
    }
    
    .vp-info-box {
        padding: 1.25rem;
    }
    
    .vp-box-title {
        font-size: 1.1rem;
    }
    
    .vp-diagram-container {
        padding: 0.5rem;
    }
}

@media (max-width: 480px) {
    .vp-main-content {
        min-height: 98vh;
        padding: 0.5rem 0.5rem;
        line-height: 1.6;
        margin-left: 0%;
        margin-right: 0%;
    }


}

.vp-main-content h1,
.vp-main-content h2,
.vp-main-content h3,
.vp-main-content p,
.vp-main-content ul,
.vp-main-content li {
    margin: 0;
    padding: 0;
}

.vp-main-content ul {
    list-style: none;
}


/* FORMULARI */
    .form-container {
        flex: 1;
        margin: 0 auto;
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
    .form-card {
        background: white;
        padding: 2rem;
        border-radius: 20px;
        width: 60vw;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    .form-label {
        font-weight: bold;
        display: block;
        margin-top: 1.2rem;
        font-size: 1.2rem;
        color: #6c5faf;
    }
    .form-select,
    .form-input,
    .form-textarea {
        width: 100%;
        padding: 8px;
        margin-top: 5px;
        border: 1px solid #8878db;
        border-radius: 10px;
        font-size: 1rem;
        box-sizing: border-box;
    }
    .form-textarea {
        resize: vertical;
        min-height: 8rem;
    }
    .form-buttons {
        display: flex;
        justify-content: space-between;
        margin-top: 2rem;
    }
    .form-button {
        padding: 1rem 2rem;
        border: none;
        border-radius: 10px;
        font-size: 1.2rem;
        cursor: pointer;
    }
    .form-button-cancel {
        background: white;
        border: 1px solid #f52323;
        color: #f52323;
    }
    .form-button-submit {
        background: #8878db;
        color: white;
    }

/* --- Tablet (max-width: 768px) --- */
@media (max-width: 768px) {
    .form-container {
        margin: 1.5rem auto;
        padding: 0 1rem;
        width: 100vw;
    }
    .form-card {
        width: 90vw;
        max-height: none;
    }
}

/* --- Mòbil (max-width: 480px) --- */
@media (max-width: 480px) {
    .form-container {
        margin: 1rem auto;
        padding: 0 0.5rem;
        width: 98vw;
        
    }
    .form-card {
        width: 100%;
        border-radius: 15px;
        box-shadow: none;
        padding: 15px;
        min-height: auto;
    }
    .form-label {
        margin-top: 1.3rem;
        font-size: 1.1re;
    }
    .form-button {
        font-size: 1rem;
        padding: 0.8rem 1.6rem;
        margin-top: auto;
    }
}


.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 0.4rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-content h2 {
    margin: 1rem 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-content p {
    margin: 1rem 0 1.5rem 0;
    color: #666;
    line-height: 1.5;
}

#modal-icon {
    display: block;
    margin-bottom: 1rem;
}

#modal-icon .success {
    color: #10b981;
    font-size: 3rem;
}

#modal-icon .error {
    color: #ef4444;
    font-size: 3rem;
}

.modal-button {
    background-color:#8878db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 8px;
}

.modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(102, 126, 234, 0.4);
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.modal-button.secondary {
    background: #8878db;
}

.modal-button.secondary:hover {
    background: #764ba2;
    box-shadow: 0 8px 15px rgba(107, 114, 128, 0.4);
}

/* Spinner para el botón de envío */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff40;
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 480px) {
    .modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-button {
        width: 100%;
        margin: 4px 0;
    }
}
