/* =========================================
   Design System Variables — miCranio-Alex
   ========================================= */
:root {
    --color-blue:   #b2c8da;   /* AZUL */
    --color-green:  #99a799;   /* VERDE salvia */
    --color-red:    #a62320;   /* ROJO acento */
    --color-black:  #494948;   /* NEGRO/gris cálido */

    --primary-color: var(--color-green);
    --primary-hover: #7d8c7d;
    --accent-color:  var(--color-red);
    --soft-color:    var(--color-blue);
    --soft-bg:       #eef3f8;  /* azul muy diluido */

    --text-main:  var(--color-black);
    --text-light: #6c6c6b;
    --bg-color:   #fbfbfa;
    --bg-light:   #f1f4ef;     /* verde muy diluido */
    --white: #FFFFFF;
    --border-color: #e2e4df;

    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Tipografías según manual: corrido Arial Narrow, logo y datos Segoe UI Light */
    --font-body:   "Arial Narrow", "Arial", "Helvetica Neue", Helvetica, sans-serif;
    --font-title:  "Arial Narrow", "Arial Black", Arial, sans-serif;
    --font-logo:   "Segoe UI Light", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --font-fine:   "Segoe UI Light", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

    --shadow-sm: 0 2px 8px rgba(73, 73, 72, 0.06);
    --shadow-md: 0 4px 14px rgba(73, 73, 72, 0.10);
}

/* =========================================
   Reset & Base
   ========================================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.65;
    overflow-x: hidden;
    font-stretch: condensed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: 0.5px;
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

h3 {
    font-size: 1.35rem;
    margin-top: 2rem;
    color: var(--primary-hover);
}

h4 {
    font-family: var(--font-title);
    font-weight: 700;
}

p { margin-bottom: 1.1rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover { color: var(--accent-color); }

strong { color: var(--color-black); }

/* =========================================
   Header & Navigation
   ========================================= */
.header {
    background-color: var(--white);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.9rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.logo-img {
    height: 64px;
    width: auto;
    display: block;
}

.nav { display: flex; }

.nav-list {
    display: flex;
    list-style: none;
    gap: 1.6rem;
}

.nav-list a {
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-list a:hover { color: var(--accent-color); }
.nav-list a:hover::after { width: 100%; }

.contact-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-family: var(--font-fine);
    font-weight: 300;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
}

.contact-info a {
    color: var(--text-light);
    font-weight: 300;
}

.contact-info a:hover { color: var(--accent-color); }

/* Main Title Bar */
.main-title-bar {
    text-align: center;
    padding: 0.9rem 1rem;
    background-color: var(--soft-bg);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.main-title-bar h1 {
    font-family: var(--font-logo);
    font-size: 1.6rem;
    font-weight: 300;
    letter-spacing: 3px;
    color: var(--color-black);
    margin: 0;
    text-transform: uppercase;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-main);
    transition: var(--transition);
}

/* =========================================
   Layout
   ========================================= */
.layout-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 3rem;
    padding: 3rem 2rem;
}

.content-wrapper {
    display: block;
}

.sections-container {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

/* =========================================
   Sections
   ========================================= */
.section {
    background-color: var(--white);
    padding: 2.5rem 3rem 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 3px solid var(--color-green);
}

.section:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.bg-light {
    background-color: var(--bg-light);
    border-top-color: var(--color-blue);
}

/* Two-column layout when a section has a lateral image
   The image lives OUTSIDE the white card, like the old main portrait */
.section.has-image {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    align-items: start;
    background: transparent;
    box-shadow: none;
    border-top: none;
    padding: 0;
    border-radius: 0;
}

.section.has-image:hover {
    box-shadow: none;
    transform: none;
}

.section.has-image.image-right {
    grid-template-columns: 1fr 280px;
}

.section.has-image.image-right .section-image {
    order: 2;
}

.section-image {
    margin: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 180px;
    border: 4px solid var(--white);
    outline: 1px solid var(--soft-color);
}

.section-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.section-image:hover img { transform: scale(1.03); }

/* The white card now lives only on the text side */
.section.has-image .section-body {
    min-width: 0;
    background-color: var(--white);
    padding: 2.5rem 3rem 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    border-top: 3px solid var(--color-green);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section.has-image.bg-light .section-body {
    background-color: var(--bg-light);
    border-top-color: var(--color-blue);
}

.section.has-image .section-body:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.highlight-text {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-hover);
    margin-top: 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--accent-color);
}

.large-text {
    font-size: 1.25rem;
    margin-top: 1.5rem;
}

.cta-wrap {
    text-align: center;
    margin-top: 1.5rem;
}

.text-action {
    display: inline-block;
    padding: 0.95rem 2rem;
    background-color: var(--accent-color);
    color: var(--white) !important;
    border-radius: 30px;
    border: none;
    font-family: var(--font-title);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.95rem;
    line-height: 1.35;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    margin-top: 1rem;
}

.text-action:hover {
    background-color: #821a18;
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(166, 35, 32, 0.30);
}

.benefit-item {
    margin-top: 1.4rem;
    padding-left: 1rem;
    border-left: 2px solid var(--color-blue);
}

.benefit-item h4 {
    margin-bottom: 0.3rem;
    color: var(--accent-color);
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.energetik-list {
    list-style-type: none;
    margin-top: 1.5rem;
}

.energetik-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.energetik-list li::before {
    content: '•';
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -4px;
}

.energetik-list li strong { color: var(--primary-hover); }

/* Impressum bloque con tipografía fina */
#impressum .impressum-block {
    font-family: var(--font-fine);
    font-weight: 300;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.2rem;
    letter-spacing: 0.3px;
}

#impressum .impressum-block strong {
    font-family: var(--font-title);
    font-weight: 700;
    color: var(--color-black);
    letter-spacing: 0.5px;
}

#impressum a { color: var(--accent-color); }
#impressum a:hover { text-decoration: underline; }

#impressum .impressum-contact {
    display: grid;
    grid-template-columns: max-content 1fr;
    column-gap: 0.8rem;
    row-gap: 0.4rem;
    align-items: baseline;
}

#impressum .impressum-contact dt {
    font-family: var(--font-fine);
    font-weight: 300;
    color: var(--text-light);
    white-space: nowrap;
}

#impressum .impressum-contact dd {
    margin: 0;
    font-family: var(--font-fine);
    font-weight: 300;
    color: var(--text-light);
    line-height: 1.7;
}

/* =========================================
   Sidebar Testimonials
   ========================================= */
.sidebar {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    border-top: 3px solid var(--color-blue);
}

.sidebar-content.sticky {
    position: sticky;
    top: 180px;
    padding: 2rem;
}

.sidebar h3 {
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1.8rem;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.testimonial {
    margin-bottom: 1.8rem;
    position: relative;
}

.testimonial p {
    font-style: italic;
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 0;
}

.testimonial span.author {
    display: block;
    text-align: right;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--accent-color);
}

/* =========================================
   Footer
   ========================================= */
.site-footer {
    background-color: var(--color-black);
    color: #cfcfce;
    font-family: var(--font-fine);
    font-weight: 300;
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    padding: 1.2rem 2rem;
    margin-top: 2rem;
}

.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.site-footer a {
    color: #cfcfce;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* =========================================
   Animations
   ========================================= */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1100px) {
    .nav-list { gap: 1rem; }
    .nav-list a { font-size: 0.82rem; letter-spacing: 0.5px; }
}

@media (max-width: 1024px) {
    .layout-container {
        grid-template-columns: 1fr;
    }

    .sidebar-content.sticky {
        position: static;
        top: auto;
    }

    .section.has-image,
    .section.has-image.image-right {
        grid-template-columns: 240px 1fr;
        gap: 2rem;
    }
}

@media (max-width: 820px) {
    .section.has-image,
    .section.has-image.image-right {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .section.has-image .section-image,
    .section.has-image.image-right .section-image {
        order: 0;
        position: static;
        max-width: 320px;
        margin: 0 auto;
    }

    .section.has-image .section-body {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 0.8rem 1rem;
        flex-wrap: wrap;
    }

    .logo-img { height: 52px; }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        padding: 1rem 0;
        border-top: 1px solid var(--border-color);
    }

    .nav.active { display: block; }

    .nav-list {
        flex-direction: column;
        gap: 0;
        text-align: center;
    }

    .nav-list li {
        padding: 0.9rem 0;
        border-bottom: 1px solid var(--bg-light);
    }

    .contact-info { display: none; }

    .menu-toggle { display: flex; }

    .menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .main-title-bar h1 { font-size: 1.1rem; letter-spacing: 2px; }

    .layout-container { padding: 2rem 1rem; }

    .section { padding: 2rem 1.5rem; }

    .footer-inner { flex-direction: column; text-align: center; }
}
