/* css/layout.css */

/* Global Layout */
body {
  background-color: var(--bg-main);
  color: var(--text-main);
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

main {
  display: flex;
  flex-direction: column;
  align-items: center; /* Centra las secciones horizontalmente si superan el max-width */
  width: 100%;
}

.container {
  width: 100%;
  max-width: 2200px;
  padding: 0 var(--section-padding-x);
}

section {
  padding: 0 0 6rem;
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Smart Header */
.smart-header {
    display: flex;
    justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--bg-main);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  transition: transform var(--transition-normal), background-color var(--transition-normal);
}

.smart-header.nav-up {
  transform: translateY(-100%);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

/* Hero Section */
.hero {
    min-height: 200px;
    height: calc(100svh - var(--header-height));
    max-height: 800px;
    margin-top: var(--header-height);
    padding: 0;
    position: relative;
    background-image: url('../assets/panoramica.webp');
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-main);
    opacity: 0.65;
    z-index: 1;
    transition: background-color var(--transition-normal);
}

.hero > .container {
    position: relative;
    z-index: 2;
}

.hero-grid {
  display: grid;
  grid-template-columns: 5fr 3fr;
  gap: 4rem;
  align-items: center;
}

.hero-content{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-image{
    width: 40vw;
    max-width: 700px;
    height: max-content;
}

.hero-image .img-placeholder {
  aspect-ratio: 16/10;
  width: 100%;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Trust Strip */
.trust-strip {
  background-color: var(--bg-secondary);
  padding: 3rem 0;
  margin-bottom: 6rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  align-items: center;
  justify-items: center;
}

/* Problem Agitation */
.agitation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.agitation-content{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Services Bento Box */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: max-content;
  gap: 1.5rem;
}

.bento-item {
  grid-column: span 4;
}

.bento-item:nth-child(1) {
  grid-column: span 8;
  grid-row: span 2;
}


.bento-item:nth-child(4),
.bento-item:nth-child(5) {
  grid-column: span 6;
}

/* Testimonials */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}


.section-header {
  text-align: center;
  margin-bottom: 3rem;
}


/* Founder Section */
.founder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.founder-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.4rem;
}

/* Final CTA */
.final-cta { text-align: left; }

.final-cta-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

/* Footer */
footer {
  background-color: var(--bg-secondary);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border-color);
}

footer .container{
    max-width: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}



.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
}

.hero-actions .btn {
  white-space: normal;
  text-align: center;
}

.agitation-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}



/* --- REFACTORED INLINE STYLES FOR LAYOUT --- */

.header-brand-logo {
  max-height: 40px;
  width: auto;
}

.footer-brand-logo {
  max-width: 150px;
  height: auto;
}

.section-header p {
  margin: 0 auto;
}

.founder-visual{
    display: flex;
    justify-content: center;
}

.founder-content p {
  color: var(--text-muted);
  line-height: 1.7;
}

.founder-signature {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.final-cta-container {
  background-color: var(--bg-secondary);
  border: none;
}

.final-cta-container h2 {
  margin-bottom: 1.5rem;
}

.final-cta-container p {
  margin-bottom: 2rem;
}

/* Media Queries Dictionary */
@media (max-width: 1440px) {
  /* Adapts large desktop padding/margins */
}

@media (max-width: 1024px) {
    .founder-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }


    .hero{
        padding-top: 6vh; padding-bottom: 6vh;
        min-height: calc(100svh - var(--header-height));
        height: auto;
        max-height: auto;
    }

    .hero-grid,
    .agitation-grid {
        grid-template-columns: 1fr;
    }

    .hero-grid{
        grid-template-rows: auto max-content;
        justify-content: space-evenly;
    }

    .hero-content{
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        grid-template-areas:
        "title subtitle"
        "title actions";
        text-align: left;
    }

    .hero-content h1{
        grid-area: title;
        
    }

    .hero-content p{
        grid-area: subtitle;
    }

    .hero-actions {
        grid-area: actions;
        display: grid;
        grid-template-columns: 4fr 5fr;
        justify-content: center;
    }

    .hero-image{
        justify-self: center;
    }
  
  .agitation-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  
  .agitation-list {
    text-align: left;
    display: inline-flex;
  }

    .trust-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }
  
  .bento-item,
  .bento-item:nth-child(1),
  .bento-item:nth-child(4),
  .bento-item:nth-child(5) {
    grid-column: span 1;
    grid-row: auto;
  }
}

@media (max-width: 1024px) and (orientation: portrait) and (min-width: 769px){
    .hero{
        padding-top: 4rem; padding-bottom: 4rem;
        min-height: auto;
        height: calc(100svh - var(--header-height));
        max-height: 768px;
    }
}

@media (max-width: 1024px) and (orientation: landscape) and (max-height: 450px) {
  /* Specific for landscape on mobile devices */
}

@media (max-width: 768px) {
    .container{
        padding: 0 8%;
    }

    .header-container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: center;
  }

  .nav-links {
    display: none;
  }

    .hero{
        padding-top: 1rem; padding-bottom: 3rem;
    }

  .hero-content{
    display: flex;
    flex-direction: column;
  }

    .hero-image{
        width: 80vw;
    }

    .hero-image .img-placeholder{
        text-align: center;
    }

    .agitation-image{
        width: 80vw;
    }

    .section-header{
        text-align: start;
    }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 778px) and (orientation: landscape) {
  /* Landscape adjustments for small tablets */
}

@media (max-width: 340px) {
  .trust-strip {
    margin-top: 3rem;
  }
  
  .section-header, .final-cta {
    text-align: left;
  }
  
  .section-header p {
    margin: 0;
  }

  .container {
    padding: 0 5%;
  }

  .smart-header{
    align-items: center;
  }

  .hero-grid,
  .agitation-grid {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    height: 100%;
  }
  
  .hero-content,
  .agitation-content {
    align-items: flex-start;
  }
  
  .smart-header {
    height: auto;
    min-height: var(--header-height);
  }
  
  section {
    padding: 3rem 0;
    display: flex;
    justify-content: center;
    width: 100%;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
}
