/* ============================================
   RESPONSIVE STYLES - AFM
   ============================================ */

/* Menú hamburguesa para móvil */
.menu-toggle {
    display: none;
    background-color: #661155;
    color: #fff;
    border: none;
    padding: 15px 20px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    margin-bottom: 10px;
    box-sizing: border-box;
    font-weight: bold;
    transition: background-color 0.3s;
}

.menu-toggle:hover {
    background-color: #7a1a66;
}

.menu-toggle:before {
    content: "☰ ";
    font-size: 24px;
    margin-right: 10px;
    vertical-align: middle;
}

.menu-toggle.active:before {
    content: "✕ ";
}

/* Media Queries */
@media screen and (max-width: 1024px) {
    .contenedor {
        width: 100%;
        max-width: 940px;
        padding: 0 10px;
    }
    
    .footer {
        width: 100%;
        max-width: 954px;
    }
}

@media screen and (max-width: 768px) {
    /* Contenedor principal */
    .contenedor {
        width: 100%;
        padding: 0;
    }
    
    .main {
        min-height: auto;
        padding: 10px;
    }
    
    /* Layout: cambiar de float a bloque */
    .izquierda {
        float: none;
        width: 100%;
        margin-bottom: 20px;
    }
    
    .centro {
        float: none;
        width: 100%;
        margin-left: 0;
        margin-top: 20px;
        padding: 0 10px;
    }
    
    /* Logo */
    .logo {
        margin-left: auto;
        margin-right: auto;
        display: block;
        max-width: 200px;
    }
    
    /* Menú hamburguesa */
    .menu-toggle {
        display: block;
    }
    
    .menu {
        float: none;
        width: 100%;
        left: 0;
        margin-top: 0;
        position: relative;
        display: none;
    }
    
    .menu.active {
        display: block;
    }
    
    .menu ul {
        margin-left: 0;
        box-shadow: none;
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
    }
    
    .menu img {
        display: none;
    }
    
    .menu li {
        border-bottom: 1px solid #999999;
    }
    
    .menu a {
        text-align: left;
        padding: 15px 20px;
        border-left: none;
    }
    
    /* Lenguaje */
    .lenguage {
        float: none;
        width: 100%;
        right: 0;
        margin-top: 10px;
        position: relative;
    }
    
    .lenguage ul {
        margin-right: 0;
        box-shadow: none;
        -webkit-box-shadow: none;
        -moz-box-shadow: none;
    }
    
    .lenguage img {
        display: none;
    }
    
    /* Textos */
    .textos {
        padding: 15px;
        background-size: contain;
    }
    
    .textosarr {
        padding: 15px;
        background-size: contain;
    }
    
    /* Destacados */
    .destacado {
        float: none;
        width: 100% !important;
        height: auto;
        border-right: none;
        border-bottom: 1px dashed #999999;
        padding: 20px;
        margin-bottom: 10px;
    }
    
    .destacado:last-child {
        border-bottom: none;
    }
    
    /* Halo */
    .halo {
        display: none;
    }
    
    .posi {
        display: none;
    }
    
    /* Ajustes adicionales */
    .mas {
        font-size: 12px;
    }
    
    .mas a {
        word-break: break-word;
    }
    
    /* Footer */
    .footer {
        width: 100%;
        height: auto;
        margin-top: 0;
    }
    
    .footerfoto {
        position: relative;
        top: 0;
        margin-bottom: 0;
        height: auto;
        background-size: contain;
    }
    
    .footerfoto li {
        height: auto;
        width: 100%;
    }
    
    .push {
        padding-top: 20px;
    }
    
    /* Tipografía */
    h1 {
        font-size: 20px;
        line-height: 22px;
    }
    
    h2 {
        font-size: 18px;
        line-height: 20px;
    }
    
    p {
        font-size: 14px;
        line-height: 20px;
    }
    
    /* Legal */
    .legal {
        right: 0;
        width: 100%;
        padding: 15px;
        margin-top: 20px;
    }
}

@media screen and (max-width: 480px) {
    /* Ajustes para móviles pequeños */
    .contenedor {
        padding: 0;
    }
    
    .main {
        padding: 5px;
    }
    
    .centro {
        padding: 0 5px;
    }
    
    .textos {
        padding: 10px;
    }
    
    .textosarr {
        padding: 10px;
    }
    
    .destacado {
        padding: 15px 10px;
    }
    
    .destacado h3 {
        font-size: 16px;
        line-height: 20px;
    }
    
    h1 {
        font-size: 18px;
        line-height: 20px;
    }
    
    h2 {
        font-size: 16px;
        line-height: 18px;
    }
    
    p {
        font-size: 13px;
        line-height: 18px;
    }
    
    .menu a {
        font-size: 16px;
        padding: 12px 15px;
    }
    
    .logo {
        max-width: 150px;
    }
    
    /* Facebook like button */
    .fb-like {
        width: 100% !important;
    }
}

/* Imágenes responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Tablas responsive */
@media screen and (max-width: 768px) {
    .tabla, .tabladatos {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tabla table, .tabladatos table {
        min-width: 600px;
    }
}

