/* Reseteo básico y configuración general */
:root {
    --text-color: #333;
    --hero-fallback-bg-color: #7f8c8d; /* Usado si la imagen de fondo del hero falla */
    --hero-text-color-on-image: #FFFFFF;
    --link-color: #0056b3;
    --nav-link-color: #0056b3; 
    --nav-link-hover-bg: #e9ecef; 
    --nav-link-hover-color: #003875; 
    --light-bg-color: #f8f9fa;
    --white-color: #ffffff;
    --primary-action-color: #007bff;
    --serif-font: 'Georgia', 'Times New Roman', Times, serif;
    --sans-serif-font: 'Arial', sans-serif;
    --heading-color: #2c3e50;
  }
  
  * { margin: 0; padding: 0; box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  body { font-family: var(--sans-serif-font); line-height: 1.6; color: var(--text-color); background-color: var(--white-color); }
  .container { width: 90%; max-width: 1100px; margin: 0 auto; padding: 0 15px; }
  img { max-width: 100%; height: auto; display: block; } 
  a { color: var(--link-color); text-decoration: none; }
  a:hover { text-decoration: underline; }
  
  #menu-toggle { position: fixed; top: 20px; left: 20px; z-index: 1001; background: var(--white-color); border: 1px solid #ccc; padding: 8px 12px; font-size: 24px; color: var(--text-color); cursor: pointer; border-radius: 4px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
  
  /* BOTÓN FLOTANTE DE PLANOS */
  #floating-planos-button {
      position: fixed;
      top: 95px; 
      left: 20px;
      z-index: 999;
      display: block; 
      animation: 
          pulse-animation 2s infinite ease-in-out,
          float-animation 4s infinite ease-in-out alternate; 
      border-radius: 50%; 
  }
  
  #floating-planos-button img {
      width: 70px; 
      height: 70px;
      border-radius: 50%; 
      object-fit: cover; 
      box-shadow: 0 6px 15px rgba(0, 0, 0, 0.35); 
      display: block; 
      transition: transform 0.2s ease-out;
  }
  
  #floating-planos-button:hover img {
      transform: scale(1.1); 
  }
  
  @keyframes pulse-animation {
      0%, 100% {
          transform: scale(1); 
      }
      50% {
          transform: scale(1.08); 
      }
  }
  
  @keyframes float-animation { 
      0% {
          transform: translateY(0px);
      }
      100% { 
          transform: translateY(-8px); 
      }
  }
  
  #main-nav { position: fixed; top: 0; left: 0; width: 250px; height: 100%; background-color: var(--white-color); box-shadow: 2px 0 5px rgba(0,0,0,0.1); transform: translateX(-100%); transition: transform 0.3s ease-in-out; z-index: 1000; padding-top: 70px; overflow-y: auto; }
  #main-nav.active { transform: translateX(0); }
  #main-nav ul { list-style: none; }
  #main-nav ul li a { 
      display: block; 
      padding: 15px 25px; 
      text-decoration: none; 
      color: var(--nav-link-color); 
      font-weight: bold; 
      border-bottom: 1px solid #eee; 
      transition: background-color 0.3s ease, color 0.3s ease, padding-left 0.3s ease; 
  }
  #main-nav ul li a:hover { 
      background-color: var(--nav-link-hover-bg); 
      color: var(--nav-link-hover-color); 
      padding-left: 30px; 
      text-decoration: none; 
  }
  
  #page-container { transition: transform 0.3s ease-in-out; background-color: var(--white-color); padding-top: 1px; }
  
  /* Banner superior con logo y título */
  #top-branding-banner { 
      background-color: var(--white-color); 
      padding: 10px 0; /* MODIFICADO: Aumentar padding para más espacio al logo */
      display: flex; 
      align-items: center; 
      justify-content: center; 
      text-align: center; 
      position: relative; 
      border-bottom: 1px solid #e0e0e0; 
  }
  .header-logo-container { display: inline-flex; align-items: center; }
  #header-logo-icon-small { 
      height: 70px;     /* MODIFICADO: Aumentada altura base */
      max-height: 80px; /* MODIFICADO: Aumentada altura máxima base */
      width: auto;      /* Dejar que el ancho se ajuste */
      object-fit: contain; 
      margin-right: 20px; /* MODIFICADO: Aumentar margen si es necesario */
      border-radius: 4px; 
  }
  #header-logo-text-title { 
      font-size: clamp(1em, 2.5vw, 1.4em); /* MODIFICADO: Ajustado ligeramente por si el logo es más grande */
      color: var(--text-color); 
      font-weight: 500; 
  }
  
  
  #hero {
    background-color: var(--hero-fallback-bg-color); 
    background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url('images/header.webp'); 
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    color: var(--hero-text-color-on-image);
    padding: 100px 0; 
    text-align: center;
    position: relative;
    min-height: 60vh; 
    display: flex;
    align-items: center;
    justify-content: center;
  }
  #hero .container { max-width: 800px; position: relative; z-index: 2; }
  #hero h1 { font-family: var(--serif-font); font-size: clamp(2.2em, 5vw, 3.2em); font-weight: normal; margin-bottom: 25px; text-shadow: 1px 1px 4px rgba(0,0,0,0.7); }
  #hero p.subtitulo { font-family: var(--serif-font); font-size: clamp(1.2em, 3vw, 1.5em); margin-bottom: 40px; color: var(--hero-text-color-on-image); text-shadow: 1px 1px 3px rgba(0,0,0,0.6); }
  .hero-contact-link { font-family: var(--sans-serif-font); color: var(--white-color); background-color: var(--link-color); font-size: 1.1em; font-weight: bold; text-decoration: none; padding: 14px 28px; border-radius: 5px; transition: background-color 0.3s ease, transform 0.2s ease; display: inline-block; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
  .hero-contact-link:hover { background-color: #00418a; transform: translateY(-2px); }
  
  .content-section { padding: 60px 0; }
  .content-section h2 {
    font-family: var(--serif-font);
    font-size: clamp(1.8em, 4vw, 2.2em);
    color: var(--heading-color);
    text-align: center;
    margin-bottom: 40px;
  }
  .alt-bg { background-color: var(--light-bg-color); }
  
  .service-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr); 
      gap: 20px; 
  }
  .service-item { background-color: var(--white-color); padding: 25px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.07); text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
  .service-item:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
  .service-item img { 
      width: 100%; 
      height: 200px; 
      object-fit: cover; 
      border-radius: 5px; 
      margin-bottom: 20px; 
  }
  .service-item h3 { font-family: var(--serif-font); font-size: 1.6em; color: var(--heading-color); margin-bottom: 10px; }
  .service-item p { flex-grow: 1; font-size: 0.95em; color: #555; }
  
  #nosotros .about-us-intro { text-align: center; font-size: 1.15em; line-height: 1.7; margin-bottom: 50px; max-width: 800px; margin-left: auto; margin-right: auto; color: #444; }
  .about-features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 30px; }
  .feature-item { background-color: var(--white-color); padding: 30px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.07); border-left: 5px solid var(--primary-action-color); }
  .feature-item h4 { font-family: var(--serif-font); font-size: 1.4em; color: var(--heading-color); margin-bottom: 15px; }
  .feature-item p { font-size: 0.95em; color: #555; }
  
  #equipo { background-color: var(--white-color); }
  .expert-profile { background-color: var(--light-bg-color); padding: 35px; border-radius: 10px; box-shadow: 0 8px 25px rgba(0,0,0,0.08); max-width: 900px; margin: 0 auto; }
  .expert-profile .expert-photo { 
      width: 160px; 
      height: 160px; 
      border-radius: 50%; 
      object-fit: cover; 
      margin: 0 auto 25px auto; 
      display: block; 
      border: 4px solid var(--primary-action-color); 
  }
  .expert-profile h3 { font-family: var(--serif-font); font-size: 2em; color: var(--heading-color); text-align: center; margin-bottom: 8px; }
  .expert-profile h4 { font-family: var(--sans-serif-font); font-size: 1.2em; color: var(--primary-action-color); text-align: center; font-weight: bold; margin-bottom: 25px; text-transform: uppercase; letter-spacing: 1px; }
  .expert-profile .expert-intro { font-size: 1.05em; text-align: center; margin-bottom: 30px; color: #444; line-height: 1.7; }
  .expert-details-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 20px; }
  .expert-details-columns > div p strong { font-family: var(--sans-serif-font); font-weight: 600; color: var(--heading-color); font-size: 1.1em; display: block; margin-bottom: 10px; }
  .expert-profile p, .expert-profile ul { margin-bottom: 15px; line-height: 1.7; color: #555; font-size: 0.95em; }
  .expert-profile ul { list-style-type: disc; list-style-position: outside; padding-left: 20px; }
  .expert-profile ul li { margin-bottom: 5px; }
  
  /* Contacto Section Styling */
  #contacto {
      background-image: linear-gradient(rgba(20, 20, 20, 0.75), rgba(20, 20, 20, 0.75)), url('images/imagen_fondo.webp'); 
      background-size: cover;
      background-position: center center;
      background-attachment: fixed;
      color: var(--white-color);
      padding: 60px 0;
  }
  .contact-main-title-wrapper {
      text-align: center;
      margin-bottom: 40px;
  }
  .contact-main-title-wrapper h2 { 
      font-family: var(--serif-font); 
      font-size: clamp(2em, 4.5vw, 2.4em); 
      color: var(--white-color); 
      margin-bottom: 15px; 
  }
  .contact-main-title-wrapper p {
      font-size: 1.1em;
      color: #e0e0e0;
      max-width: 700px;
      margin-left: auto;
      margin-right: auto;
  }
  
  .contact-layout {
      display: grid; 
      grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
      gap: 30px;
      align-items: stretch; 
  }
  
  .contact-map,
  .contact-details-wrapper,
  .contact-form-wrapper {
      background-color: rgba(0, 0, 0, 0.55); 
      border-radius: 8px;
      padding: 25px;
      display: flex;
      flex-direction: column;
  }
  
  .contact-map { 
      padding: 0; 
      overflow: hidden; 
  }
  
  .contact-map iframe {
      width: 100%; 
      height: 100%; 
      min-height: 350px; 
      border: none; 
  }
  
  .contact-details-wrapper h3,
  .contact-form-wrapper h3 { 
      font-family: var(--serif-font); 
      font-size: 1.8em; 
      color: var(--white-color);
      margin-bottom: 25px; 
      text-align: left; 
  }
  
  .contact-info-group {
      margin-bottom: 20px;
      display: flex;
      align-items: flex-start; 
  }
  .contact-info-group .icon-placeholder { 
      margin-right: 15px;
      font-size: 1.4em; 
      color: var(--white-color); 
      width: 25px; 
      text-align: center;
      flex-shrink: 0; 
      margin-top: 2px; 
  }
  .contact-info-group div h4 { 
      font-size: 1.15em;
      font-weight: bold;
      margin: 0 0 5px 0;
      color: var(--white-color);
      font-family: var(--sans-serif-font);
  }
   .contact-info-group div h4 a {
       color: var(--white-color);
       text-decoration: none;
   }
   .contact-info-group div h4 a:hover {
       text-decoration: underline;
   }
  .contact-info-group div p { 
      font-size: 1em;
      margin: 0;
      color: #e0e0e0; 
      font-family: var(--sans-serif-font);
  }
  
  .social-share {
      margin-top: auto; 
      padding-top: 20px; 
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
  }
  .social-share .social-btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 10px; 
      border-radius: 5px;
      text-decoration: none;
      color: var(--white-color);
      font-weight: 500;
      transition: opacity 0.3s ease;
      min-width: 44px; 
      height: 44px;
      font-size: 0.9em; 
      line-height: 1; 
      border: none; 
  }
  .social-share .social-btn:hover { opacity: 0.8; text-decoration: none; }
  
  .social-share .social-btn .icon-placeholder-social { 
      font-size: 1.3em; 
      margin-right: 0; 
  }
  .social-share .social-btn.facebook-btn .icon-placeholder-social {
      margin-right: 8px; 
  }
  
  .social-share .facebook-btn { background-color: #3b5998; padding-left: 15px; padding-right: 15px;} 
  .social-share .email-btn { background-color: #777; } 
  .social-share .whatsapp-btn { background-color: #25D366; }
  .social-share .share-btn { background-color: #55acee; } 
  .social-share .messenger-btn { background-color: #0084ff; }
  
  #contact-form-main label { 
      display: block; 
      margin-bottom: 8px; 
      font-weight: bold; 
      color: #e0e0e0; 
  }
  #contact-form-main input[type="text"], 
  #contact-form-main input[type="email"], 
  #contact-form-main textarea { 
      width: 100%; 
      padding: 12px; 
      margin-bottom: 20px; 
      border: 1px solid #555; 
      border-radius: 4px; 
      font-size: 1em; 
      font-family: var(--sans-serif-font); 
      background-color: rgba(255, 255, 255, 0.1); 
      color: var(--white-color); 
  }
  #contact-form-main input[type="text"]::placeholder,
  #contact-form-main input[type="email"]::placeholder,
  #contact-form-main textarea::placeholder {
      color: #bbb; 
  }
  
  #contact-form-main input[type="text"]:focus, 
  #contact-form-main input[type="email"]:focus, 
  #contact-form-main textarea:focus { 
      border-color: var(--primary-action-color); 
      outline: none; 
      box-shadow: 0 0 0 0.2rem rgba(0,123,255,.35);
      background-color: rgba(255, 255, 255, 0.15);
  }
  #contact-form-main textarea { resize: vertical; min-height: 100px; } 
  
  .cta-button-form { 
      display: inline-block; 
      background-color: var(--primary-action-color); 
      color: var(--white-color); 
      padding: 12px 25px; 
      text-decoration: none; 
      font-weight: bold; 
      border-radius: 5px; 
      border: none; 
      cursor: pointer; 
      transition: background-color 0.3s ease; 
      width: 100%; 
      font-size: 1.1em;
  }
  .cta-button-form:hover { background-color: var(--link-color); }
  
  
  #form-status {
      margin-top: 15px;
      font-size: 0.9em;
      min-height: 1.2em; 
  }
  
  
  #main-footer { background-color: #343a40; color: var(--white-color); text-align: center; padding: 30px 0; margin-top: auto; }
  .footer-credit {
      font-size: 0.85em;
      color: #adb5bd; 
      margin-top: 10px;
  }
  
  
  @media (max-width: 992px) { /* Tablets */
      .contact-layout {
          grid-template-columns: 1fr; 
      }
      
      #header-logo-icon-small { 
          height: 60px;     /* MODIFICADO */
          max-height: 70px; /* MODIFICADO */
          margin-right: 15px;
      } 
      
      .service-grid { 
          grid-template-columns: repeat(4, 1fr); 
          gap: 15px; 
      }
      .about-features-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
      .expert-details-columns { grid-template-columns: 1fr; gap: 20px; } 
  }
  
  @media (max-width: 768px) { /* Móviles */
    #top-branding-banner { 
        min-height: auto; 
        padding: 10px 15px; 
    }
    .header-logo-container { 
        flex-direction: row; 
        align-items: center;
    }
    #header-logo-icon-small { 
        height: 50px;     /* MODIFICADO */
        max-height: 60px; /* MODIFICADO */
        margin-right: 10px;
    }
  
    #hero { 
        min-height: 45vh; 
        padding: 80px 0; 
        background-attachment: scroll; 
    }
    
    .content-section h2 { margin-bottom: 30px; }
    
    .service-grid { 
        grid-template-columns: 1fr; 
    }
    .about-features-grid { grid-template-columns: 1fr; }
    
    .expert-profile { padding: 25px; }
    .expert-profile h3 {font-size: 1.6em;}
    .expert-profile h4 {font-size: 1em;}
    .expert-profile .expert-photo { width: 120px; height: 120px;}
  
    #main-nav { padding-top: 60px; width: 220px; } 
    
    #contacto { 
        background-attachment: scroll; 
    }
    
    .contact-details-wrapper h3, .contact-form-wrapper h3 { font-size: 1.5em; text-align: center; } 
    .contact-map iframe { min-height: 300px; } 
  
    #floating-planos-button {
      top: auto; 
      bottom: 20px; 
      left: 20px; 
      animation: pulse-animation 2s infinite ease-in-out; 
    }
     #floating-planos-button img { 
        width: 50px; 
        height: 50px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
      }
  }
  
  @media (max-width: 480px) { /* Móviles muy pequeños */
      #header-logo-icon-small { 
          height: 45px;     /* MODIFICADO */
          max-height: 50px; /* MODIFICADO */
          margin-right: 8px;
      }
      .hero-contact-link { padding: 12px 20px; font-size: 1em; }
      .contact-details-wrapper, .contact-form-wrapper { padding: 20px; }
      .contact-details-wrapper h3, .contact-form-wrapper h3 { font-size: 1.4em; }
      .social-share .social-btn { font-size: 0.8em; padding: 8px; min-width: 38px; height: 38px; }
      .social-share .social-btn.facebook-btn { padding-left: 10px; padding-right: 10px;}
      .social-share .social-btn .icon-placeholder-social { font-size: 1.1em; }
      .social-share .social-btn.facebook-btn span:not([class*="icon"]) { display: none; } 
      .social-share .social-btn.facebook-btn .icon-placeholder-social { margin-right: 0; }

      .footer-credit { font-size: 0.8em; }
  
      #floating-planos-button img {
        width: 45px; 
        height: 45px;
      }
  }