* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden !important; /* Forzar sin scroll horizontal */
    width: 100%;
    position: relative;
    max-width: 100%;
}

/* Prevenir overflow en todos los contenedores principales */
.header, .hero, .about, .services, .news-section {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
    position: relative;
}

/* Header styles */
.header {
    background-color: rgba(34, 40, 49, 0.9);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    left: 0; /* Asegura que el header esté alineado a la izquierda */
    z-index: 100;
    transition: background-color 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Permite que los elementos se envuelvan en móviles */
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    height: 60px;
    width: auto;
}

.logo-text {
    color: white;
    margin-left: 30px;
    font-size: 1.2rem;
}

.nav {
    display: flex;
    flex-wrap: wrap; /* Permite que los enlaces se envuelvan en dispositivos pequeños */
    justify-content: center;
    align-items: center;
}

.nav a {
    color: white;
    text-decoration: none;
    margin: 0.5rem 1rem;
}

.nav a:last-child {
    background-color: rgb(2, 0, 128);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.nav a:last-child:hover {
    background-color: #0f5506;
}

.nav a:hover {
    text-decoration: underline;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #0e0e0e;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content a:hover {
    background-color: #222831;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* Eliminar menú hamburguesa */
.menu-toggle {
    display: none;
}

/* Hero section */
.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 20%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, #19191a 100%);
    z-index: 0;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 1;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

/* About section */
.about {
    background: linear-gradient(to bottom, #19191a, rgba(3, 29, 43));
    padding: 4rem 0;
}

.about-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    overflow-x: clip; /* Prevenir desbordamiento */
    position: relative;
}

.about-image {
    position: relative;
    flex: 1;
    width: 100%;
    overflow: hidden; /* Asegura que no haya desbordamiento en la imagen */
}

.about-image::before, .about-image::after {
    content: "";
    position: absolute;
    top: 0;
    height: 100%;
    background: linear-gradient(to right, rgba(3, 29, 43, 1), rgba(3, 29, 43, 0));
    z-index: 1;
    width: 30%;
}

.about-image::before {
    left: 0;
}

.about-image::after {
    right: 0;
    background: linear-gradient(to left, rgba(3, 29, 43, 1), rgba(3, 29, 43, 0));
}

.about-image video {
    position: relative;
    z-index: 0;
    width: 100%;
    height: auto;
    display: block; /* Elimina espacios extras */
}

.about-content {
    flex: 2;
    padding: 1rem;
    color: white;
}

.about-content h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

.about-content p {
    font-size: 1rem;
    line-height: 1.6;
    text-align: justify;
}

/* Services section */
.services {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4rem 0;
    background-color: white;
    color: #222831;
}

.services h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #222831;
    font-size: 2.5rem;
}

.divider {
    width: 80%;
    height: 4px;
    background: linear-gradient(to right, #0e0e0e, #ffffff, #0e0e0e);
    margin: 2rem 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    overflow: hidden; /* Prevenir desbordamiento */
    position: relative;
}

.service-card {
    display: block;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.service-card:hover {
    transform: scale(1.03); /* Reducido para evitar desbordamiento */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block; /* Elimina espacios extras */
}

.service-card-content {
    padding: 1.5rem;
    text-align: center;
}

.service-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.subtext {
    margin-top: 0;
    font-size: 0.85em;
    color: #666;
    margin-bottom: 0.5em;
}

/* News section */
.news-section {
    padding: 4rem 0;
    text-align: center;
}

.news-section h2 {
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: #222831;
}

.news-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 1rem;
    overflow: hidden; /* Prevenir desbordamiento */
    position: relative;
}

.news-card {
    background-color: #f4f4f4;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block; /* Elimina espacios extras */
}

.news-card-content {
    padding: 1.5rem;
}

.news-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.news-card p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

/* Media queries */
/* Tablets */
@media (max-width: 1024px) {
    .header {
        padding: 0.8rem 1.5rem;
    }
    
    .logo-image {
        height: 50px;
    }
    
    .logo-text {
        margin-left: 20px;
        font-size: 1.1rem;
    }
    
    .nav a {
        margin: 0.5rem 0.8rem;
        font-size: 0.95rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .services-grid, .news-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Dispositivos móviles grandes */
@media (max-width: 768px) {
    .header {
        padding: 0.6rem 1rem;
    }
    
    .header-container {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .logo {
        margin-bottom: 0.3rem;
    }
    
    .logo-image {
        height: 40px;
    }
    
    .logo-text {
        font-size: 1rem;
        margin-left: 15px;
    }
    
    .nav {
        width: 100%;
        justify-content: center;
        padding: 0.3rem 0;
    }
    
    .nav a {
        margin: 0.3rem 0.6rem;
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .nav a:last-child {
        padding: 8px 15px;
    }
    
    .dropdown {
        position: relative;
    }
    
    .dropdown-content {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        min-width: 140px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .about-container {
        flex-direction: column;
    }
    
    .about-image, .about-content {
        width: 100%;
        padding: 0 1rem;
        margin-bottom: 1rem;
    }
    
    .about-content h2 {
        font-size: 1.8rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .news-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .services h2, .news-section h2 {
        font-size: 2rem;
    }
}

/* Dispositivos móviles pequeños */
@media (max-width: 480px) {
    .header {
        padding: 0.5rem 0.8rem;
    }
    
    .header-container {
        padding: 0.3rem 0;
    }
    
    .logo-image {
        height: 35px;
    }
    
    .logo-text {
        font-size: 0.9rem;
        margin-left: 10px;
    }
    
    .nav {
        padding: 0.2rem 0;
    }
    
    .nav a {
        margin: 0.2rem 0.4rem;
        font-size: 0.85rem;
        padding: 0.3rem 0.5rem;
    }
    
    .nav a:last-child {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .dropdown-content {
        min-width: 120px;
    }
    
    .dropdown-content a {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .hero-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .about-content h2 {
        font-size: 1.5rem;
    }
    
    .about-content p {
        font-size: 0.9rem;
    }
    
    .services h2, .news-section h2 {
        font-size: 1.5rem;
    }
    
    .divider {
        width: 90%;
        margin: 1.5rem 0;
    }
    
    .service-card img, .news-card img {
        height: 150px;
    }
    
    .service-card-content, .news-card-content {
        padding: 1rem;
    }
    
    .service-card h3, .news-card h3 {
        font-size: 1.2rem;
    }
    
    .subtext, .news-card p {
        font-size: 0.8rem;
    }
    
    /* Reducir transformaciones que puedan causar desbordamiento */
    .service-card:hover {
        transform: scale(1.01);
    }
}

/* Para dispositivos muy pequeños */
@media (max-width: 360px) {
    .header {
        padding: 0.4rem 0.6rem;
    }
    
    .logo-image {
        height: 30px;
    }
    
    .logo-text {
        font-size: 0.8rem;
        margin-left: 5px;
    }
    
    .nav a {
        margin: 0.2rem;
        font-size: 0.75rem;
        padding: 0.2rem 0.3rem;
    }
    
    .nav a:last-child {
        padding: 5px 10px;
    }
    
    .dropdown-content {
        min-width: 110px;
    }
    
    .dropdown-content a {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .hero-content h1 {
        font-size: 1.3rem;
    }
    
    .service-card img, .news-card img {
        height: 120px;
    }
    
    /* Eliminar todas las transformaciones completamente */
    .service-card:hover {
        transform: none;
    }
}


/* news*/
.news-section {
    padding: 4rem 0;
    text-align: center;
}

.news-section h2 {
    margin-bottom: 2rem;
    font-size: 2.5rem;
    color: #222831;
}

.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.news-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centra las cartas horizontalmente */
    gap: 1rem; /* Reduce el espacio entre las cartas */
}

.news-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
    width: 50%; /* Asegura que las cartas ocupen el 50% del contenedor */
    max-width: 300px; /* Limita el ancho máximo de las cartas */
    margin: 0.5rem; /* Añade margen para centrar las cartas */
}

.news-card:hover {
    transform: scale(1.05);
}

.news-card img {
    width: 100%;
    height: 150px; /* Aumenta la altura de la imagen */
    object-fit: cover;
}

.news-content {
    padding: 1rem;
    text-align: left;
}

.news-content h2 {
    font-size: 1.2rem; /* Reduce el tamaño de la fuente */
    margin-bottom: 0.5rem;
}

.news-content p {
    font-size: 0.9rem; /* Reduce el tamaño de la fuente */
    line-height: 1.5;
}

@media (max-width: 768px) {
    .news-grid {
        flex-direction: column; /* Una columna en pantallas pequeñas */
        align-items: center; /* Centra las cartas en pantallas pequeñas */
    }

    .news-card {
        width: 100%; /* Ocupa el 100% del ancho en pantallas pequeñas */
        max-width: none; /* Elimina el ancho máximo en pantallas pequeñas */
    }

    .news-card img {
        height: auto; /* Ajusta la altura automáticamente en pantallas pequeñas */
    }
}


.brands {
    text-align: center;
    padding: 50px 0;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
    justify-items: center;
    align-items: center;
}

.brand-card {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ddd;
    padding: 10px;
    box-sizing: border-box;
}

.brand-card img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Media Queries para dispositivos pequeños */
@media (max-width: 768px) {
    .brands-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* Ajusta el tamaño mínimo de las columnas */
    }

    .brand-card {
        width: 80px;
        height: 80px;
    }
}
a[href*="http://besucherzaehler.co"] {
    pointer-events: none;
}
/* Footer (nuevo) */
.footer {
    background-color: #0e0e0e;
    color: white;
}

/* Footer (nuevo) */
.footer {
    background-color: #0e0e0e;
    color: white;
    padding: 4rem 2rem 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 2rem;
}

.footer-column {
    flex: 1;
}

.footer-column h3 {
    color: #fff;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

/* CSS adicional para los íconos */
.social-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
}

.social-links i {
    font-size: 1.5rem;
    width: 24px;
    text-align: center;
}

/* Colores específicos para cada red social al hacer hover */
/* Colores específicos por red social */
.social-links a:hover .fa-facebook {
    color: #1877f2; /* Azul Facebook */
}

.social-links a:hover .fa-instagram {
    color: #e4405f; /* Rosa Instagram */
}

.social-links a:hover .fa-tiktok {
    color: #69c9d0; /* Azul TikTok */
}

.social-links a:hover .fa-twitter {
    color: #d1d1d1;
}

.social-links a:hover .fa-youtube {
    color: #ff0000;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1rem;
    border-top: 1px solid #555;
}

/* Media Queries */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .boxes-container {
        flex-direction: column;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .social-links {
        align-items: center;
    }
}