/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #fffaf0;
    color: #333;
    line-height: 1.6;
}

/* Navbar */
header {
    background-color: #ff7f50;
    position: relative;
}

.navbar {
    width: 90%;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.navbar .nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.navbar .nav-links li {
    position: relative;
}

.navbar .nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 15px;
    display: block;
}

.navbar .nav-links li:hover > .submenu {
    display: block;
}

/* Submenu */
.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ff7f50;
    list-style: none;
    min-width: 150px;
    border-radius: 5px;
    z-index: 1000;
}

.submenu li a {
    padding: 10px 15px;
}

.submenu li a:hover {
    background-color: #ff6347;
}

/* Botón hamburguesa */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    color: #fff;
    cursor: pointer;
}

/* Hero */
.hero {
    padding-top: 30px;
    margin-right: 10%;
    margin-left: 10%;
}

.hero2 {
    padding-top: 30px;
}

h1 {
    color: rgb(0, 31, 77);
    text-shadow: 1px 1px 5px rgba(0,0,0,0.2);
    font-size: 35px;
}

.hero .btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 25px;
    background-color: #ff6347;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    transition: background 0.3s;
}

.hero .btn:hover {
    background-color: #ff4500;
}




/* Features */
.features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    padding: 20px 20px;
    background-color: #fff0f5;
    margin-top: 0;
    padding-top: 0;
    margin-top: -30px;
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    background-color: #fff0f5;
    padding-top: 0;
    margin-top: -30px;
    padding-left: 5%;
    padding-right: 5%;
}

.features2 {
    display: flex;
    justify-content: space-around;
    flex-wrap: nowrap;
    width: 90%;
}

.features3 {
    display: flex;
    justify-content: space-around;
    flex-wrap: nowrap;
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    margin-top: 2%;
    max-width: 1200px;

}

.otros {
    background-color: #fff0f5;
    padding-top: 5%;
    padding-bottom: 2%;
}

.feature {
    width: 250px;
    margin: 15px;
    text-align: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;

}

.feature:hover {
    transform: translateY(-10px);
}

.feature img {
    width: 100%;
    border-radius: 15px;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #ff7f50;
    color: #fff;
    display: flex;
    justify-content: space-around;
}

footer a {
    color: #fff;
    font-weight: bold;
}


/* Responsive */
@media screen and (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }

    .nav-links.active {
        max-height: 500px; /* suficiente para mostrar todos los items */
        transition: max-height 0.3s ease-in;
    }

    .nav-links li {
        width: 100%;
    }

    .submenu {
        position: static;
        display: none;
        flex-direction: column;
        padding-left: 15px;
    }

    .has-submenu.active .submenu {
        display: flex;
    }

    .nav-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 2rem;
        color: #fff;
        cursor: pointer;
    }

    /* Submenu toggle cursor */
    .has-submenu > a {
        cursor: pointer;
    }
}


/* Sidebar */
.sidebar {
    position: fixed;
    right: 0;
    top: 80px; /* debajo del header */
    width: 250px;
    background-color: #fff0f5;
    border: 2px solid #ff7f50;
    padding: 20px;
    height: calc(90% - 80px);
    overflow-y: auto;
    box-shadow: -2px 0 5px rgba(0,0,0,0.1);
    border-radius: 14px;
}

.sidebar h3 {
    margin-bottom: 15px;
    color: #ff4500;
}

.sidebar ul {
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 10px;
}

.sidebar ul li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.sidebar ul li a:hover {
    color: #ff4500;
}

/* Ajuste para main cuando hay sidebar */
main {
    margin-right: 270px; /* ancho sidebar + margen */
}

/* Responsive */
@media screen and (max-width: 768px) {
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-left: none;
        box-shadow: none;
        margin-bottom: 20px;
    }

    main {
        margin-right: 0;
    }
}

.hero img {
    max-width: 800px;
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    margin-top: 3%;
    margin-bottom: 2%;
    border-radius: 16px;
    border: 3px solid #ff7f50;
}

.content {
    margin-bottom: 5%;
    margin-left: 15%;

}

.home {
    margin-right: 0 !important;
}


.content {
    margin-right: 10%;
    margin-left: 10%;
}

.content2 {
margin-right: 10%;
    margin-left: 10%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 5%;
}

.boton {
    margin-top: 3%;
    background-color: #ff7f50;
    padding: 1%;
    border-radius: 16px;
    color: black;
    border: 1px solid black;
    font-weight: bold;
}


.content h2 {
    margin-top: 5%;
}

.content ul {
    margin-top: 2%;
    margin-left: 2%;
    margin-bottom: 1%;
}

@media (max-width: 768px) {
    footer {
        margin-top: 30%;
    }
}