/* Estilo general del cuerpo */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-image: url('marmol.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-blend-mode: normal;
    min-height: 100vh; /* Asegurar que el body ocupe toda la altura de la ventana */
    display: flex;
    flex-direction: column;
}

/* Estilo del header y navegación */
header {
    background-color: #333;
    padding: 15px 0;
    text-align: center;
}

nav {
    display: flex;
    justify-content: center;
    background-color: #000000;
    padding: 26px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

nav .logo {
    position: absolute;
    left: 10px;
    top: -5px;
}

nav .logo img {
    height: 90px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    font-size: 16px;
    position: relative;
}

nav a:hover {
    color: #f39c12;
    transition: color 0.3s;
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

header nav ul li {
    margin: 0 15px;
}

header nav ul li a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

header nav ul li a:hover {
    color: #ff9900;
}

/* Iconos sociales */
.social-icons {
    position: absolute;
    right: 45px;
    top: 15px;
}

.icon-instagram {
    width: 23px;
    height: auto;
}

.icon-facebook {
    width: 28px;
    height: auto;
}

.icon-x {
    width: 25px;
    height: auto;
}

.icon-tiktok {
    width: 35px;
    height: auto;
}

.social-icons a img {
    transition: opacity 0.3s;
}

.social-icons a img:hover {
    opacity: 0.8;
}

/* Menú móvil */
.menu-icon {
    display: none;
    font-size: 30px;
    cursor: pointer;
    color: white;
    right: 50px;
    margin-top: -15px;
    position: fixed;
}

.mobile-menu {
    display: none;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 250px;
    background-color: #000;
    padding: 20px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.3);
    flex-direction: column;
    z-index: 9999;
}

.mobile-menu a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 18px;
    margin: 15px 0;
    display: block;
}

.mobile-social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.mobile-social-icons img {
    width: 25px;
    height: auto;
}

/* Sección Hero */
.hero {
    background-image: url('fondo.jpg');
    background-size: cover;
    background-position: center;
    height: 750px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    margin-top: 38px;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero button {
    padding: 15px 30px;
    font-size: 18px;
    background-color: #e67e22;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease-in-out;
}

.hero button:hover {
    background-color: #d35400;
    transform: translateY(-2px);
}

/* Secciones generales */
.section-about, .section-plans, .section-services, .section-coverage {
    padding: 50px 20px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0);
    margin: 20px 0;
    margin-top: 38px;
}

.section-services {
    color: #2c3e50;
    margin: 0;
}

/* Servicios */
.services-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    max-width: 1200px;
    flex-wrap: wrap;
    gap: 25px;
    width: 100%;
}

.service {
    flex: 1 1 200px;
    text-align: center;
    margin: 0;
    padding: 15px;
    background-color: #ecf0f1;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-size: 0.9em;
    overflow: hidden;
    position: relative;
    height: 300px;
    border: 3px solid #b39369;
}

.service-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.6s ease-in-out;
}

.service:hover .service-inner {
    transform: scale(1.00);
}

.service-front,
.service-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
    border: 3px solid #00000000;
    border-radius: 10px;
    padding: 0;
}

.service-front {
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.service-back {
    background-color: #ffffff;
    color: black;
    opacity: 0;
    z-index: 1;
    padding: 0;
    text-align: center;
}

.service:hover .service-back {
    opacity: 1;
}

.service:hover .service-front {
    opacity: 0;
}

.service h3 {
    font-size: 18px;
    color: #34495e;
    margin-bottom: 10px;
}

.service p {
    font-size: 14px;
    color: #7f8c8d;
}

.service li {
    font-size: 14px;
    color: #7f8c8d;
}

.service img {
    width: 150px;
    height: auto;
    border-radius: 10px;
}

/* Tabla de planes */
.plans-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
}

.plans-table th, .plans-table td {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
}

.plans-table th {
    background-color: #34495e;
    color: white;
    font-weight: bold;
}

.plans-table td {
    background-color: #f7f7f7;
}

/* Sección About */
.about-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin-top: 67px;
}

.image-content img {
    width: 100%;
    height: 66vh;
    object-fit: cover;
}

.image-top img {
    object-position: top;
    border-radius: 0;
    margin-top: 0;
}

.image-bottom img {
    object-position: bottom;
    border-radius: 0;
    margin-bottom: -10px;
}

.text-content {
    padding: 20px;
    max-width: 1400px;
    background: rgba(255, 255, 255, 0);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.text-content h2 {
    margin-top: 0;
    text-align: left;
    font-size: 2rem;
}

.text-content p {
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 15px;
}

/* Sección de Afiliación */
.section-affiliation {
    padding: 40px 20px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9);
    margin: 20px auto;
    margin-top: 80px;
    max-width: 1200px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.section-affiliation h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 25px;
    font-weight: 700;
}

.form-container {
    display: flex;
    justify-content: center;
    width: 100%;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.form-group.full-width {
    grid-column: span 3;
}

.form-group label {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.btn-submit {
    grid-column: span 3;
    padding: 12px 25px;
    font-size: 16px;
    background-color: #e67e22;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.btn-submit:hover {
    background-color: #d35400;
    transform: translateY(-2px);
}

#error-message {
    grid-column: span 3;
    color: #d32f2f;
    font-weight: 600;
    margin-top: 10px;
    display: none;
}

/* Sección de Planes (planes-detalle-section) */
.planes-detalle-section {
    padding: 60px 20px;
    text-align: center;
    color: #2c3e50;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 20px auto;
    max-width: 1400px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-top: -40px; /* Ajustar para que no quede detrás del nav */
}

.planes-detalle-section h2 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.planes-detalle-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
}

.plan-card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 25px;
    width: 325px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    min-height: 610px; /* Altura mínima para asegurar visibilidad */
    display: flex;
    flex-direction: column;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    flex-grow: 1; /* Permitir que ocupe todo el espacio disponible */
}

.plan-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    top: 0;
    left: 0;
}

.card-front {
    background-color: #ffffff;
}

.card-back {
    background-color: #f5f6f5;
    transform: rotateY(180deg);
    overflow-y: auto;
}

.card-front h2 {
    font-size: 24px;
    color: #34495e;
    margin-bottom: 10px;
    font-weight: 700;
}

.card-front .plan-descripcion {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 10px;
}

.card-front .precio {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    color: #e67e22;
    font-weight: 600;
}

.card-back h3 {
    font-size: 20px;
    color: #34495e;
    margin-bottom: 15px;
    font-weight: 600;
}

.card-back ul {
    list-style: none;
    padding: 0;
    text-align: left;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 20px;
    width: 100%;
}

.card-back ul li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 15px;
}

.card-back ul li:before {
    content: "•";
    color: #e67e22;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.card-back button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #e67e22;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.card-back button:hover {
    background-color: #d35400;
    transform: translateY(-2px);
}

.plan-basico {
    border: 2px solid #C0C0C0;
    opacity: 0.9;
}

.plan-plus {
    border: 2px solid #d3d3d3;
    transform: scale(1.02);
}

.plan-premium {
    border: 3px solid #e67e22;
    transform: scale(1.08);
    background-color: #fffcf9;
    z-index: 1;
}

.plan-premium:hover {
    transform: scale(1.10);
    box-shadow: 0 12px 30px rgba(230, 126, 34, 0.3);
}

/* Sección de Consulta de Servicios del Afiliado */
.affiliate-services-section {
    padding: 60px 20px;
    text-align: center;
    color: #2c3e50;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 20px auto;
    max-width: 1400px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.affiliate-services-section h2 {
    font-family: 'Merriweather', serif;
    font-size: 2.5rem;
    margin-bottom: 40px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.affiliate-query-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.query-form {
    background-color: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 600px;
}

.query-form .form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
    margin-bottom: 20px;
}

.query-form .form-group label {
    font-weight: 600;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.query-form .form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.query-form .btn-submit {
    padding: 12px 25px;
    font-size: 16px;
    background-color: #e67e22;
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    width: 100%;
}

.query-form .btn-submit:hover {
    background-color: #d35400;
    transform: translateY(-2px);
}

.query-form #error-message {
    color: #d32f2f;
    font-weight: 600;
    margin-top: 10px;
    display: none;
}

.affiliate-services-results {
    display: none;
    width: 100%;
    text-align: center;
}

.affiliate-services-results h3 {
    font-family: 'Merriweather', serif;
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.affiliate-services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

.affiliate-service-card {
    background-color: #f5f6f5;
    border: 3px solid #b39369;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.affiliate-service-card:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: #e67e22;
}

.affiliate-card-front,
.affiliate-card-back {
    width: 100%;
    padding: 25px;
    text-align: center;
    transition: opacity 0.4s ease;
    background-color: #fff;
    border-radius: 15px;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    box-sizing: border-box;
}

.affiliate-card-front {
    z-index: 2;
    opacity: 1;
}

.affiliate-card-back {
    opacity: 0;
    z-index: 1;
    overflow-y: auto;
    padding-bottom: 30px;
}

.affiliate-service-card:hover .affiliate-card-front {
    opacity: 0;
}

.affiliate-service-card:hover .affiliate-card-back {
    opacity: 1;
    z-index: 2;
}

.affiliate-service-card h3 {
    font-family: 'Merriweather', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.affiliate-service-card ul {
    list-style: none;
    text-align: left;
    padding: 0 10px;
    margin: 0;
    flex-grow: 1;
}

.affiliate-service-card li {
    font-size: 1rem;
    color: #7f8c8d;
    margin: 10px 0;
    padding-left: 25px;
    position: relative;
}

.affiliate-service-card li:before {
    content: "✔";
    color: #e67e22;
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

.affiliate-service-card li ul {
    margin-top: 8px;
    padding-left: 25px;
}

.affiliate-service-card li ul li:before {
    content: "→";
    color: #b39369;
}

.affiliate-service-card img {
    width: 150px;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Footer */
footer {
    background-color: #000000f1;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

footer a {
    color: #f39c12;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsividad */
@media (max-width: 768px) {
    .menu-icon {
        display: block;
    }

    nav {
        padding: 41px;
    }

    .nav-links, .social-icons {
        display: none;
    }

    .mobile-menu.active {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
    }

    .services-container {
        flex-direction: column;
        gap: 15px;
        justify-content: center;
        width: 100%;
    }

    .service {
        padding: 10px;
        height: auto;
        width: 85%;
    }

    .about-section {
        margin-top: 60px;
    }

    .image-content img {
        height: 21vh;
    }

    .image-top img {
        margin-top: 10px;
    }

    .image-bottom img {
        margin-bottom: -4px;
    }

    .text-content {
        padding: 15px;
        max-width: 95%;
        background: rgba(255, 255, 255, 0.9);
        border-radius: 8px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }

    .section-about, .section-plans, .section-services, .section-coverage {
        padding: 20px 10px;
    }

    .hero h2 {
        font-size: 28px;
    }

    .hero button {
        padding: 12px 24px;
        font-size: 16px;
    }

    .plans-table th, .plans-table td {
        font-size: 14px;
        padding: 10px;
    }

    .section-affiliation {
        padding: 20px 10px;
        margin-top: 60px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-group.full-width {
        grid-column: span 1;
    }

    .btn-submit {
        grid-column: span 1;
        width: 100%;
    }

    /* Ajustes para las tarjetas de planes en móviles */
    .planes-detalle-section {
        padding: 30px 10px;
        margin-top: 60px;
    }

    .planes-detalle-section h2 {
        font-size: 2rem;
    }

    .planes-detalle-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .plan-card {
      width: 95%;
      max-width: 320px;   /* mantiene controlado el ancho */
      padding: 10px;
      min-height: 380px;  /* antes 300px */
  }

  .card-front,
  .card-back {
      padding: 10px;
  }

  .card-back ul {
      font-size: 12px;    /* aún más compacto */
      line-height: 1.3;
  }

    .card-front h2 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    .card-front .plan-descripcion {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .card-front .precio {
        font-size: 16px;
    }

    .card-back h3 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .card-back ul {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 15px;
    }

    .card-back ul li {
        margin-bottom: 8px;
        padding-left: 12px;
    }

    .card-back button {
        font-size: 14px;
        padding: 8px 16px;
    }

    .plan-premium {
        transform: scale(1);
        border: 3px solid #e67e22;
        background-color: #fffcf9;
    }

    .plan-premium:hover {
        transform: translateY(0);
        box-shadow: 0 8px 20px rgba(230, 126, 34, 0.3);
    }

    .plan-plus {
        transform: scale(1);
    }

    .affiliate-services-section {
        padding: 40px 15px;
    }

    .affiliate-services-section h2 {
        font-size: 2rem;
    }

    .affiliate-services-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .affiliate-service-card {
        padding: 20px;
        min-height: 450px;
    }

    .query-form {
        padding: 20px;
    }

    .query-form .form-group input {
        font-size: 12px;
        padding: 8px;
    }

    .query-form .btn-submit {
        font-size: 14px;
        padding: 10px 20px;
    }
}

@media (max-width: 320px) {
    .section-affiliation {
        padding: 15px 5px;
    }

    .form-grid {
        gap: 5px;
    }

    .btn-submit {
        padding: 8px 16px;
        font-size: 12px;
    }

    /* Ajustes adicionales para pantallas muy pequeñas */
    .planes-detalle-section {
        padding: 20px 5px;
        margin-top: 50px;
    }

    .planes-detalle-section h2 {
        font-size: 1.5rem;
    }

    .planes-detalle-container {
        gap: 10px;
    }

    .plan-card {
        width: 95%;
        max-width: 280px;
        padding: 10px;
        min-height: 300px;
    }

    .card-front,
    .card-back {
        padding: 10px;
    }

    .card-front h2 {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .card-front .plan-descripcion {
        font-size: 11px;
        margin-bottom: 6px;
    }

    .card-front .precio {
        font-size: 14px;
    }

    .card-back h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .card-back ul {
        font-size: 11px;
        line-height: 1.3;
        margin-bottom: 10px;
    }

    .card-back ul li {
        margin-bottom: 6px;
        padding-left: 10px;
    }

    .card-back button {
        font-size: 12px;
        padding: 6px 12px;
    }

    .affiliate-services-section {
        padding: 30px 10px;
    }

    .affiliate-services-section h2 {
        font-size: 1.5rem;
    }

    .affiliate-service-card {
        padding: 15px;
        min-height: 400px;
    }

    .affiliate-service-card h3 {
        font-size: 1.4rem;
    }

    .affiliate-service-card li {
        font-size: 0.9rem;
    }
}

.btn-submit {
  text-decoration: none; /* elimina subrayado */
  display: inline-block; /* para que se vea como botón */
}
