html, body {
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #F9FFF2;
    overflow-x: hidden;
}

main {
    width: 100%;
    padding-bottom: 40px;
}

h1 { font-size: 32px; margin: 40px 0 20px 0; text-align: center; font-weight: bold; color: #333; }
h2 { font-size: 24px; margin: 10px 0; text-align: center; font-weight: bold; color: #444; }
h3 { font-size: 20px; margin: 10px 0; text-align: center; font-weight: normal; }

header {
    background-color: #ffffff;
    width: 100%;
    height: 90px;
    padding: 0 20px;
    box-sizing: border-box;
    border-bottom: 1px solid #EAEAEA;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 1000;
}

.header-column {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    flex-shrink: 1;
}

header img {
    height: auto;
    max-height: 70px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    cursor: pointer;
    flex-shrink: 1;
}

.header-center {
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
}

.btn-mis-mascotas {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background-color: #e63946;
    color: #ffffff;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(230, 57, 70, 0.2);
    transition: all 0.3s ease;
}

.btn-mis-mascotas:hover {
    background-color: #d62828;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(214, 40, 40, 0.3);
}

.btn-mis-mascotas i {
    font-size: 1.1rem;
}

.header-right {
    justify-content: flex-end;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.nav-menu { display: contents; }

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: #0A8072;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
    margin-left: 10px;
}

.btn-prim, .btn-sec {
    padding: 8px 20px;
    border-radius: 6px;
    border: 2px solid transparent;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-prim { background-color: #0A8072; color: #fff; }
.btn-prim:hover { background-color: #06B08F; transform: translateY(-2px); }
.btn-sec { background-color: transparent; color: #0A8072; border-color: #0A8072; }
.btn-sec:hover { background-color: #0A8072; color: #fff; transform: translateY(-2px); }

.usuario-logueado { font-size: 14px; color: #555; font-weight: 500; white-space: nowrap; }

.btn-logout {
    display: flex; align-items: center; gap: 8px; padding: 8px 16px;
    background-color: #f1f1f1; color: #333; border-radius: 6px;
    font-weight: 600; font-size: 14px; text-decoration: none; border: none;
    cursor: pointer; transition: all 0.3s ease; white-space: nowrap;
}

.btn-logout:hover { background-color: #e0e0e0; color: #000; }
.btn-logout i { color: #d9534f; }

div.banner {
    text-align: center;
    margin-top: 20px;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

div.banner img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

div.contenedor {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background-color: #ffff;
    text-align: center;
    min-height: 400px;
    margin: 20px auto;
    max-width: 1200px;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
    width: 95%;
}

div.contenedor > div {
    flex: 1;
    min-width: 300px;
    box-sizing: border-box;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

div.contenedor > div:first-child { box-shadow: -5px 5px 15px rgba(0,0,0,0.1); }
div.contenedor > div:last-child { box-shadow: 5px 5px 15px rgba(0,0,0,0.1); }

div.contenedor iframe { width: 100%; height: 100%; min-height: 300px; border: 0; border-radius: 8px; }
div.contenedor img { width: auto; max-width: 100%; height: auto; object-fit: contain; margin-bottom: 10px; }

.contenedorM {
    width: 100%;
    max-width: 1200px;
    margin: 50px auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0 15px;
}

section.botones {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    font-weight: bold;
}

.img_boton {
    width: 300px;
    height: auto;
    box-sizing: border-box;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.img_boton:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); }
.img_boton img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
}

footer { background-color: #f1f1f1; color: #333; text-align: center; padding: 20px 0; width: 100%; margin-top: auto; }
footer img { height: 120px; width: auto; max-width: 100%; object-fit: contain; }

.panel-triggers { position: fixed; top: 50%; right: 0; transform: translateY(-50%); z-index: 998; display: flex; flex-direction: column; gap: 8px; }
.trigger-btn { writing-mode: vertical-rl; padding: 12px 8px; border: none; color: white; font-weight: bold; cursor: pointer; border-radius: 8px 0 0 8px; }
.btn-yellow { background-color: #FDFD96; color: #555;}
.btn-red    { background-color: #FF6961; color: white;}
.panel-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 999; opacity: 0; visibility: hidden; transition: 0.3s; }
.panel-lateral { position: fixed; top: 0; right: 0; width: 500px; max-width: 85%; height: 100vh; padding: 20px; box-sizing: border-box; z-index: 1000; color: white; transform: translateX(100%); transition: 0.4s; overflow-y: auto; background-color: #333; }
.panel-overlay.activo { opacity: 1; visibility: visible; }
.panel-lateral.activo { transform: translateX(0); }
.btn-cerrar { position: absolute; top: 10px; right: 15px; background: none; border: none; font-size: 32px; cursor: pointer; color: white; }

.sys-layout-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background-color: #ffffff; 
    color: #0A8072;
    border: 1px solid #0A8072;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.sys-layout-opt:hover {
    background-color: #0A8072;
    color: #ffffff;
    border-color: #0A8072;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(10, 128, 114, 0.2);
}

.sys-layout-opt i {
    font-size: 1.1em;
}

button {
    --bg-base: #0A8072;
    --bg-hover: #06B08F;
    --bg-active: #057560;
    --shadow-color: rgba(6, 176, 143, 0.18);
    --text-color: #fff;
    background-color: var(--bg-base);
    color: var(--text-color);
    border: 0;
    padding: 10px 20px;
    margin-top: 5px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color .3s ease, transform .15s;
    will-change: background-color, transform;
}

button:hover, 
button:focus, 
button:focus-visible {
    background-color: var(--bg-hover);
    box-shadow: 0 6px 14px var(--shadow-color);
    outline: none;
}

button:active {
    background-color: var(--bg-active);
    transform: translateY(1px) scale(.995);
}

@media (max-width: 1050px) {
    header { height: 70px; padding: 0 15px; }
    
    .hamburger-btn { display: block; }

    .header-center { 
        display: flex;
        position: static;
        transform: none;
        width: 100%;
        padding: 0 20px;
        margin-bottom: 0;
    }

    .btn-mis-mascotas {
        width: 100%;
        justify-content: center;
        padding: 10px;
        font-size: 13px;
    }

    .header-column { gap: 10px; }
    header img { max-height: 50px; }

    .nav-menu {
        display: flex; position: fixed; top: 0; right: -100%;
        width: 280px; height: 100vh; background-color: #ffffff;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1); flex-direction: column;
        align-items: center; padding-top: 80px; transition: right 0.3s ease-in-out;
        z-index: 999; overflow-y: auto; gap: 30px;
    }
    
    .nav-menu.active { right: 0; }
    
    .header-right { 
        flex-direction: column; 
        width: 100%; 
        gap: 20px; 
        padding: 0 20px; 
    }
    
    .header-right .btn-prim, 
    .header-right .btn-sec, 
    .header-right .btn-logout,
    .sys-layout-opt {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 10px;
        margin: 0;
        font-size: 13px;
    }

    div.contenedor { padding: 10px; margin-bottom: 40px; }
    div.contenedor > div { width: 100%; margin-bottom: 20px; }
}

@media (max-width: 500px) {
    .header-column { gap: 8px; }
    header img { max-height: 40px; }

    .img_boton { width: 100%; padding: 15px; }
    .img_boton img { max-height: 150px; } 
}

@media (max-width: 380px) {
    header { padding: 0 10px; height: 65px; }
    
    .header-column { gap: 5px; }
    header img { max-height: 35px; }

    .hamburger-btn { font-size: 24px; margin-left: 5px; }
    
    h1 { font-size: 22px; margin: 20px 0; }

    div.contenedor { padding: 5px; width: 100%; }
    div.contenedor > div { min-width: 0 !important; width: 100% !important; padding: 10px; }
    
    .img_boton img { max-height: 120px; }
}