/* Esto sobreescribe las propiedades  
por defecto de todos los elementos */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.auto-resize {
    width: 100%;
    min-height: 50px;
    overflow: hidden;
    resize: none; /* Evita el redimensionamiento manual */
}

/* Scope. Con root se puede usar desde cualquier sitio */
:root {
    --primary-color: #df994a;
    --primary-light-color: #e0c9a5;
    --light-color: #f4f4f6;
    --dark-color: #111;
}

/* Esto ya son etiquetas específicas */
body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background-image: url("../images/halftone.png");
}

a {
    text-decoration: none;
    color: #333;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

/* Navbar */
.navbar {
    background: url("../images/seamless_paper_texture.png");
    padding: 20px;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.navbar .container ul {
    display: flex;
}

.navbar ul li a {
    padding: 10px 20px;
    display: block;
    font-weight: 600;
    transition: 0.5s;
}

.navbar ul li a:hover {
    color: var(--primary-color);
}

.navbar ul li a i {
    margin-right: 10px;
}

.navbar ul li:last-child a {
    margin-left: 10px;
}

/* Página principal */
.main-content {
    background: #bbac83;
    padding: 20px 0;
}

.main-content .main-text {
    display: flex;
    flex-direction: column;
    align-content: center;
    justify-content: space-between;
    align-items: center;
}

.main-content .main-grid {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 30px;
}

.main-content .main-grid .main-text p {
    text-align: center;
}

/* Utility classes */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 13px 20px;
    background: var(--light-color);
    color: #333;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.5s;
}

.btn:hover {
    opacity: 0.8;
}

.btn-primary {
    background: #000000;
    color: var(--primary-light-color);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Text Classes */
.text-xxl {
    font-size: 3rem;
    line-height: 1.2;
    font-weight: 600;
    margin: 40px 0 20px;
}

.text-xl {
    font-size: 2.2rem;
    line-height: 1.4;
    font-weight: normal;
    margin: 40px 0 20px;
}

.text-lg {
    font-size: 1.8rem;
    line-height: 1.4;
    font-weight: normal;
    margin: 30px 0 20px;
}

.text-md {
    font-size: 1.2rem;
    line-height: 1.4;
    font-weight: normal;
    margin: 20px 0 10px;
}

.text-sm {
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: normal;
    margin: 10px 0 5px;
}

.text-center {
    text-align: center;
}

/* Slideshow container */
.slideshow-container {
    max-width: 95%;
    position: relative;
    margin: auto;
    padding: 5px;
    background: var(--light-color);
}

.slideshow-image {
    width: 1024px;
    height: 512px;
    object-fit: cover;
}

/* Hide the images by default */
.slidesInicio {
    display: none;
}

/* Next & previous buttons */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
}

/* Position the "next button" to the right */
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

/* Caption text */
.text {
    color: #f2f2f2;
    font-size: 15px;
    padding: 8px 12px;
    position: absolute;
    bottom: 8px;
    width: 100%;
    text-align: center;
}

/* Number text (1/3 etc) */
.numbertext {
    color: #f2f2f2;
    font-size: 12px;
    padding: 8px 12px;
    position: absolute;
    top: 0;
}

/* The dots/bullets/indicators */
.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    color: var(--primary-light-color);
    background-color: var(--dark-color);
    border-radius: 5px;
}

/* Fading animation */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

/* Estilo del grid-container donde se cargan las recetas */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.grid-item {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.grid-item:hover {
    transition: all 0.5s;
    transform: scale(0.95);
    transform-origin: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
    cursor: pointer;
}

/* Formulario de subir las recetas */
.uploadForm {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.uploadForm label {
    display: block;
    margin-bottom: 10px;
}

.uploadForm input[type="text"],
.uploadForm input[type="file"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.uploadForm button {
    background-color: #4CAF50;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
}

.uploadForm button:hover {
    background-color: #45a049;
}

/* Estilos para el mensaje de error */
.error-message {
    color: red;
    font-size: 14px;
    margin-top: 5px;
}

/* Para que quede bonita la página de la receta */
.recipeDetail {
    max-width: 800px;
    margin: 20px auto;
    padding: 60px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    font-family: Lato;
}

.recipeDetail h2 {
    margin-top: 0;
    background-color: #f0f0f0;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.recipeDetail h3 {
    margin-bottom: 10px;
}

.recipeDetail p {
    margin: 5px 0;
}

.recipeDetail img {
    max-width: 100%;
    border-radius: 5px;
    margin-top: 10px;
}

.container_img {
    display: flex;
    align-items: center;
}

.left-column,
.right-column {
    width: 100%;
}

.card {
    background-color: #f7f7f7;
    padding: 20px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    border-radius: 10px;
    margin-bottom: 20px;
}

img {
    max-width: 100%;
    height: auto;
}

.delete-recipe-btn {
    display: none;
    flex-grow: 1;
    justify-content: flex-end;
    background-color: #FF0000;
    color: #fff;
    border: none;
    padding: 5px 10px;
    font-size: 16px;
}

.delete-recipe-btn:hover {
    background-color: #FF69B4;
    cursor: pointer;
}

.modify-recipe-btn {
    flex-grow: 1;
    justify-content: flex-end;
    background-color: #ffa600;
    color: #fff;
    border: none;
    padding: 5px 10px;
    font-size: 16px;
    cursor: pointer;
}

.modify-recipe-btn:hover {
    background-color: #fccc73;
}

/* La parte del inicio de sesión */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h2 {
    text-align: center;
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
}

.form-group {
    text-align: left;
    display: flex;
    flex-direction: column;
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="text"],
input[type="password"] {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

button {
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    margin: auto;
    border-radius: 3px;
    cursor: pointer;
}

button:hover {
    background-color: #45a049;
}

/* Media Queries para móviles */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
    }
    .navbar .container ul {
        display: flex;
        flex-wrap: wrap;
    }
    .slideshow-image {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    .main-content .main-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .text-xxl {
        font-size: 2rem;
    }
    .text-xl {
        font-size: 1.8rem;
    }
    .text-lg {
        font-size: 1.5rem;
    }
    .text-md {
        font-size: 1rem;
    }
    .text-sm {
        font-size: 0.8rem;
    }
    .container_img {
        display: flex;
        flex-direction: column; /* Ajustado para móviles */
        align-items: center;
    }
    .left-column,
    .right-column {
        width: 100%;
    }
    .uploadForm {
        width: 100%;
        padding: 10px;
    }
    .recipeDetail {
        padding: 20px;
    }
    .login-container {
        margin: 50px auto;
        padding: 10px;
    }
}