/* -------------------- RESET -------------------- */
body, header, nav, main, footer, img, h1, h2, h3 {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
}

/* -------------------- BASE -------------------- */
body {
    background-color: #f6eee4;
    font-family: Verdana, Arial, sans-serif;
    line-height: 1.6;
    color: #2a1f14;
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    display: block;
}

/* -------------------- NAV -------------------- */
nav {
    background-color: #2a1f14;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

nav ul {
    list-style-type: none;
    margin: 0;
    text-align: center;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

nav li {
    display: inline-block;
    font-size: 1.2em;
    font-family: Geneva, Arial, sans-serif;
    font-weight: bold;
    margin: 0 10px;
}

nav li a {
    display: block;
    color: #f6eee4;
    padding: 0.5em 2em;
    text-decoration: none;
    transition: all 0.3s ease;
}

nav li a:hover,
nav li a.active {
    background-color: #f6eee4;
    color: #2a1f14;
}

/* -------------------- NAV LOGO -------------------- */
.nav-logo img {
    height: 50px;        
    width: auto;         
    display: block;
    border-radius: 8px;  
    cursor: pointer;     
    transition: transform 0.3s ease;
}

.nav-logo img:hover {
    transform: scale(1.05);  
}

/* -------------------- HERO SECTION -------------------- */
.hero-container {
    position: relative;
    text-align: center;
}

.hero-container img {
    width: 100%;
    height: auto;
}

.hero-text {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: Geneva, Arial, sans-serif;
    font-size: 2.8em;
    font-weight: bold;
    color: #f6eee4;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px 40px;
    border-radius: 15px;
    backdrop-filter: blur(6px);
    text-shadow: 0 0 10px #2a1f14, 0 0 20px #2a1f14;
    transition: all 0.3s ease;
}

.hero-text:hover {
    background: rgba(0, 0, 0, 0.6);
    transform: translate(-50%, -50%) scale(1.05);
}

/* -------------------- HEADINGS -------------------- */
h1 {
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 3.5em;
}

h2 {
    font-size: 1.6em;
    color: #2a1f14;
    font-weight: bold;
    margin: 3em 0 1em;
    transition: all 0.3s ease;
}

h2:hover {
    color: #b36b2c;
    transform: scale(1.05);
}

h3 {
    font-size: 1.4em;
    color: #2a1f14;
    font-weight: normal;
    margin: 0;
    transition: all 0.3s ease;
}

h3:hover {
    color: #b36b2c;
    transform: scale(1.05);
}

/* -------------------- MAIN CONTENT -------------------- */
main {
    padding: 3% 10%;
}

main p {
    font-size: 1.1em;
    margin-bottom: 2em;
}

main ul {
    list-style-type: disc;
    margin-left: 40px;
    margin-top: 10px;
    margin-bottom: 35px;
}

main li {
    font-size: 1.05em;
    margin-bottom: 0.8em;
}

.link {
    color: #4d3319;
    text-decoration: none;
    font-weight: bold;
    font-style: italic;
}

.link:hover {
    color: #b36b2c;
    text-decoration: underline;
}

.action {
    font-size: 1.3em;
    text-align: center;
    font-weight: bold;
    margin-top: 3em;
}

/* -------------------- FOOTER -------------------- */
footer {
    text-align: center;
    font-size: 0.9em;
    background-color: #2a1f14;
    color: #f6eee4;
    padding: 1.5% 0;
    margin-top: 60px;
}

footer a {
    color: #f6eee4;
    text-decoration: none;
}

/* -------------------- SECCIONES -------------------- */
section {
    padding: 120px 10% 160px;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
    margin-bottom: 80px;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

section:nth-of-type(odd) {
    background-color: #f6eee4;
}

section:nth-of-type(even) {
    background-color: #ffffff;
}

header {
    margin-bottom: 120px;
}

/* -------------------- MEDIA QUERIES -------------------- */
@media (max-width: 1024px) {
    nav li {
        font-size: 1.1em;
    }
    main {
        padding: 3% 5%;
    }
    .hero-text {
        font-size: 2em;
        padding: 15px 25px;
    }
}

@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }
    nav li {
        display: block;
        margin-bottom: 5px;
    }
    .hero-text {
        font-size: 1.5em;
        padding: 10px 15px;
    }
    main p, main li {
        font-size: 1em;
    }
    h2 {
        font-size: 1.4em;
    }
    h3 {
        font-size: 1.2em;
    }
}

/* -------------------- ABOUT US -------------------- */
#about-us {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    padding: 50px 20px;
}

#about-us h2 {
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 3em;
}

#about-us p {
    margin-bottom: 1.2em;
    line-height: 1.6;
    font-size: 1.1em;
}

/* -------------------- IMÁGENES MODERNAS -------------------- */
.about-img {
    width: 100%;
    max-width: 500px;         
    margin: 30px auto 0 auto;
    display: block;
    border-radius: 20px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(50px);
}

.about-img:hover {
    transform: scale(1.05) rotate(-1deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

section.visible .about-img {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease-out;
}

/* -------------------- TITULO CLIENTS -------------------- */
h3.clients-title {
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    font-size: 1.8em;
    margin: 30px 0 20px 0;
    color: #2a1f14;
    transition: all 0.3s ease;
}

h3.clients-title:hover {
    color: #b36b2c;
    transform: scale(1.05);
}

/* -------------------- CONTACT SECTION -------------------- */
#contact {
    line-height: 1.2; 
    margin-top: 40px; 
    margin-bottom: 40px;
}

#contact p {
    margin-bottom: 0.8em; 
}

/* -------------------- TIMELINE -------------------- */
#timeline {
    padding: 100px 10%;
    background-color: #ffffff;
    position: relative;
}

#timeline h2 {
    text-align: center;
    font-size: 1.8em;
    margin-bottom: 2em;
    color: #2a1f14;
}

/* Línea central */
.timeline {
    position: relative;
    max-width: 900px;
    margin: auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: #b36b2c;
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    z-index: 1;
}

/* Items */
.timeline-item {
    padding: 20px 40px;
    position: relative;
    width: 50%;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
    margin-bottom: 60px;
}

/* Círculos */
.timeline-item::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 25px;
    background-color: #f6eee4;
    border: 4px solid #b36b2c;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

/* Lado izquierdo y derecho */
.timeline-item.left {
    left: 0;
}

.timeline-item.right {
    left: 50%;
}

.timeline-item.right::after {
    left: -13px;
}

.timeline-item.left::after {
    right: -13px;
}

/* Contenido del cuadro flexible */
.content {
    background-color: #f6eee4;
    padding: 20px 25px;
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center; /* centra verticalmente según contenido */
    align-items: center;     /* centra horizontalmente */
    text-align: center;
    height: auto;            /* altura automática */
}

/* Año / título */
.content h3 {
    color: #b36b2c;
    margin-bottom: 1em; /* separación entre año y texto */
    font-size: 1.6em;
}

/* Texto del cuadro */
.content p {
    margin: 0;
    font-size: 1em;
    line-height: 1.5;
}

/* Márgenes para alinear con la línea */
.timeline-item.left .content {
    margin-right: 30px;
}

.timeline-item.right .content {
    margin-left: 30px;
}

/* Hover en cuadros */
.timeline-item .content:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

/* Animación al hacer visible */
section.visible .timeline-item {
    opacity: 1;
    transform: translateY(0);
}

/* -------------------- RESPONSIVE -------------------- */
@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item.right {
        left: 0;
    }

    .timeline-item::after {
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    .timeline-item .content {
        padding: 20px;
        height: auto;
    }
}
