@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    font-family: "Poppins", sans-serif;
}

html, body {
    overflow-x: hidden; /* Evita desbordamientos horizontales */
    width: 100%;
    height: 100%;
}

section {
    scroll-margin-top: 100px;
    padding: 50px 5%; /* Reduced from 10% to 5% for better small screen usage */
}

:root {
    --primary-color: #ffffff;
    --main-color: #9c9c9c;
    --secondary-color: #1e3932;
    --hover-btn: #9c9c9c;
}

/* Global Styles */
*::selection {
    color: #fff;
    background: var(--main-color);
}

img {
    max-width: 100%; /* Limitar el ancho de las imágenes */
    height: auto; /* Mantiene la proporción de aspecto */
}

/* Barra de Navegación */
header {
    position: fixed;
    width: 100%;
    top: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #000000; /* Fondo negro */
    box-shadow: 0 4px 41px rgba(14, 55, 54, 0.15);
    padding: 15px 5%; /* Reduced from 10% to 5% */
    transition: background-color 0.2s, box-shadow 0.2s;
}

/* Logo */
.logo img {
    width: 100px;
    max-width: 100%;
}

.navbar {
    display: flex;
    gap: 1rem;
    list-style: none;
    flex-grow: 1;
    justify-content: center;
}

.navbar a {
    font-size: 0.9rem; /* Smaller font size to fit better on mobile */
    padding: 10px 15px; /* Reduced padding */
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #808080;
}

/* Estilo para el botón de "Accede a tu Cuenta" */
.btn-login {
    background-color: #df0000;
    color: #ffffff;
    padding: 8px 20px; /* Reduced padding */
    border-radius: 30px;
    font-size: 0.9rem; /* Smaller font size */
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(255, 0, 0, 0.3);
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.2);
    transition: width 0.3s, height 0.3s, top 0.3s, left 0.3s;
    border-radius: 50%;
    z-index: 0;
    transform: translate(-50%, -50%);
}

.btn-login:hover {
    background-color: #b30000;
    box-shadow: 0 6px 12px rgba(126, 0, 0, 0.4);
    transform: translateY(-2px);
}

.btn-login:hover::before {
    width: 400%;
    height: 400%;
    top: -50%;
    left: -50%;
}

.btn-login span {
    position: relative;
    z-index: 1;
}

#menu-icon {
    font-size: 24px;
    color: #ffffff;
    cursor: pointer;
    z-index: 1001;
    display: none;
}

/* Improved mobile menu */
@media (max-width: 992px) {
    .navbar {
        display: none;
        width: 100%;
        background-color: #000000;
        position: fixed;
        top: 0;
        left: 0;
        text-align: center;
        height: 100vh;
        padding: 20px 0;
        box-shadow: 0 4px 41px rgba(14, 55, 54, 0.15);
        z-index: 999;
    }

    .navbar.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    #menu-icon {
        display: block;
    }

    .navbar a {
        display: block;
        padding: 15px 0;
        color: #ffffff;
        font-size: 1.2rem;
        font-weight: 600;
    }

    .navbar a:hover {
        color: #808080;
    }
    
    .btn-login {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}

/* Sección Inicio */
.home {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    background-image: url("../KingFixer/KingFixer.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    gap: 1rem;
    padding: 0 5%; /* Added padding to match other sections */
}

.home::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 1;
}

.home * {
    position: relative;
    z-index: 2;
}

.home-text {
    flex: 1 1 17rem;
    max-width: 600px; /* Limit the width for better readability */
}

.home-text span {
    font-size: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--primary-color);
}

.home-text h1 {
    font-size: 2.5rem; /* Smaller initial size */
    color: var(--primary-color);
}

.home-text p {
    font-size: 1rem;
    color: var(--primary-color);
    margin: 1rem 0 1.5rem;
    line-height: 1.6;
}

.btn {
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    background: transparent;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

.btn:hover {
    color: #ffffff;
    background-color: var(--hover-btn);
    border-color: var(--primary-color);
}

/* Responsive home section */
@media (max-width: 768px) {
    .home-text h1 {
        font-size: 2rem;
    }
    
    .home-text p {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .home-text h1 {
        font-size: 1.8rem;
    }
}

/* KingFixer Section */
.kingfixer {
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    color: #ffffff;
    padding: 60px 5%; /* Reduced padding */
    text-align: center;
}

.kingfixer .section-title {
    font-size: 2.2rem; /* Smaller initial size */
    font-weight: 700;
    color: #e60000;
    margin-bottom: 20px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.kingfixer .section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background-color: #e60000;
    margin: 10px auto 0;
    border-radius: 5px;
}

.kingfixer .section-description {
    font-size: 1.1rem; /* Smaller initial size */
    color: #d1d1d1;
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 900px; /* Limit width for better readability */
    margin-left: auto;
    margin-right: auto;
}

/* Responsive grid for cards */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* More responsive grid */
    gap: 30px;
    justify-items: center;
    justify-content: center;
    max-width: 1300px;
    margin: 0 auto;
}

/* Card styles */
.card {
    background-color: #2c2c2c;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: auto; /* Changed from fixed height to auto */
    min-height: 350px; /* Added min-height instead */
    width: 100%;
    max-width: 320px;
    box-sizing: border-box;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(230, 0, 0, 0.2);
}

.card-icon {
    font-size: 2.3rem;
    color: #e60000;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.card-description {
    font-size: 1rem;
    color: #bfbfbf;
    line-height: 1.6;
    flex-grow: 1;
}

/* About Us Section */
.about-us {
    background-color: #000000;
    color: #ffffff;
    padding: 60px 5%; /* Reduced padding */
    text-align: center;
}

.about-us .section-title {
    font-size: 2.2rem; /* Reduced size */
    font-weight: 700;
    color: #e60000;
    margin-bottom: 20px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.about-us .section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background-color: #e60000;
    margin: 10px auto 0;
    border-radius: 5px;
}

.about-us .section-description {
    font-size: 1.1rem; /* Reduced size */
    color: #d1d1d1;
    margin-bottom: 40px;
    line-height: 1.6;
    max-width: 900px; /* Limit width */
    margin-left: auto;
    margin-right: auto;
}

/* Info box styles */
.info-box {
    background-color: #2c2c2c;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 30px;
    max-width: 320px; /* Set max width */
    width: 100%;
    display: flex;
    flex-direction: column;
    height: 100%; /* Make all boxes same height */
}

.info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(230, 0, 0, 0.2);
}

.info-box i {
    font-size: 2.3rem;
    color: #e60000;
    margin-bottom: 15px;
}

.info-box h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
}

.info-box p {
    font-size: 1rem;
    color: #bfbfbf;
    line-height: 1.6;
    flex-grow: 1;
}

/* Distribuidores Section */
.distribuidores {
    background: linear-gradient(135deg, #0a0a0a, #1a1a1a);
    color: #ffffff;
    padding: 80px 5%; /* Reduced padding */
    text-align: center;
}

.distribuidores .section-title {
    font-size: 2.4rem; /* Reduced size */
    font-weight: 700;
    color: #ff3c00;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.distribuidores .section-description {
    font-size: 1.1rem; /* Reduced size */
    color: #cccccc;
    margin-bottom: 40px;
    line-height: 1.7;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 50px;
    flex-wrap: wrap; /* Allow buttons to wrap on small screens */
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px; /* Reduced size */
    border-radius: 8px;
    font-size: 1.1rem; /* Reduced size */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease-in-out;
    text-transform: uppercase;
    margin: 5px; /* Add margin for wrapped buttons */
}

.btn i {
    font-size: 1.4rem; /* Reduced size */
}

.btn-whatsapp {
    background: #25D366;
    color: #ffffff;
    border: 2px solid transparent;
}

.btn-whatsapp:hover {
    background: #1ebe57;
    border-color: #ffffff;
}

.btn-distribuidores {
    background: #ff3c00;
    color: #ffffff;
    border: 2px solid transparent;
}

.btn-distribuidores:hover {
    background: #c40000;
    border-color: #ffffff;
}

/* Benefits */
.benefits-title {
    font-size: 2rem; /* Reduced size */
    font-weight: 700;
    color: #ff3c00;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.benefits-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* More responsive grid */
    gap: 20px;
    justify-content: center;
    max-width: 1100px;
    margin: 0 auto;
}

.benefit-card {
    background: linear-gradient(135deg, #1a1a1a, #292929);
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(255, 60, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%; /* Make all cards same height */
}

.benefit-card::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 4px;
    background: #ff3c00;
    top: 0;
    left: 0;
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(255, 60, 0, 0.3);
}

.benefit-card i {
    font-size: 2.5rem;
    color: #ff3c00;
    margin-bottom: 15px;
}

.benefit-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}

.benefit-card p {
    font-size: 1rem;
    color: #b0b0b0;
}

/* Licenses Section */
.licenses-section {
    text-align: center;
    padding: 60px 5%; /* Reduced padding */
    background-color: #111111;
    color: #fff;
}

.licenses-section h2 {
    font-size: 2.4rem; /* Reduced size */
    color: #e50914;
    margin-bottom: 20px;
    font-weight: bold;
}

.licenses-section p {
    font-size: 1.1rem; /* Reduced size */
    color: #999;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.licenses-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); /* More responsive grid */
    gap: 25px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

.license-card {
    background: #2b2b2b;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid #e50914;
    height: 100%; /* Make all cards same height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.license-card img {
    max-width: 100px;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
}

.license-card h3 {
    font-size: 1.4rem; /* Reduced size */
    color: #fff;
    margin-bottom: 10px;
    font-weight: bold;
}

.license-card p {
    font-size: 0.95rem; /* Reduced size */
    color: #ccc;
    margin: 5px 0;
}

.license-card .buy-button {
    background: #e50914;
    color: white;
    padding: 10px 20px; /* Reduced size */
    border: none;
    border-radius: 50px;
    font-size: 1rem; /* Reduced size */
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: background 0.3s ease, transform 0.3s ease;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.license-card .buy-button:hover {
    background: #b5060c;
    transform: scale(1.05);
}

.license-card:hover {
    transform: scale(1.03); /* Reduced scale for better mobile experience */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

/* Benefits Section */
#benefits {
    background-color: #121212;
    padding: 60px 5%; /* Reduced padding */
    border-radius: 10px;
    text-align: center;
}

#benefits h2 {
    color: #e50914;
    font-size: 2.2rem; /* Reduced size */
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 25px;
}

#benefits p {
    color: #b3b3b3;
    font-size: 1.05rem; /* Reduced size */
    max-width: 800px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

#benefits .row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* More responsive grid */
    gap: 20px;
    justify-content: center;
    align-items: stretch; /* Make all items stretch to fill row height */
    max-width: 1200px;
    margin: 0 auto;
}

#benefits .card {
    background-color: #1c1c1c;
    color: #ffffff;
    border: 2px solid #e50914;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(229, 9, 20, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 20px;
    text-align: center;
    min-height: 200px; /* Reduced min-height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%; /* Make all cards same height */
}

#benefits .card:hover {
    transform: scale(1.03); /* Reduced scale */
    box-shadow: 0 6px 15px rgba(229, 9, 20, 0.8);
}

#benefits .card i {
    color: #e50914;
    margin-bottom: 12px;
    font-size: 2.2rem; /* Reduced size */
}

#benefits .card h5 {
    font-size: 1.2rem; /* Reduced size */
    margin-bottom: 8px;
}

#benefits .card p {
    font-size: 0.95rem; /* Reduced size */
    color: #b3b3b3;
    line-height: 1.4;
}

/* Footer */
#footer {
    background-color: #0d0d0d;
    color: #fff;
    padding: 60px 5%; /* Reduced padding */
    text-align: center;
    font-family: 'Poppins', sans-serif;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* More responsive grid */
    max-width: 1300px;
    margin: 0 auto;
    gap: 30px;
}

.footer-section {
    text-align: left;
    margin-bottom: 20px; /* Add space between sections when they stack */
}

.footer-logo img {
    width: 100px;
    margin-bottom: 20px;
}

.footer-section h4 {
    font-size: 1.3rem; /* Reduced size */
    color: #e50914;
    margin-bottom: 15px;
    font-weight: bold;
    text-transform: uppercase;
}

.footer-section p, .footer-section ul {
    font-size: 0.95rem; /* Reduced size */
    color: #b3b3b3;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #e50914;
}

.footer-section .social-icons {
    display: flex;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap; /* Allow icons to wrap */
}

.footer-section .social-icons a {
    color: #e50914;
    font-size: 1.6rem; /* Reduced size */
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer-section .social-icons a:hover {
    transform: scale(1.2);
    color: #ffffff;
}

.footer-bottom {
    margin-top: 40px;
    border-top: 1px solid #222;
    padding-top: 25px;
    font-size: 0.95rem; /* Reduced size */
    color: #b3b3b3;
    text-align: center;
}

/* Additional responsive styling */
@media (max-width: 1200px) {
    .kingfixer .section-title,
    .about-us .section-title,
    .distribuidores .section-title,
    .licenses-section h2,
    #benefits h2 {
        font-size: 2rem;
    }
}

@media (max-width: 992px) {
    section {
        padding: 40px 5%;
    }
    
    .kingfixer .section-title,
    .about-us .section-title,
    .distribuidores .section-title,
    .licenses-section h2,
    #benefits h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 30px 5%;
    }
    
    .kingfixer .section-title,
    .about-us .section-title,
    .distribuidores .section-title,
    .licenses-section h2,
    #benefits h2 {
        font-size: 1.6rem;
    }
    
    .kingfixer .section-description,
    .about-us .section-description,
    .distribuidores .section-description,
    .licenses-section p,
    #benefits p {
        font-size: 1rem;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section .social-icons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    section {
        padding: 25px 4%;
    }
    
    .kingfixer .section-title,
    .about-us .section-title,
    .distribuidores .section-title,
    .licenses-section h2,
    #benefits h2 {
        font-size: 1.5rem;
    }
    
    .btn-login {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .card, .info-box, .benefit-card, .license-card {
        padding: 15px;
    }
}

/* Fix for image width to prevent breaking layout */
@media (max-width: 380px) {
    .logo img {
        width: 80px;
    }
    
    .license-card img {
        max-width: 80px;
    }
}