:root {
  --color-primary: #012E40;
  --color-secondary: #036280;
  --color-accent: #5AA8DD;
  --color-bg-light: #F4F4F4;
  --color-text-dark: #333333;
  --color-text-medium: #666666;
  --color-white: #FFFFFF;
  --color-success: #2A9D8F;
  --color-warning: #E9C46A;
  --color-error: #E63946;
  --color-border-form: #CCCCCC;
}

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
}

/* HEADER */
.main-header {
  background-color: var(--color-primary);
  color: var(--color-white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}
.logo { font-size: 1.5rem; font-weight: bold; }
nav ul { list-style: none; display: flex; gap: 1rem; }
nav a {
  color: var(--color-white);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
nav a:hover {
  color: var(--color-accent);
}

/* HERO / CARRUSEL */
.hero {
  position: relative; /* Already present, ensure it stays */
  overflow: hidden;   /* Already present */
  background-color: var(--color-primary); /* Already present, acts as fallback if images don't load */
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4); /* Black with 40% opacity */
  z-index: 1; /* Places the overlay above the carousel images */
}

/* Commented out OwlCarousel specific styles */
/*
.owl-carousel {
  display: block; 
  width: 100%;   
  position: relative; 
  z-index: 0; 
}

.owl-carousel .owl-item {
  -webkit-backface-visibility: hidden;
  -webkit-transform: translateZ(0) scale(1.0, 1.0);
}

.owl-carousel .item img {
  width: 100%;
  height: auto;
  display: block;
}
*/

.static-banner-image {
  width: 100%;
  height: 60vh; /* Example: 60% of viewport height. Adjust as desired. */
  /* Or use a fixed height like: height: 450px; */
  overflow: hidden; /* Important if using object-fit on the image */
  position: relative; /* To keep it in the normal flow under the absolute hero text/overlay */
  z-index: 0; /* Ensure it's behind the hero::before overlay */
}
.static-banner-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover; /* Scales the image to maintain aspect ratio while filling the element's entire content box */
}

.hero-text {
  position: absolute;
  top:50%; left:50%;
  transform:translate(-50%,-50%);
  color: var(--color-white); text-align:center;
  color: var(--color-white); /* Ensure .hero-text itself has white color */
  text-align: center; /* Ensure text within this div is centered */
}

.hero-content-wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2; /* On top of overlay */
  width: 90%; 
  max-width: 1200px; 
  display: flex;
  flex-direction: column;
  align-items: center; /* Replaces text-align for flex item centering */
}

.hero-text h1 { 
  /* margin-bottom: 1rem; /* Removed as CTA is gone */
  color: var(--color-white); /* Explicitly set, though inherited */
  text-align: center; /* Ensure h1 content itself is centered */
}

/*
.hero-cta {
  margin-top: 1rem; 
  text-align: center; 
}
*/

/* BOTONES */
.btn-primary { /* Renamed from .btn */
  display:inline-block;
  margin:1rem;
  padding:0.75rem 1.5rem;
  background-color: var(--color-secondary);
  color: var(--color-white);
  text-decoration:none;
  border-radius:4px;
  font-weight:bold;
  cursor:pointer;
  border: 1px solid transparent; /* Added for consistency with secondary */
  transition: background-color 0.2s, color 0.2s;
}

.btn-primary:hover {
  background-color: var(--color-accent);
  color: var(--color-white); /* Ensure text color remains white or changes if accent needs it */
}

.btn-secondary {
  display:inline-block;
  margin:1rem;
  padding:0.75rem 1.5rem;
  background-color: transparent;
  color: var(--color-secondary);
  text-decoration:none;
  border-radius:4px;
  font-weight:bold;
  cursor:pointer;
  border: 1px solid var(--color-secondary);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background-color: var(--color-bg-light);
  color: var(--color-secondary);
}


/* SECCIONES */
.nosotros, .servicios, .productos,
.consulta, .publicaciones {
  padding:4rem 2rem;
  text-align:center;
  background-color: transparent; /* Body is now --color-bg-light */
}
.perfil img {
  width:150px;
  border-radius:50%;
  margin:1rem 0;
}
.perfil p {
  color: var(--color-text-medium);
}

/* GRID */
.grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(250px,1fr));
  gap:2rem;
  margin-top:2rem;
}
.card {
  background: var(--color-white);
  padding:2rem;
  border-radius:8px;
  box-shadow:0 2px 8px rgba(0,0,0,0.1);
}
.card p {
  color: var(--color-text-medium);
}

/* LISTAS */
.productos ul {
  list-style-position:inside;
  padding-left:0;
  max-width:400px;
  margin:0 auto;
  text-align:left;
}

/* FORMULARIOS */
form {
  max-width:500px;
  margin:2rem auto;
}
form input, form textarea {
  width:100%;
  padding:0.5rem;
  margin-bottom:1rem;
  border:1px solid var(--color-border-form);
  border-radius:4px;
  background-color: var(--color-white);
  transition: box-shadow 0.2s, border-color 0.2s;
}
form input:focus, form textarea:focus {
  border-color: var(--color-secondary);
  box-shadow: 0 0 0 2px rgba(3, 98, 128, 0.4); /* Secondary with alpha */
}
form label {
  display:block;
  margin-bottom:0.25rem; /* Default spacing for labels */
  cursor:pointer;
  font-weight: 500; /* Slightly bolder labels */
  color: var(--color-text-dark);
}

form fieldset {
  border: 1px solid var(--color-border-form);
  padding: 1.5rem;
  margin-bottom: 2rem;
  border-radius: 6px;
}

form legend {
  padding: 0 0.5rem;
  font-weight: bold;
  color: var(--color-primary);
  margin-left: 1rem; 
  font-size: 1.1em; /* Slightly larger legend text */
}

/* Specific input type styling */
form select {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--color-border-form);
  border-radius: 4px;
  background-color: var(--color-white);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cpath%20d%3D%22M5%208l5%205%205-5z%22%20fill%3D%22%23666%22/%3E%3C/svg%3E');
  background-repeat: no-repeat;
  background-position: right 0.7em top 50%, 0 0;
  background-size: 1.2em auto, 100%;
  cursor: pointer;
}

form label input[type="radio"],
form label input[type="checkbox"] {
  width: auto; /* Override full width for these */
  margin-right: 0.5em;
  vertical-align: middle; /* Align with label text */
}

/* Add some space above paragraphs that introduce radio/checkbox groups if they are not the first child of fieldset */
form fieldset > p + label {
    margin-top: 0.25rem; 
}
form fieldset > p { /* Paragraphs used as sub-headings for radio/checkbox groups */
    font-weight: normal;
    color: var(--color-text-medium);
    margin-bottom: 0.5rem;
    margin-top: 1rem; /* Space above these descriptive paragraphs */
}
form fieldset > p:first-child {
    margin-top: 0; /* No extra top margin for the first p in a fieldset */
}


/* Style for the conditionally displayed text input */
input[disabled] {
  background-color: var(--color-bg-light) !important; /* Lighter background for disabled */
  cursor: not-allowed;
  opacity: 0.7;
}


/* FOOTER */
footer {
  background-color:#012E40;
  color:white;
  text-align:center;
  padding:2rem 1rem;
  font-size:0.9rem;
}
footer a {
  color: var(--color-secondary); /* Changed to match social icon color feedback */
  text-decoration:none;
  transition: color 0.2s;
}
footer a:hover {
  color: var(--color-primary); /* Changed to match social icon hover feedback */
}

/* RESPONSIVE */
@media(max-width:768px){
  .main-header { flex-direction:column; }
  nav ul { flex-direction:column; align-items:center; }
  form {
    max-width: none; /* Allow full width within its container's padding */
    padding: 1rem; 
    margin: 1rem 0; 
  }
  form fieldset {
    padding: 1rem; 
  }
  form legend {
    margin-left: 0.5rem; 
  }
}

/* Adjustments for smaller mobile screens */
@media (max-width: 576px) {
  .main-header {
    padding: 1rem 1rem; /* Reduced header padding */
  }
  .nosotros, .servicios, .productos, .consulta, .publicaciones, .publicaciones-linkedin, .redes-sociales {
    padding: 1.5rem 1rem; /* Further Reduced section padding as per feedback */
  }
  .hero-text h1 {
    font-size: 1.8rem; /* Adjust hero text size for smaller screens */
  }
}

/* Utility Classes (simple versions) */
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-5 { margin-top: 3rem !important; }
.text-center { text-align: center !important; }
.h5 { font-size: 1.25rem; /* Example size */ }
.small { font-size: 0.875em; /* Example size */ }
.container { /* Basic container for max-width and centering */
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}
@media (min-width: 576px) { .container { max-width: 540px; } }
@media (min-width: 768px) { .container { max-width: 720px; } }
@media (min-width: 992px) { .container { max-width: 960px; } }
@media (min-width: 1200px) { .container { max-width: 1140px; } }

.lead {
  font-size: 1.25rem; /* Example size, adjust as needed */
  font-weight: 300; /* Lighter weight for lead text */
}
.mr-2 { margin-right: 0.5rem !important; } /* Adjust spacing as needed */
.ml-2 { margin-left: 0.5rem !important; }  /* Adjust spacing as needed */

hr.my-5 {
  border: 0;
  height: 1px;
  background-color: var(--color-border-form);
  margin-top: 3rem;
  margin-bottom: 3rem;
}


/* Publicaciones de LinkedIn Section */
.publicaciones-linkedin {
  background-color: var(--color-white); /* Changed to white as per user image */
  /* padding is handled by py-5 utility class */
}

.publicaciones-linkedin h2 {
  color: var(--color-primary); 
  /* margin-bottom is handled by mb-4 utility class */
}

.publicaciones-linkedin .list-publicaciones {
  /* max-width is handled by .container */
}

/* Styles for previous placeholder publication items - Commented out */
/*
.publicaciones-linkedin .publicacion-item {
  background-color: var(--color-white); 
  padding: 1.5rem;
  border-radius: 8px; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.1); 
  text-align: left; 
}

.publicaciones-linkedin .publicacion-item h3 a {
  color: var(--color-secondary); 
  text-decoration: none;
  font-weight: bold; 
}

.publicaciones-linkedin .publicacion-item h3 a:hover {
  color: var(--color-accent); 
  text-decoration: underline;
}

.publicaciones-linkedin .publicacion-item .text-muted { 
  color: var(--color-text-medium) !important; 
  display: block; 
  margin-bottom: 1rem; 
}

.publicaciones-linkedin .btn-secondary.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem; 
    line-height: 1.5;
    border-radius: 0.2rem;
}
*/

.linkedin-iframe-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 504px; /* Original width of iframe, acts as max */
  margin: 0 auto 1rem auto; /* Reduced bottom margin */
  /* Aspect ratio padding-bottom: (height / width) * 100% = (568 / 504) * 100% */
  padding-bottom: 112.698%; /* 568 / 504 = 1.126984127 */
}

.linkedin-iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0; /* Good practice, though iframe has frameborder="0" */
}

.publicaciones-linkedin .list-publicaciones > p.text-center.mt-5 {
  margin-top: 1.5rem; /* Reduced from 3rem (via .mt-5) */
}

/* Redes Sociales Section (repurposed from .publicaciones) */
.redes-sociales {
   background-color: var(--color-bg-light); /* Keep it distinct or use white if preferred */
   /* padding is handled by py-5 utility class */
}
.redes-sociales h2 {
    color: var(--color-primary);
    margin-bottom: 1rem; /* Space after heading */
}
.redes-sociales p {
    color: var(--color-text-medium);
    margin-bottom: 1.5rem; /* Space before button */
}

/* Styles for dedicated form pages */
.formulario-pagina {
  background-color: var(--color-bg-light); /* Consistent with body background */
  /* Padding is handled by .py-5 utility class */
}

.formulario-pagina h3 { /* For the form title on its own page */
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 2rem; /* Space below the title */
  font-size: 1.8rem; /* Make it prominent */
}

/* Styles for links in the services section */
.service-link {
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: bold; /* Or keep it default if h3 is already bold */
}

.service-link:hover {
  color: var(--color-accent);
  text-decoration: underline;
}

.service-link-inline {
  color: var(--color-secondary);
  text-decoration: underline;
  font-weight: normal; /* Assuming p tag text is normal */
}

.service-link-inline:hover {
  color: var(--color-accent);
  text-decoration: none;
}
