/*
  style.css - Versión Experta para "Fundacion Desde la Raiz"
  Principios: Confianza, Serenidad, Profesionalismo, Claridad.
*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700;800&family=Roboto:wght@400;500&display=swap');

:root {
    /* Paleta de Colores Confiable */
    --color-primary: #2c3e50;       /* Azul Naval Oscuro - para textos principales y fondos */
    --color-secondary: #3498db;     /* Azul Brillante - para botones, enlaces y acentos */
    --color-accent: #e74c3c;        /* Rojo Suave - para CTAs urgentes (usar con moderación) */
    --color-light: #ffffff;         /* Blanco */
    --color-background: #f8f9fa;    /* Gris muy claro para fondos de sección */
    --color-text: #555;             /* Gris oscuro para párrafos */
    --color-text-light: #bdc3c7;    /* Gris claro para subtítulos en fondos oscuros */

    /* Tipografía */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', sans-serif;

    /* Estilos Globales */
    --shadow-soft: 0 5px 15px rgba(0, 0, 0, 0.07);
    --shadow-medium: 0 8px 25px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- BASE --- */
*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-light);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* --- TIPOGRAFÍA --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.3;
    font-weight: 700;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 800; margin-bottom: 1rem; }
h2 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 1.5rem; text-align: center; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }
h4 { font-size: 1.2rem; font-weight: 600; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; }
a { color: var(--color-secondary); text-decoration: none; transition: var(--transition); }
a:hover { color: #2980b9; }

/* --- BOTONES (CTAs) --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}
.btn i { margin-right: 10px; }

.btn-primary { background-color: var(--color-secondary); color: var(--color-light); }
.btn-primary:hover { background-color: #2980b9; transform: translateY(-3px); box-shadow: var(--shadow-medium); }

.btn-secondary { background-color: transparent; color: var(--color-light); border: 2px solid var(--color-light); }
.btn-secondary:hover { background-color: var(--color-light); color: var(--color-primary); }

.btn-danger { background-color: var(--color-accent); color: var(--color-light); }
.btn-danger:hover { background-color: #c0392b; transform: translateY(-3px); box-shadow: var(--shadow-medium); }

/* --- HEADER --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #ffffff; /* Changed from rgba */
    backdrop-filter: none; /* Removed blur */
    box-shadow: var(--shadow-soft);
    transition: top 0.3s;
}
.header-content { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; }
.logo { text-decoration: none; }
.logo img {
    height: 80px;
    width: auto;
    vertical-align: middle;
}
.main-nav a { margin-left: 32px; font-weight: 600; font-size: 1rem; }

/* --- SECCIONES --- */
section { padding: 100px 0; }
.section-bg { background-color: var(--color-background); }
.section-dark { background-color: var(--color-primary); color: var(--color-light); }
.section-dark h2, .section-dark h3, .section-dark h4 { color: var(--color-light); }
.section-dark p { color: var(--color-text-light); }

.section-header { text-align: center; max-width: 750px; margin: 0 auto 60px auto; }
.section-header .tag {
    display: inline-block;
    padding: 8px 20px;
    margin-bottom: 1rem;
    background: var(--color-secondary);
    color: var(--color-light);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}
.section-header p { font-size: 1.15rem; color: #6c757d; }

/* --- HERO --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--color-light);
    padding: 0;
}
.hero::before { /* Overlay */
    content: '';
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(0deg, rgba(44, 62, 80, 0.8) 0%, rgba(44, 62, 80, 0.4) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero h1 { color: var(--color-light); text-shadow: 0 3px 8px rgba(0,0,0,0.5); }
.hero .subtitle { font-size: 1.5rem; color: rgba(255, 255, 255, 0.9); margin: 1.5rem 0 2.5rem; font-family: var(--font-body); font-weight: 400; }
.hero .btn { margin: 0 10px; }

/* --- DESAFÍOS (Cards) --- */
.challenges-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.challenge-card {
    background: var(--color-light);
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    overflow: hidden; /* To contain the image corners */
}
.challenge-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-medium); }
.challenge-card .card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.challenge-card-content {
    padding: 30px;
}

/* --- SERVICIOS (Alternating Layout) --- */
.service-item { display: flex; align-items: center; gap: 60px; margin-bottom: 80px; }
.service-item:last-child { margin-bottom: 0; }
.service-item:nth-child(even) { flex-direction: row-reverse; }
.service-image { flex: 1 1 50%; }
.service-image img { width: 100%; border-radius: var(--border-radius); box-shadow: var(--shadow-medium); }
.service-content { flex: 1 1 50%; }
.service-content .tag { font-weight: 700; color: var(--color-secondary); margin-bottom: 0.5rem; display: block; }

/* --- PROCESO (Timeline) --- */
.process-timeline { position: relative; max-width: 800px; margin: 60px auto 0; }
.process-timeline::after {
    content: ''; position: absolute; width: 4px; background-color: #dee2e6;
    top: 0; bottom: 0; left: 50%; margin-left: -2px; z-index: 1;
}
.process-step { padding: 10px 40px; position: relative; background-color: inherit; width: 50%; }
.process-step:nth-child(odd) { left: 0; }
.process-step:nth-child(even) { left: 50%; }
.process-step::after { /* Círculos en la línea de tiempo */
    content: ''; position: absolute; width: 20px; height: 20px;
    right: -10px; background-color: var(--color-light); border: 4px solid var(--color-secondary);
    top: 15px; border-radius: 50%; z-index: 2;
}
.process-step:nth-child(even)::after { left: -10px; }
.process-content { padding: 35px 40px; background-color: var(--color-light); border-radius: var(--border-radius); box-shadow: var(--shadow-soft); }
.process-content h4 { color: var(--color-secondary); }

/* --- VENTAJAS --- */
.advantages-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }
.advantage-item { display: flex; align-items: flex-start; gap: 20px; }
.advantage-item i { font-size: 2.5rem; color: var(--color-secondary); }

/* --- CTA SECTION (Simple) --- */
.cta-simple { padding: 80px 0; text-align: center; }
.cta-simple h2 { margin-bottom: 2rem; }

/* --- TESTIMONIOS --- */
.testimonials {
    position: relative;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 120px 0;
}
.testimonials::before {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(44, 62, 80, 0.88);
}
.testimonials .container { position: relative; z-index: 2; }
.testimonials .section-header h2, .testimonials .section-header p { color: var(--color-light); }

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: var(--border-radius);
    color: var(--color-light);
}
.testimonial-card p { font-style: italic; font-size: 1.1rem; color: rgba(255,255,255,0.9); margin-bottom: 1.5rem; }
.testimonial-card .author { font-style: normal; font-weight: 700; }
.testimonial-card .author span { display: block; font-weight: 400; font-size: 0.9rem; color: var(--color-text-light); }


/* --- PRE-FOOTER LOGO --- */
.pre-footer-logo {
    padding: 60px 0;
    text-align: center;
    background-color: var(--color-background);
}
.pre-footer-logo img {
    max-width: 100%; /* For responsiveness */
    width: 300px; /* Fixed width as requested */
    height: auto;   /* For "real size" */
}

/* --- FOOTER --- */
.main-footer { padding: 80px 0 30px 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 60px; text-align: left; }
.footer-about p { margin-bottom: 1rem; }
.footer-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 1.5rem; }
.footer-links a { display: block; margin-bottom: 0.75rem; color: var(--color-light); }
.footer-links a:hover { color: var(--color-secondary); }
.footer-bottom { text-align: center; padding-top: 30px; border-top: 1px solid #e9ecef; }
.footer-bottom a { color: var(--color-light); }

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .challenges-grid { grid-template-columns: 1fr; }
    .service-item, .service-item:nth-child(even) { flex-direction: column; text-align: center; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    .main-nav {
        display: flex;
        flex-direction: column;
        width: 100%;
        text-align: center;
        margin-top: 1rem;
    }
    .main-nav a {
        margin-left: 0;
        padding: 0.75rem;
        border-bottom: 1px solid #eee;
    }
    .main-nav a:last-child {
        border-bottom: none;
    }

    .hero { height: auto; padding: 120px 0; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .advantages-grid { grid-template-columns: 1fr; }
    .process-timeline::after { left: 20px; } /* Adjusted for mobile */
    .process-step, .process-step:nth-child(odd), .process-step:nth-child(even) { /* Combined for clarity */
        width: 100%;
        padding-left: 60px; /* More space for the dot */
        padding-right: 10px;
        left: 0;
        text-align: left;
    }
    .process-step::after, .process-step:nth-child(odd)::after, .process-step:nth-child(even)::after { /* Combined for clarity */
        left: 10px; /* Position dot on the left */
        right: auto;
    }
}

/* --- BACKGROUND IMAGE UTILITIES --- */
.hero-bg {
    background-image: url('fotos/vivir-libre-comunidad-terapeutica-1.jpg');
}

.testimonials-bg {
    background-image: url('fotos/comunidad-terapeutica-vivir-libre.jpg');
}


