/* ------------------------------------------------ */
/* === MEDIA QUERY PARA DISPOSITIVOS MÓVILES === */
/* ------------------------------------------------ */
@media screen and (max-width: 768px) {
    * {
        box-sizing: border-box;
    }

    /* -------------------------------------- */
    /* Estilos del Header */
    /* -------------------------------------- */
    header {
        padding: 12px 20px;
    }

    .header-container {
        position: relative;
    }

    /* Logo más pequeño en móvil */
    .logo {
        height: 45px;
    }

    /* Mostrar botón hamburguesa */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
        z-index: 1001;
        padding: 8px;
        background: none;
        border: none;
        position: relative;
    }

    .menu-toggle span {
        width: 30px;
        height: 3px;
        background-color: #C7698D;
        border-radius: 3px;
        transition: all 0.3s ease;
        display: block;
    }

    /* Animación hamburguesa a X */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(9px, 9px);
        background-color: #C7698D;
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(9px, -9px);
        background-color: #C7698D;
    }

    /* Menú lateral móvil */
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: #F5F1E8;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 80px 0 30px 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        transition: right 0.4s ease;
        overflow-y: auto;
        z-index: 1000;
    }

    /* Navegación activa (abierta) */
    nav.active {
        right: 0;
    }

    /* Links del menú móvil */
    nav > a {
        width: 100%;
        padding: 18px 30px;
        font-size: 17px;
        border-bottom: 1px solid rgba(199, 105, 141, 0.1);
        transition: all 0.3s ease;
    }

    nav > a:hover {
        background-color: rgba(199, 105, 141, 0.1);
        padding-left: 35px;
    }

    /* Dropdown en móvil */
    .dropdown {
        width: 100%;
        position: relative;
    }

    .dropdown-toggle {
        width: 100%;
        padding: 18px 30px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid rgba(199, 105, 141, 0.1);
        transition: all 0.3s ease;
        cursor: pointer;
    }

    .dropdown-toggle:hover {
        background-color: rgba(199, 105, 141, 0.1);
    }

    .dropdown-toggle::after {
        content: '▼';
        font-size: 12px;
        transition: transform 0.3s ease;
        flex-shrink: 0;
    }

    /* Rotar flecha cuando está abierto */
    .dropdown.active .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    /* Dropdown menu móvil */
    .dropdown-menu {
        position: relative !important;
        transform: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        background-color: rgba(255, 255, 255, 0.5);
        width: 100% !important;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s ease;
    }

    /* Mostrar dropdown cuando está activo */
    .dropdown.active .dropdown-menu {
        max-height: 500px;
        opacity: 1;
        visibility: visible;
    }

    .dropdown-menu a {
        padding: 15px 30px 15px 50px !important;
        font-size: 15px;
        border-bottom: 1px solid rgba(199, 105, 141, 0.1);
        display: block;
        width: 100%;
        box-sizing: border-box;
    }

    .dropdown-menu a:hover {
        padding-left: 55px !important;
        background-color: rgba(199, 105, 141, 0.15);
    }

    /* Botón contacto en móvil */
    .btn-contacto {
        width: calc(100% - 60px);
        margin: 20px 30px;
        text-align: center;
        padding: 15px 28px;
        font-size: 17px;
    }

    /* Overlay oscuro cuando menu abierto */
    .menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.6);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }

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




    /* -------------------------------------- */
    /* SECCIÓN--> Mis Recetas */
    /* -------------------------------------- */
    .recetas-section {
        padding: 40px 15px 60px;
    }
    
    .recetas-container {
        max-width: 100%;
    }
    
    /* HEADER */
    
    .recetas-header {
        margin-bottom: 30px;
        text-align: center;
    }
    
    .recetas-header h1 {
        font-size: 32px;
        margin-bottom: 12px;
    }
    
    .recetas-header p {
        font-size: 14px;
        line-height: 1.6;
        max-width: 100%;
    }
    
    /* LAYOUT - UNA COLUMNA */
    .recetas-content {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* SIDEBAR - FILTROS */
    
    .filtros-sidebar {
        position: static;
        width: 100%;
        padding: 20px 15px;
        margin-bottom: 10px;
    }
    
    .filtros-sidebar h3 {
        font-size: 16px;
        margin-bottom: 15px;
        text-align: center;
    }
    
    /* Filtros en dos columnas en móvil */
    .filtro-grupo {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        row-gap: 10px;
    }
    
    .filtro-item {
        padding: 8px 5px;
    }
    
    .filtro-item:hover {
        padding-left: 5px;
    }
    
    .filtro-label {
        font-size: 13px;
    }
    
    .filtro-count {
        font-size: 12px;
    }
    
    .checkbox-custom {
        width: 18px;
        height: 18px;
    }
    
    .filtro-checkbox:checked + .checkbox-custom::after {
        font-size: 12px;
    }
    
    .filtro-separador {
        margin: 15px 0;
        grid-column: 1 / -1;
    }
    
    /* Filtros de dieta en una columna */
    .filtro-grupo:last-child {
        grid-template-columns: 1fr;
    }
    
    /* GRID DE RECETAS - UNA COLUMNA */
    
    .recetas-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Cards de recetas */
    .receta-card {
        border-radius: 10px;
    }
    
    .receta-imagen-container {
        padding-top: 90%; /* Aspect ratio más panorámico en móvil */
    }
    
    .receta-favorito {
        width: 32px;
        height: 32px;
        top: 10px;
        right: 10px;
    }
    
    .receta-favorito::before {
        font-size: 18px;
    }
    
    .receta-info {
        padding: 15px;
    }
    
    .receta-tipo {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .receta-titulo {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .receta-descripcion {
        font-size: 13px;
        line-height: 1.5;
    }
    
    /* PAGINACIÓN */
    
    .paginacion {
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 30px;
    }
    
    .paginacion-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .paginacion-info {
        font-size: 13px;
        padding: 0 10px;
        width: 100%;
        text-align: center;
        order: -1;
        margin-bottom: 10px;
    }
    
    /* Ocultar algunos números de página en móvil */
    .paginacion-btn[data-action="page"] {
        display: none;
    }
    
    /* Mostrar solo página actual */
    .paginacion-btn[data-action="page"].active {
        display: inline-block;
    }
    
    /* NO RESULTADOS */
    
    .no-resultados {
        padding: 40px 15px;
        font-size: 16px;
    }


    /* -------------------------------------- */
    /* === Sección "Formulario Contacto" === */
    /* -------------------------------------- */
    .contacto {
        padding: 60px 15px;
    }

    .contacto-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    /* Bloque azul en móvil */
    .contacto-formulario {
        border-radius: 20px 20px 0 0;
        flex: none;
        width: 100%;
        padding: 35px 30px;
    }

    .contacto-formulario h2 {
        font-size: 2rem;
        margin-bottom: 25px;
    }

    .form-contacto {
        gap: 15px;
    }

    /* Campos en columna en móvil */
    .form-row-dual {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-contacto input {
        padding: 13px 18px;
        font-size: 0.9rem;
    }

    .btn-cta {
        padding: 11px 26px;
        font-size: 0.95rem;
        width: 100%;
        justify-content: center;
    }

    .btn-cta:hover {
        transform: translateY(-2px);
    }

    /* Bloque rosado en móvil */
    .contacto-info-rosado {
        margin-left: 0;
        margin-top: -5px;
        width: 100%;
        min-height: 320px;
    }

    .textura-rosada {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .info-content {
        gap: 40px;
        padding: 40px 30px;
    }

    .info-item {
        gap: 15px;
    }

    .info-icono {
        width: 32px;
        height: 32px;
    }

    .info-texto h3 {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .info-texto p {
        font-size: 0.7rem;
    }



    /* -------------------------------------- */
    /* === Sección "Footer" === */
    /* -------------------------------------- */
    .footer-main {
        padding: 40px 20px;
    }
    
    /* Layout en columna */
    .footer-container {
        flex-direction: column;
        gap: 40px;
        align-items: center;
        text-align: center;
    }
    
    /* -------------------------------------- */
    /* SECCIÓN INFO */
    /* -------------------------------------- */
    .footer-info {
        width: 100%;
        align-items: center;
        gap: 20px;
    }
    
    /* Logo y redes - centrados */
    .footer-logo {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .footer-logo img {
        height: 45px;
    }
    
    /* Redes sociales */
    .footer-socials {
        gap: 20px;
    }
    
    .social-link {
        width: 45px;
        height: 45px;
        padding: 10px;
    }
    
    /* Descripción */
    .footer-descripcion {
        font-size: 14px;
        max-width: 100%;
        text-align: center;
        line-height: 1.6;
    }
    
    /* -------------------------------------- */
    /* COLUMNAS DE NAVEGACIÓN */
    /* -------------------------------------- */
    .footer-links {
        width: 100%;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        padding-left: 0;
        text-align: center;
    }
    
    .footer-column {
        gap: 15px;
    }
    
    .footer-column a {
        font-size: 15px;
    }
    
    .footer-column a:hover {
        padding-left: 0;
    }
    
    /* -------------------------------------- */
    /* FOOTER INFERIOR */
    /* -------------------------------------- */
    .footer-bottom {
        padding: -20px 20px;
    }
    
    .footer-bottom-container {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .footer-terms a,
    .footer-copyright {
        font-size: 13px;
    }
}



/* -------------------------------------- */
/* MÓVILES PEQUEÑOS (menos de 480px) */
/* -------------------------------------- */
@media screen and (max-width: 480px) {

    * {
        box-sizing: border-box;
    }

    /* -------------------------------------- */
    /* Estilos del Header */
    /* -------------------------------------- */
    header {
        padding: 10px 15px;
    }

    .logo {
        height: 40px;
    }

    .menu-toggle {
        padding: 5px;
    }

    .menu-toggle span {
        width: 26px;
        height: 2.5px;
    }

    nav {
        width: 260px;
        padding: 70px 0 20px 0;
    }

    nav > a {
        padding: 16px 25px;
        font-size: 16px;
    }

    .dropdown-toggle {
        padding: 16px 25px;
        font-size: 16px;
    }

    .dropdown-menu a {
        padding: 14px 25px 14px 45px !important;
        font-size: 14px;
    }

    .btn-contacto {
        width: calc(100% - 50px);
        margin: 15px 25px;
        padding: 14px 24px;
        font-size: 16px;
    }





    /* -------------------------------------- */
    /* SECCIÓN--> Mis Recetas */
    /* -------------------------------------- */
    
    .recetas-section {
        padding: 30px 10px 50px;
    }
    
    .recetas-header h1 {
        font-size: 28px;
    }
    
    .recetas-header p {
        font-size: 13px;
    }
    
    .filtros-sidebar {
        padding: 15px 12px;
    }
    
    .filtro-label {
        font-size: 12px;
    }
    
    .receta-titulo {
        font-size: 16px;
    }
    
    .receta-descripcion {
        font-size: 12px;
    }
    
    .paginacion-btn {
        padding: 8px 12px;
        font-size: 12px;
    }


    /* -------------------------------------- */
    /* === Sección "Formulario Contacto" === */
    /* -------------------------------------- */
    .contacto {
        padding: 40px 10px;
    }

    /* Bloque azul en móviles pequeños */
    .contacto-formulario {
        padding: 30px 20px;
        border-radius: 18px 18px 0 0;
    }

    .contacto-formulario h2 {
        font-size: 1.7rem;
        margin-bottom: 20px;
    }

    .form-contacto {
        gap: 12px;
    }

    .form-row-dual {
        gap: 12px;
    }

    .form-contacto input {
        padding: 12px 16px;
        font-size: 0.85rem;
        border-radius: 6px;
    }

    .btn-cta {
        padding: 10px 24px;
        font-size: 0.9rem;
        margin-top: 5px;
    }

    .btn-cta .arrow {
        font-size: 1.1rem;
    }

    /* Bloque rosado en móviles pequeños */
    .contacto-info-rosado {
        margin-top: -20px;
        min-height: 280px;
    }

    .info-content {
        gap: 30px;
        padding: 35px 20px;
    }

    .info-item {
        gap: 12px;
        flex-direction: column;
        align-items: flex-start;
    }

    .info-icono {
        width: 28px;
        height: 28px;
    }

    .info-texto h3 {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .info-texto p {
        font-size: 0.85rem;
        word-break: break-all;
    }



    /* -------------------------------------- */
    /* === Sección "Footer" === */
    /* -------------------------------------- */
}