*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    padding-top: 100px;
    padding-bottom: 80px;
    background-color: #FFEFE9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #F5F5F5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px; 
    z-index: 10;
}

nav a {
    text-decoration: none;
    color: black;
    font-weight: bold;
    font-size: 1.2rem;
}

.btn-ver {
    color: #0020d6;
    border: 2px solid #0020d6;
    padding: 10px 20px;
    border-radius: 14px;
    background-color: #ffffff;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-ver:hover {
    background-color: #0020d6;
    border-color: #000f62;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 32, 214, 0.3);
}

.btn-aprobar {
    padding: 10px 20px;
    color: #006908;
    background-color: #ffffff;
    border-radius: 14px;
    border: 2px solid #00a310;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-aprobar:hover {
    background-color: #00a310;
    border-color: #006908;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 163, 16, 0.3);
}

.btn-rechazar {
    padding: 10px 20px;
    color: #c41e1a;
    background-color: #ffffff;
    border-radius: 14px;
    border: 2px solid #E8534F;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-rechazar:hover {
    background-color: #E8534F;
    border-color: #c41e1a;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 83, 79, 0.3);
}

.hero-nosotros {
    text-align:center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.hero-nosotros h1{
    color: #fa0000;
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.hero-nosotros p{
    font-size: 1.1rem;
    color: #555;
}

.contenedor-cartas {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin: 40px auto;
}

.carta {
    background-color: #ffffff;
    width: 300px;
    padding: 20px 25px;
    border-radius: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.carta h3 {
    color: #E74D4E;
    margin: 15px 0;
    text-align: center;
}

.carta p {
    color: #555;
    line-height: 1.6;
    text-align: center;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 90px;
    margin-top: 20px;
    border-bottom: 1px solid #ccc;
    padding-bottom: 25px;
}

.tab {
    background: none;
    border: none;
    font-size: 0.95em;
    font-weight: 600;
    color: #777;
    cursor: pointer;
    transition: color 0.3s, border-bottom 0.3s;
}
.tab:hover {
    color: #e05b49;
}
.tab.activa {
    color: #e05b49;
    border-bottom: 2px solid #e05b49;
}

.contacto {
    background-color: #F5F1ED;
    padding: 20px 25px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.tabla {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.tabla thead {
    background-color: #F5F1ED;
}

.tabla th {
    padding: 15px;
    font-weight: bold;
    text-align: center;
    font-size: 1.2rem;
    border-bottom: 2px solid #ddd;
}

.tabla td {
    padding: 15px;
    text-align: center;
    font-size: 1rem;
    color: #000;
}

.tabla tbody tr:nth-child(odd) {
    background-color: #ffffff;
}
.tabla tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.tabla tbody tr:hover {
    background-color: #f0f0f0;
}

.tabla td button {
    margin: 3px;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

.modal-overlay.show {
    opacity: 1;
}

.modal-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    max-width: 800px;
    margin: 40px auto;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.modal-overlay.show .modal-container {
    transform: translateY(0);
}

.modal-header {
    background: linear-gradient(135deg, #E8534F 0%, #df3a34 100%);
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(158, 46, 46, 0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.modal-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-close svg {
    color: white;
}

.modal-form {
    padding: 35px 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 640px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-field {
    margin-bottom: 25px;
}

.form-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #6b3932;
    margin-bottom: 10px;
    font-size: 14px;
}

.input-modern,
.textarea-modern {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.input-modern:focus,
.textarea-modern:focus {
    outline: none;
    border-color: #E8534F;
    box-shadow: 0 0 0 4px rgba(234, 102, 102, 0.1);
    transform: translateY(-1px);
}

.input-readonly {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    cursor: not-allowed;
    color: #6b7280;
}

.textarea-modern {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.field-hint {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
    font-style: italic;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 2px solid #f3f4f6;
    margin-top: 30px;
}

.btn-primary{
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #e4453f 0%, #c9423d 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(194, 54, 38, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .modal-container {
        margin: 0;
        border-radius: 0;
    }

    .modal-form {
        padding: 25px 20px;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .btn-primaryy{
        width: 100%;
        justify-content: center;
    }
}

.form-field[for="recetaCategoria"] {
    margin-bottom: 20px;
}

.checkbox-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columnas iguales */
    grid-auto-rows: 1fr; 
    gap: 12px;
    margin-top: 12px;
    align-items: stretch;
}

.form-field input[type="checkbox"] {
    display: none;
}

.form-field label:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    color: #4b5563;
    gap: 8px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
    height: 100%;
    box-sizing: border-box;
    min-height: 45px;
}
#inputOtro {
    padding: 12px 15px;
    border-radius: 12px;
    border: none;
    background-color: #EDE3DF;
    font-size: 14px;
    color: #666;
    outline: none;
    transition: all 0.3s ease;
    width: auto;
    max-width: 200px;
    margin-left: 5px;
}

#inputOtro:focus {
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(232, 83, 79, 0.1);
}
.form-field label:has(input[type="checkbox"]):hover {
    border-color: #E8534F;
    background: #fff5f5;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(232, 83, 79, 0.15);
}

.form-field label:has(input[type="checkbox"]:checked) {
    background: linear-gradient(135deg, #E8534F 0%, #df3a34 100%);
    border-color: #E8534F;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(232, 83, 79, 0.3);
}

.form-field label:has(input[type="checkbox"])::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    background: white;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.form-field label:has(input[type="checkbox"]:checked)::before {
    content: '✓';
    background: white;
    border-color: white;
    color: #E8534F;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.form-field label:has(input[type="checkbox"]):active {
    transform: scale(0.95);
}

@media (max-width: 640px) {
    .checkbox-container {
        grid-template-columns: 1fr;
    }
    
    .form-field label:has(input[type="checkbox"]) {
        padding: 10px 12px;
        font-size: 13px;
        min-height: 45px;
    }
}

@media (max-width: 968px) {
    .hero-nosotros h1 {
        font-size: 1.8rem;
    }

    .hero-nosotros p {
        font-size: 1rem;
    }

    .contenedor-cartas {
        flex-wrap: wrap;
        gap: 15px;
        padding: 0 15px;
    }

    .carta {
        width: calc(50% - 10px);
        min-width: 250px;
    }

    .tabs {
        gap: 40px;
        flex-wrap: wrap;
    }

    .tab {
        font-size: 0.9em;
    }

    .tabla {
        font-size: 0.9rem;
    }

    .tabla th,
    .tabla td {
        padding: 12px 8px;
    }

    .modal-container {
        max-width: 90%;
        margin: 20px auto;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    nav{
        height: 70px;
    }
    .contacto {
        padding: 15px 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tabla-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
    }

    .tabla {
        min-width: 700px; 
        font-size: 0.85rem;
        display: table;
        width: auto;
    }

    .tabla th,
    .tabla td {
        padding: 10px 12px;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .tabla th {
        font-size: 0.9rem;
        min-width: 100px; 
    }

    .tabla th:first-child,
    .tabla td:first-child {
        min-width: 120px; 
    }

    .tabla th:nth-child(2),
    .tabla td:nth-child(2) {
        min-width: 150px;
    }

    .tabla th:nth-child(3),
    .tabla td:nth-child(3) {
        min-width: 120px;
    }

    .tabla th:nth-child(4),
    .tabla td:nth-child(4) {
        min-width: 100px;
    }

    .tabla th:last-child,
    .tabla td:last-child {
        min-width: 180px;
    }

    .tabla td button {
        padding: 6px 10px;
        font-size: 0.75rem;
        margin: 2px;
        white-space: nowrap;
    }

    .btn-ver,
    .btn-aprobar,
    .btn-rechazar {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .contacto::after {
        content: '← Desliza para ver más →';
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: #999;
        margin-top: 10px;
        font-style: italic;
    }
}

@media (max-width: 600px) {
    .tabla {
        min-width: 650px;
        font-size: 0.8rem;
    }

    .tabla th,
    .tabla td {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .tabla th {
        font-size: 0.85rem;
    }

    .tabla td button {
        padding: 5px 8px;
        font-size: 0.7rem;
    }
}

@media (max-width: 400px) {
    .tabla {
        min-width: 600px;
        font-size: 0.75rem;
    }

    .tabla th,
    .tabla td {
        padding: 6px 8px;
        font-size: 0.75rem;
    }

    .tabla td button {
        padding: 4px 6px;
        font-size: 0.65rem;
    }
}