/* large.css */
@media screen and (min-width: 1024px) {
    /* --- Base Styles & Typography adjustments for Desktop --- */
    body {
        padding-top: 30px;
    }

    h1 {
        font-size: 3em;
    }

    h2 {
        font-size: 1.5em;
    }

    /* --- Layout Containers for Desktop --- */
    .container {
        width: 80%;
        max-width: 960px;
        padding: 30px;
    }

    .container-transacciones {
        max-width: 1400px;
        width: 90%;
    }

    /* --- Header & Navigation for Desktop --- */
    header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 50px;
        margin-bottom: 0;
        position: relative;
        width: 100%;
        box-sizing: border-box;
        /* Ensure no overflow: hidden on the header itself if it could clip the dropdown */
        overflow: visible;
        z-index: 1000;
    }

    /* Hide hamburger button on desktop */
    .hamburger-menu {
        display: none !important;
    }

    /* Desktop Navigation - Always Horizontal and Prominent */
    nav ul {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-end;
        align-items: center;
        list-style: none;
        padding: 0;
        margin: 0;
        min-height: unset;
        position: static;
        top: unset;
        left: unset;
        width: auto;
        height: auto;
        background-color: transparent;
        z-index: 10;
        transform: translateX(0);
        transition: none;
        /* Add overflow visible to the ul as well, just in case */
        overflow: visible;
    }

    /* Individual navigation list items */
    nav ul li {
        margin-left: 20px;
        width: auto;
        text-align: left;
        border-bottom: none;
        padding: 0;
        /* Ensure individual list items don't have hidden overflow */
        overflow: visible;
    }

    /* Ensure desktop navigation items are visible */
    nav ul li:not(.logo-li):not(.hamburger-menu) {
        display: block;
    }

    /* Specific style for logo list item within the nav (if it's part of the nav) */
    .logo-li {
        order: 0;
        margin-right: auto;
        padding: 0;
        width: auto;
    }

    /* Styles for actual navigation links/spans */
    nav ul li a,
    nav ul li span {
        padding: 10px 15px;
        text-decoration: none;
        color: #e0e0e0;
        font-weight: bold;
        transition: background-color 0.3s ease, color 0.3s ease;
        border-radius: 5px;
        display: block;
        text-align: center;
        white-space: nowrap;
    }

    nav ul li a:hover,
    nav ul li span:hover {
        background-color: rgba(70, 0, 200, 0.4);
        color: #ffffff;
    }

    /* Reset the .open class behavior for desktop */
    #primaryNav.open {
        transform: translateX(0) !important;
        min-height: unset !important;
        background-color: transparent !important;
        box-shadow: none !important;
        padding-top: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: center !important;
        position: static !important;
    }

    /* Dropdown behavior for Desktop */
    .dropdown {
        position: relative;
        /* Ensure this parent element doesn't have overflow: hidden */
        overflow: visible;
    }
    .dropdown .dropbtn {
        width: auto;
        text-align: left;
        padding: 10px 15px;
        cursor: pointer;
        display: block;
    }

    .dropdown-content {
        position: absolute;
        background-color: rgba(30, 30, 45, 0.9);
        box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
        border-radius: 4px;
        width: auto;
        color: rgb(200, 200, 200);
        display: none;
        padding: 0;
        min-width: 180px;
        z-index: 1000!important;
        left: 0;
        top: 100%;
        /* Crucial: Ensure no overflow or max-height from mobile styles is interfering */
        max-height: unset !important;
        overflow: visible !important;
    }

    .dropdown-content a {
        color: rgb(200, 200, 200);
        padding: 12px 16px;
        text-decoration: none;
        display: block;
        text-align: left;
        border-bottom: none;
        white-space: nowrap;
    }
    .dropdown-content a:hover {
        background-color: #ddd;
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }

    /* This rule is problematic if 'open-dropdown' is meant to SHOW the dropdown on mobile/tablet.
       If it's only for mobile/tablet and you're controlling desktop with hover,
       then this specific rule on desktop should ideally not be hit,
       or it should not set display: none. Let's make sure it doesn't conflict.*/
    .dropdown.open-dropdown .dropdown-content {
        /* If 'open-dropdown' is *only* for JS-controlled mobile menu,
           then on desktop, this rule shouldn't matter as the class won't be applied.
           If it *is* applied, and you want it to show, change to `display: block;`
           If you want hover to always win, remove or adjust this rule */
        /* display: none; */ /* Removing or commenting this might help if JS accidentally sets this class */
    }

    .logo {
        width: 80px;
    }

    /* --- Main Content & Sections for Desktop --- */
    .content-wrapper {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: flex-start;
        gap: 30px;
    }

    main {
        padding: 20px;
        width: 75%;
        max-width: 1200px;
    }

    main div { /* Reset any specific width rules inherited from smaller screens if needed */
        width: 100%;
    }

    .hero-content {
        min-height: 600px;
    }

    .feature {
        width: 30%;
        margin: 20px 1.5%;
    }
    /* --- Buttons adjustments for Desktop --- */
    .card button {
        width: auto;
        display: block;
        margin: 10px 0;
    }

    #boton-actualizar-perfil {
        width: auto;
    }

    /* --- Cards adjustments for Desktop --- */
    .card label {
        display: block;
        width: auto;
        margin-bottom: 5px;
        margin-right: 0;
    }

    .card input[type="text"],
    .card input[type="number"],
    .card textarea {
        width: calc(100% - 20px);
        margin: 0 auto 10px auto;
        display: block;
    }
    .card textarea {
        min-height: 80px;
    }

    /* --- Tables adjustments for Desktop --- */
    table {
        font-size: 15px;
    }

    th, td {
        padding: 12px 15px;
    }

    /* --- Modals adjustments for Desktop (these are for other modals, not the aside) --- */
    .modal-content, .w3-modal-content {
        margin: 10% auto;
        padding: 30px;
    }

    #informeTextoModal > div > p {
        font-size: 1.2em;
        padding: 0 15px;
    }

    /* --- Chatbot adjustments for Desktop --- */
    .chatbot-container {
        width: 450px;
        height: 650px;
    }

    /* --- Microphone Icon adjustment for Desktop --- */
    .microphone-icon {
        right: 90px;
    }

    /* Search Bar */
    .search-bar {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .search-bar input {
        margin: 0;
        flex-grow: 1;
    }

    .search-bar input[type="number"] {
        width: auto;
    }

    .search-bar input[type="submit"] {
        width: auto;
        margin-top: 0;
        padding: 10px 20px;
    }

    #analisisIA {
        display: none;
    }
}