@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,600,300);

body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
    min-height: 100vh;
    margin: 0;
    color: #333;
}

#wrapper {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90vh;
}

.phone {
    border: 40px solid #2c2c2c;
    border-width: 55px 7px;
    border-radius: 40px;
    margin: 20px auto 0;
    overflow: hidden;
    transition: all 0.5s ease;
    background: #000;
    width: 390px;
    height: 740px;
}

.phone iframe {
    border: 0;
    width: 100%;
    height: 100%;
    background: #fff;
}

.phone.view_1 {
    max-height: 88vh;
    transform: rotateX(10deg) rotateY(30deg) rotateZ(-10deg);
    box-shadow: -3px 3px 0 #484848, -5px 5px 0 #484848, -7px 7px 0 #484848, -9px 9px 0 #484848, -12px 12px 30px rgba(0,0,0,0.3);
}

.phone.view_2 {
    max-height: 88vh;
    transform: rotateX(0deg) rotateY(-30deg) rotateZ(0deg);
    box-shadow: 3px 1px 0 #484848, 5px 2px 0 #484848, 7px 3px 0 #484848, 9px 4px 0 #484848, 4px 7px 30px rgba(0,0,0,0.3);
}

.phone.view_3 {
    max-height: 88vh;
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    box-shadow: 0 4px 0 #484848, 0 6px 0 #484848, 0 8px 0 #484848, 0 12px 30px rgba(0,0,0,0.25);
}

.panel-label {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
    font-weight: 600;
    margin-bottom: 6px;
    text-align: center;
}

#views,
#pages {
    position: absolute;
    width: 140px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 10px 10px 6px;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

#views { top: 20px; right: 20px; }
#pages { top: 20px; left: 20px; width: 190px; }

#views button,
#pages button {
    width: 100%;
    border: 1px solid #CD182D;
    background-color: #fff;
    height: 34px;
    margin: 3px 0;
    color: #CD182D;
    font-size: 13px;
    font-family: 'Open Sans', sans-serif;
    transition: all 0.2s;
    border-radius: 17px;
    cursor: pointer;
}

/* Los nombres de página son más largos que las perspectivas: alto flexible
   para que no se aplaste el texto en dos líneas. */
#pages button {
    height: auto;
    min-height: 34px;
    padding: 8px 12px;
    line-height: 1.25;
}

#views button:hover,
#pages button:hover {
    color: #9A1222;
    background-color: #FBEBED;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#views button.active,
#pages button.active {
    background-color: #CD182D;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(205, 24, 45, 0.4);
}

#views button.secondary {
    background-color: transparent;
    border: none;
    color: #c0392b;
    font-size: 11px;
    height: 28px;
    margin-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0;
}

#branding {
    position: absolute;
    left: 20px;
    bottom: 18px;
    font-size: 12px;
    color: #666;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

#branding .brand-logo {
    width: 64px;
    height: 16px;
    object-fit: contain;
    margin-right: 2px;
    /* El logo del ayuntamiento es blanco sobre transparente: chip de color para que se vea. */
    background-color: #CD182D;
    border-radius: 4px;
    padding: 3px 5px;
}

#branding .brand-label {
    color: #9A1222;
    font-weight: 600;
}

#branding .brand-dot { margin: 0 4px; color: #aaa; }

#branding .brand-context {
    color: #666;
}

@media (max-width: 900px) {
    #wrapper { transform: scale(0.8); }
}

@media (max-width: 700px) {
    #wrapper { transform: scale(0.6); }
    #views, #pages { width: 110px; font-size: 11px; }
}

@media (max-width: 500px) {
    #wrapper { transform: scale(0.4); }
}
