body {
    background-color: #e1dbc9;
    font-family: sans-serif;
    margin: 0;
    overflow-x: hidden;
    height: 100%;
}

html {
    scroll-behavior: smooth;
} 
.inicio {
    width: 100%;
    height: 80vh;
    display: relative;
}

.flores {
    margin-top: 4em;
    width: 100%;
    height: auto;
}

.flor {
    height: 80%;
    width: 100%;
    filter: brightness(0.9);
}

.top-menu {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    margin-top: 30px;
}

.logo {
    width: 15em;
    height: 6em;
    background-image: url(../img/casadela.webp);
    background-size: cover;
    background-repeat: no-repeat;
    background-position: left;
}

nav{
    display: flex;
    flex-direction: row;
    gap: 50px;
    margin-left: auto;
    margin-right: 100px;
}

.nav-link {
    text-decoration: none;
    color: #fff;
    background-color: #51642e;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 0px 30px #0005;
    font-weight: bold;
    font-size: 18px;
    transition: all 0.1s ease;
}

.nav-link:hover {
    background-color: #5a6f50;
    box-shadow: 0 0px 40px #0009;
    transform: scale(1.2);
    transition: all 0.2s ease;
}

.presentacion {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 50px;
    width: 100%;
    height: 80vh;
}

.content {
    width: 60%;
    height: 100%;
    display: flex;
    align-items: center;
    text-align: center;
    gap: 20px;
}

.content strong {
    font-family: 'Breathing';
    font-size: clamp(3rem, 5vw, 4.5rem);
    color: #51642e;
    transition: all 0.6s ease;
    text-shadow: 0 0px 30px #0003;
}

.content strong:hover {
    font-size: clamp(4rem, 10vw, 5rem);
    transition: all 0.3s ease;
    cursor: default;
}

.content h2 {
    font-size: clamp(1rem, 2vw, 2rem);
    color: #5a5f50;
    font-weight: 400;
}

.ubicacion-div {
    margin: 30px 0;
    display: flex;
        flex-direction: column-reverse;
    
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 50px;
    width: auto;
    min-height: 90vh;
}

.ubicacion-mapa {
    width: clamp(400px, 80vw, 900px);
    height: clamp(300px, 50vh, 800px);
    border: 1px solid #51642e;
    border-radius: 8px;
    box-shadow: 0 0px 30px #0003;
}

.mapa {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.ubicacion-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    width: 50%;
    height: 80%;
}

.ubicacion-info h2 {
    font-family: 'Breathing';
    font-style: italic;
    font-size: 4rem;
    color: #51642e;
    font-weight: 400;
    text-align: center;
    transition: all 0.6s ease;
    text-shadow: 0 0px 30px #0003;
}

.ubicacion-info h2:hover {
    font-size: clamp(4.5rem, 10vw, 5rem);
    transition: all 0.3s ease;
    cursor: default;
}

.ubicacion-info p {
    font-size: 1.7rem;
    color: #5a5f50;
    text-align: center;
    margin: 2em;
}

.servicios-div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    height: auto;
}

.servicios-div-header {
    font-family: 'Breathing';
    color: #51642e;
    font-size: 3.2rem;
    font-style: italic;
}

.carousel {
    margin: 100px auto;
    width: 100%;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 2em;
    background: linear-gradient(to left, #e1dbc9, transparent);
}

.carousel::-webkit-scrollbar {
    display: none;
}

.group {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3em;
    animation: spin 30s linear infinite;
    padding-right: 3em;
}

.card {
    flex: 0 0 8em;
    height: 12em;
    background: blue;
    font-size: 3rem;
    border-radius: 8px;
    text-align: center;
    align-content: center;
    transition: filter 0.3s ease;
}

.foto {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    z-index: 1;
    filter: brightness(0.7) contrast(1.15);
}

@keyframes spin {
    from {translate: 0;}
    to {translate: -100%;}
}

/* Estilos para las tarjetas */
.card-container {
    position: relative;
    width: clamp(29em, 22vw, 33em);
    height: clamp(36em, 60vh, 55em);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 16px;
    overflow: hidden;
}

.card-container:hover {
    transform: scale(1.01);
}

.card-container:hover .card {
    filter: brightness(0.7) contrast(1.15);
    transform: scale(1.05);
}

.card {
    width: 100%;
    height: 100%;
    border-radius: 16px;
    text-align: center;
    align-content: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    font-size: 1.4rem;
    font-weight: bold;
    color: #fff;
    text-align: center;
    background: linear-gradient(to top, rgba(81, 100, 46, 0.178), rgba(81, 100, 46, 0.288));
    padding: 1.2em 1em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    word-wrap: break-word;
    line-height: 1.2;
}

.card-container:hover .card-title {
    background: linear-gradient(to top, rgba(81, 100, 46, 0.315), rgba(81, 100, 46, 0.089));
}
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: #e1dbc9;
    padding: 3em;
    border-radius: 12px;
    box-shadow: 0 0px 50px #0005;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #51642e;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.2);
}

#modalTitle {
    font-size: 2rem;
    color: #51642e;
    margin-bottom: 1em;
    text-shadow: 0 0px 15px #0003;
}

#modalDescription {
    font-size: 1.1rem;
    color: #5a5f50;
    line-height: 1.6;
}

.prefooter {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 50px ;
}

/* ============ MEDIA QUERIES - RESPONSIVE ============ */

/* Tablets - 768px y menos */
@media (max-width: 1072px) {
    body {
        margin: 0em;
    }

    .logo {
        margin: 0 auto;
        width: 12em;
        height: 5em;
    }

    .inicio {
        gap: 5em;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 15px;
        height: auto;
        min-height: 90vh;
        width: auto;
    }

    .presentacion {
        flex-direction: column;
        height: auto;
        gap: 30px;
        padding: 20px 0;
    }

    .flores {
        margin-top: 0;
        width: 100%;
        height: auto;
    }

    .flor {
        height: 80%;
        width: 100%;
        filter: brightness(0.9);
    }
    
    nav {
        gap: 30px;
        margin-right: 50px;
    }

    .nav-link {
        padding: 12px 16px;
        font-size: 16px;
    }

    .content strong {
        font-size: 4rem;
    }

    .content strong:hover {
        font-size: 4.5rem;
    }

    .content h2 {
        font-size: 2rem;

    }

    .ubicacion-div {
        height: auto;
        gap: 20px;
        margin: 20px;
    }

    .ubicacion-mapa {
        width: 100%;
        max-height: 400px;
    }

    .ubicacion-info {
        width: 100%;
        height: auto;
    }

    .ubicacion-info h2 {
        font-size: 3.2rem;
        width: 100%;
    }

    .ubicacion-info h2:hover {
        font-size: 4rem;
    }

    .ubicacion-info p {
        font-size: 1.9rem;
    }

    .servicios-div-header {
        font-size: 2.5rem;
    }

    .group {
        gap: 2em;
        padding-right: 0;
    }

    .card-container {
        width: 20em;
        height: 30em;
    }

    .card-title {
        font-size: 1.1rem;
    }
}

/* Móviles - 768px y menos */
@media (max-width: 768px) {
    body {
        margin: 0;
    }

    .inicio {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 15px;
        gap: 5em;
        min-height: 85vh;
        height: auto;
        width: auto;
    }

    .presentacion {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .top-menu {
        flex-direction: column;
        gap: 30px;
        align-items: flex-start;
    }

    .logo {
        width: 12em;
        height: 6em;
    }

    nav {
        flex-direction: row;
        gap: 10px;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .nav-link {
        width: 100%;
        padding: 10px 15px;
        font-size: 14px;
        text-align: center;
    }

    .presentacion {
        flex-direction: column;
        height: auto;
        gap: 30px;
        padding: 20px 0;
    }

    .content {
        width: 100%;
        height: auto;
    }

    .content strong {
        font-size: clamp(2rem, 4vw, 4rem);
    }

    .content strong:hover {
        font-size: clamp(3.5rem, 12vw, 5rem);
    }

    .content h2 {
        font-size: clamp(1rem, 3vw, 1.7rem);
    }

    .ubicacion-div {
        scroll-margin-top: 100px;
        margin: 15px;
        flex-direction: column-reverse;
        flex-wrap: wrap;
        align-items: center;
        align-content: center;
        justify-content: center;
        min-height: 70vh;
        height: auto;
        gap: 3em;
    }

    .ubicacion-mapa {
        width: 100%;
        height: 400px;
        max-height: 500px;
    }

    .mapa {
        height: fill-available;
    }

    .ubicacion-info {
        width: 100%;
        height: auto;
        justify-content: flex-start;
    }

    .ubicacion-info h2 {
        font-size: 1.8rem;
    }

    .ubicacion-info h2:hover {
        font-size: 2rem;
    }

    .ubicacion-info p {
        font-size: 1rem;
        margin: 0.5em;
    }

    .servicios-div {
        height: 70vh;
        padding: 20px 0;
    }

    .servicios-div-header {
        font-size: 2rem;
    }

    .carousel {
        margin: 50px auto;
        gap: 1.5em;
    }

    .group {
        gap: 1.5em;
        padding-right: 0;
    }

    .card-container {
        width: 15em;
        height: 22em;
    }

    .card-title {
        font-size: 1rem;
        padding: 0.8em 0.5em;
    }

    .modal-content {
        padding: 2em;
        width: 95%;
    }

    .modal-close {
        font-size: 2rem;
        top: 10px;
        right: 15px;
    }

    #modalTitle {
        font-size: 1.5rem;
    }

    #modalDescription {
        font-size: 1rem;
    }
}

/* Móviles pequeños - 480px y menos */
@media (max-width: 480px) {
    body {
        margin: 0;
    }

    .logo {
        width: 8em;
        height: 3em;
        margin: 0 auto;
    }

    .inicio {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 15px;
        min-height: 90vh;
        height: auto;
        width: auto;
    }

    .presentacion {
        flex-direction: column;
        height: auto;
        gap: 30px;
        padding: 20px 0;
    }

    .nav-link {
        padding: 8px 0px;
        font-size: 12px;
    }

    .nav-link:hover {
        transform: scale(1.02);
    }

    .content strong {
        font-size: 2rem;
    }

    .content strong:hover {
        font-size: 2.8rem;
    }

    .content h2 {
        font-size: 1.2rem;
    }

    .ubicacion-mapa {
        height: 350px;
    }

    .mapa {
        height: 350px;
    }

    .ubicacion-info h2 {
        font-size: clamp(1rem, 10vw, 2.4rem);
    }

    .ubicacion-info h2:hover {
        font-size: clamp(1.7rem, 12vw, 2.8rem);
    }

    .ubicacion-info p {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
    }

    .servicios-div-header {
        font-size: clamp(1.5rem, 8vw, 2rem);
    }

    .carousel {
        margin: 30px auto;
        gap: 1em;
    }

    .group {
        gap: 1em;
        padding-right: 0;
    }

    .card-container {
        width: 12em;
        height: 18em;
    }

    .card-title {
        font-size: 0.9rem;
        padding: 0.6em 0.4em;
    }

    .modal-content {
        padding: 1.5em;
    }

    #modalTitle {
        font-size: 1.3rem;
    }

    #modalDescription {
        font-size: 0.9rem;
    }

    .prefooter {
        margin: 30px 90px 45px 90px;
    }
}