/* ====================================================================
   HEADER Y FOOTER COMUNES - Abogados Tráfico
   Fuente única de estilos para la cabecera fija, navegación y pie de
   página, compartida por todas las páginas del sitio.
   ==================================================================== */

header {
    background: linear-gradient(135deg, #1a3a5f 0%, #2c5282 100%);
    color: white;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    z-index: 1000 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    overflow-x: hidden;
}

.header-top {
    padding: 15px 0;
    background: #ffffff;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.header-top-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.logo-container {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 40%;
}

.logo {
    max-width: 280px;
    width: 100%;
    height: auto;
}

.logo img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 100%;
}

.header-text {
    text-align: right;
    flex: 1;
    padding-left: 10px;
    max-width: 60%;
}

.header-text .header-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: #1a3a5f;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    line-height: 1.2;
    word-wrap: break-word;
}

.header-text .header-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #2c5282;
    opacity: 0.9;
    line-height: 1.3;
}

nav {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100vw;
}

.nav-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    min-height: 60px;
    width: 100%;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 15px 20px;
    display: block;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    padding: 10px;
    z-index: 1002;
    background: none;
    border: none;
    outline: none;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    align-items: center;
    justify-content: center;
}

.hamburger-menu span {
    width: 30px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 3px;
    display: block;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px) !important;
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0 !important;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px) !important;
}

.nav-overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(5px) !important;
    z-index: 999 !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.nav-overlay.active {
    display: block !important;
    opacity: 1 !important;
}

.nav-menu-responsive {
    display: none;
    position: fixed;
    top: 280px;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #1a3a5f 0%, #2c5282 100%);
    flex-direction: column;
    padding: 20px 0;
    z-index: 1001;
    margin: 0;
    list-style: none;
    max-width: 100vw;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.nav-menu-responsive.active {
    display: flex !important;
}

.nav-menu-responsive a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 15px 20px;
    display: block;
    transition: all 0.3s;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    width: 100%;
    box-sizing: border-box;
}

.nav-menu-responsive a:hover {
    background: rgba(255, 255, 255, 0.15);
}

@media screen and (max-width: 1100px) {
    .nav-menu {
        display: none;
    }
    .hamburger-menu {
        display: flex !important;
    }
    .logo {
        max-width: 220px;
    }
}

footer {
    background: #1a3a5f;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #ffd700;
    font-family: 'Montserrat', sans-serif;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #aaa;
}
