:root {
    --colorprimary: #8B493D;
    --colorsecundary: #E1D0C9;
    --fondofooter: #292929;
    --fondofootertransparent: rgba(41, 41, 41, 0.98);
    --fondo: #ffe5e6;
    --guardar: #3c8504;
    --editar: #e0c200;
    --eliminar: #f90000;
    --pdf: #B50801;
    --excel: #1d6f42;
    --powerpoint: #D04423;
    --word: #1a61c1;
    --imprimir: #000;
    --colortexto: #000;
    --gradientefondobody: rgba(255, 255, 255, 0.9);
    --fondocard: #fff;
    --gradientefondobarrabusqueda: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    font-family: 'Arial', 'sans-serif';
    outline: none;
    box-sizing: border-box;
}

body.dark {
    --colortexto: #F0E6D2;
    --gradientefondobody: rgba(26, 26, 26, 0.95);
    --gradientefondobarrabusqueda: rgba(42, 42, 42, 0.2);
    --fondocard: #2A2A2A;
    --fondo: #1A1A1A;
}

hr{
    border: 1px solid #ddd;
}

body.dark hr{
    border: 1px solid #333;
}

body {
    font-family: 'Arial', 'sans-serif';
    font-size: 16px;
    display: -webkit-box;
    display: -ms-flexbox;
    position: relative;
    display: flex;
    flex-direction: column;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    min-height: 100vh;
    background-color: var(--fondo);
}

header {
    position: fixed;
    -ms-flex-item-align: start;
    align-self: flex-start;
    top: 0;
    background-color: var(--fondofooter);
    width: 100%;
    z-index: 9;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    text-align: center;
    width: 100%;
    color: #fff;
    text-shadow: 2px 2px #000;
    font-size: 16pt;
}

header .logo {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

header img {
    height: 80px;
    margin: 10px;
}

html {
    color-scheme: light;
}

html.dark {
    color-scheme: dark;
}

.header-derecha {
    display: flex;
    align-items: center;
    margin-left: auto;
    margin-right: 20px;
    gap: 1rem;
}

/* Modo Oscuro */
header .grupomodooscuro {
    display: flex;
    align-items: center;
    padding: 5px;
}

.grupomodooscuro .switch {
    width: 76px;
    height: 42px;
    position: relative;
    border-radius: 50px;
    border: 3px solid #000;
    background: linear-gradient(180deg, #141e30 0%, #243b55 100%);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.8) inset, 0 -2px 4px -1px rgba(0, 0, 0, 0.8) inset, 0 2px 4px rgba(0, 0, 0, 0.3);
    outline: none;
    cursor: pointer;
    display: flex;
    padding: 0;
    margin: auto;
    overflow: hidden;
    transition: background .5s ease-in-out;
}

.grupomodooscuro .switch.active {
    background: linear-gradient(180deg, #4facfe 0%, #00c6fb 100%);
}

.grupomodooscuro .switch .nube {
    display: none;
}

.grupomodooscuro .switch.active .nube {
    display: flex;
    position: absolute;
    bottom: 2px;
    left: 4px;
    z-index: 1;
    color: #fff;
    font-size: 1.6rem;
    text-shadow:
        0 0 4px rgba(255, 255, 255, 0.8),
        0 0 8px rgba(255, 255, 255, 0.5),
        0 2px 3px rgba(0, 0, 0, 0.2);
    -webkit-animation: animNube 2s both infinite alternate;
    animation: animNube 2s both infinite alternate;
}

/* Estrellas en modo claro */
.grupomodooscuro .switch::before {
    content: "";
    width: 2px;
    height: 2px;
    top: 7px;
    right: 12px;
    position: absolute;
    z-index: 1;
    background: #fff;
    border-radius: 50%;
    opacity: 0.9;
    box-shadow:
        0 8px 0 -0.5px #fff,
        -10px 14px 0 -0.5px #fff,
        -22px 6px 0 -0.5px #fff,
        -8px 22px 0 -0.5px #fff;
    -webkit-animation: animStar 1.2s both infinite alternate;
    animation: animStar 1.2s both infinite alternate;
}

/* Bola del switch: luna en modo claro, sol en modo oscuro */
.grupomodooscuro .switch::after {
    content: "";
    display: block;
    width: 28px;
    height: 28px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 4px;
    border-radius: 100px;
    z-index: 5;
    transition: all .5s ease-in-out;
    background-color: #e0e0e0;
    background-image:
        radial-gradient(circle at 30% 30%, #b0b0b0 15%, transparent 16%),
        radial-gradient(circle at 70% 60%, #b0b0b0 18%, transparent 19%),
        radial-gradient(circle at 50% 80%, #b0b0b0 12%, transparent 13%);
    box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.4);
}

.grupomodooscuro .switch.active::after {
    left: calc(100% - 32px);
    background-color: #ffcc00;
    background-image: none;
    box-shadow: 0 0 6px 2px rgba(255, 204, 0, 0.6);
}

/* Nubes en modo oscuro */
.grupomodooscuro .switch.active::before {
    display: none;
}

@-webkit-keyframes animStar {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

@keyframes animStar {
    from { opacity: 0.4; }
    to { opacity: 1; }
}

@-webkit-keyframes animNube {
    0%, 100% { -webkit-transform: translate3d(-2px, -1px, 0); transform: translate3d(-2px, -1px, 0); }
    50% { -webkit-transform: translate3d(2px, -4px, 0); transform: translate3d(2px, -4px, 0); }
}

@keyframes animNube {
    0%, 100% { -webkit-transform: translate3d(-2px, -1px, 0); transform: translate3d(-2px, -1px, 0); }
    50% { -webkit-transform: translate3d(2px, -4px, 0); transform: translate3d(2px, -4px, 0); }
}

@media screen and (max-width: 1200px) {
    header img {
        height: 50px;
        margin: 5px;
    }
    .header-derecha {
        margin: 0;
        gap: 0;
    }
    header .grupomodooscuro {
        position: absolute;
        right: 100px;
        top: 50%;
        transform: translateY(-50%);
        padding: 0;
    }
    main {
        padding-top: 60px;
    }
    .maininmueble {
        padding-top: 100px;
    }
}

/*------------------------------*/

main {
    padding-top: 50px;
    margin: 0;
    width: 100%;
}
.maininmueble {
    padding-top: 104px;
    margin: 0;
    width: 100%;
    color: var(--colortexto);
}

@media screen and (max-width: 768px) {
    .maininmueble{
        padding-top: 60px;
    }
}

footer {
    margin-top: auto;
    background-color: var(--fondofooter);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-pack: distribute;
    justify-content: space-around;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    padding: 10px;
    width: 100%;
    height: 100%;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    text-align: center;
    color: #fff;
    position: relative;
}

footer img {
    height: 80px;
}

footer .section1 {
    padding: 10px;
}

footer .section2 {
    color: #fff;
    font-size: 1em;
}

footer .section2 p:nth-child(2) {
    margin-top: 10px;
    margin-bottom: 10px;
    font-weight: bold;
}

footer .section2 .correo {
    margin-top: 10px;
    margin-bottom: 15px;
}

footer .section2 a {
    color: #fff;
    text-decoration: none;
}

footer .section2 .redes {
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all .5s ease-in-out;
}

footer .section2 .redes a {
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 2em;
    border-radius: 5px;
    padding: 2px;
    background: transparent;
    margin-top: 20px;
    transition: all .5s ease-in-out;
    position: relative;
    filter: drop-shadow(0 0 2px #fff);
}

.techo {
    position: absolute;
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 25px solid var(--colorprimary);
    top: -25px;
    left: -6px;
}

footer .section2 .redes a:hover {
    transform: scale(1.2);
}

footer .section2 .redes a.instagram {
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(115deg, rgb(249, 206, 52), rgb(238, 42, 123), rgb(98, 40, 215));
}

footer .section2 .redes a.facebook {
    color: #3b5998;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
    margin-left: 20px;
    margin-right: 20px;
}

footer .section2 .redes a.youtube {
    color: #ff0000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
}

footer .section3 {
    padding: 10px;
}

footer .section3 img {
    transition: all .8s ease-in-out;
}

footer .section3 img:hover {
    transform: rotate3d(0, 1, 0, 360deg);
}

footer .admin {
    position: absolute;
    bottom: 0;
    right: 10px;
    padding: 10px;
    height: 40px;
    color: #fff;
    font-size: 1em;
    background-color: var(--colorprimary);
    border-radius: 20px 20px 0 0;
    font-weight: bold;
    text-decoration: none;
    cursor: pointer;
    transition: all .5s ease-in-out;
    box-shadow: 0 0 6px #000;
    border-right: 2px solid #fff;
    border-left: 2px solid #fff;
    border-top: 2px solid #fff;
}

footer .admin:hover {
    height: 50px;
}