/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

body {
    background: linear-gradient(135deg, #000000 0%, #111111 100%);
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* TARJETA MÁS ANCHA */
.presentation-card {
    width: 100%;
    max-width: 1200px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(216, 255, 60, 0.3);
    position: relative;
    /* Añadido para contexto de z-index */
}

/* Header Section */
.header-card {
    background: #d8ff3c;
    padding: 40px;
    position: relative;
    overflow: hidden;
}

.header-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23000000' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.2;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

/* Logo y título */
.name-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

/* Logo con fondo blanco */
.logo-original {
    width: 90px;
    height: 90px;
    background: #ffffff;
    /* Blanco sólido */
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(216, 255, 60, 0.5);
    border: 3px solid rgba(216, 255, 60, 0.7);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.logo-glass {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.logo-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: transform 0.4s ease;
}

.logo-original:hover .logo-img {
    transform: scale(1.05);
}

.logo-radial-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.7;
    transition: opacity 0.4s ease;
    border-radius: 25px;
    pointer-events: none;
}

.logo-fallback {
    display: none;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(90deg, #d8ff3c 0%, #c4e62e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Fallback */
.logo-glass:has(img[src=""]) .logo-img,
.logo-glass:not(:has(img[src])) .logo-img {
    display: none;
}

.logo-glass:has(img[src=""]) .logo-fallback,
.logo-glass:not(:has(img[src])) .logo-fallback {
    display: block;
}

.name-title h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #000000;
    letter-spacing: 1px;
}

/* Botones de contacto */
.contact-links {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 200px;
}

.whatsapp-btn,
.email-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #000000;
    color: #d8ff3c;
    padding: 10px 16px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
}

.whatsapp-btn:hover,
.email-btn:hover {
    background: #d8ff3c;
    color: #000000;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    border-color: #000000;
}

.whatsapp-btn i,
.email-btn i {
    font-size: 1rem;
}

/* Main Content - AJUSTADO PARA TARJETA ANCHA */
.main-content {
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    position: relative;
    /* Añadido para contexto de z-index */
}

.glass-card {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 16px;
    padding: 30px;
    border: 1px solid rgba(216, 255, 60, 0.3);
    backdrop-filter: blur(5px);
    position: relative;
    z-index: 5;
    /* Aseguramos que el contenido esté por encima */
}

.pitch-content h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #d8ff3c;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.pitch-content p {
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1.1rem;
    color: #ffffff;
}

/* Portfolio Section - COMPACTO */
.portfolio-section {
    position: relative;
    padding-top: 15px;
    border-top: 1px solid rgba(216, 255, 60, 0.1);
    margin-top: 20px;
}

.portfolio-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #d8ff3c;
    color: #000000;
    padding: 10px 20px;
    border-radius: 50px;
    border: 2px solid #d8ff3c;
    box-shadow: 0 4px 12px rgba(216, 255, 60, 0.3);
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 20;
    /* Alto z-index para el botón */
}

.portfolio-btn:hover {
    background: #000000;
    color: #d8ff3c;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(216, 255, 60, 0.4);
}

.portfolio-btn .fa-chevron-down {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    margin-left: 5px;
}

.portfolio-btn .fa-chevron-down.rotate {
    transform: rotate(180deg);
}

/* Dropdown de demos - COMPACTO - Z-INDEX CORREGIDO */
.portfolio-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 320px;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.98);
    border-radius: 12px;
    border: 1px solid rgba(216, 255, 60, 0.5);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    padding: 20px;
    z-index: 1000;
    /* MUY ALTO para que esté por encima de todo */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    backdrop-filter: blur(15px);
}

.portfolio-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content h4 {
    color: #d8ff3c;
    margin-bottom: 15px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(216, 255, 60, 0.2);
}

.credential-display {
    margin-bottom: 20px;
}

.credential-box {
    background: rgba(216, 255, 60, 0.08);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(216, 255, 60, 0.15);
    margin-bottom: 10px;
}

.credential-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.credential-item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.credential-item i {
    color: #d8ff3c;
    font-size: 1.1rem;
    width: 20px;
}

.cred-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cred-label {
    font-size: 0.8rem;
    color: #aaaaaa;
}

.cred-value {
    font-size: 1rem;
    font-weight: 700;
    color: #d8ff3c;
    font-family: 'Courier New', monospace;
}

.credential-note {
    font-size: 0.85rem;
    color: #cccccc;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.credential-note i {
    color: #17a2b8;
    font-size: 0.9rem;
}

.demo-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.demo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(216, 255, 60, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(216, 255, 60, 0.2);
    text-decoration: none;
    color: #ffffff;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    position: relative;
    z-index: 1001;
    /* Aún más alto para los enlaces */
}

.demo-link:hover {
    background: rgba(216, 255, 60, 0.2);
    border-color: rgba(216, 255, 60, 0.4);
    transform: translateX(5px);
}

.demo-link i {
    color: #d8ff3c;
    font-size: 1.1rem;
    width: 20px;
}

.portfolio-url {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #d8ff3c;
    word-break: break-all;
    opacity: 0.8;
    position: relative;
    z-index: 5;
}

/* Gallery Section - COMPACTA */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    position: relative;
    z-index: 1;
    /* Bajo z-index para la galería */
}

.gallery-title {
    grid-column: 1 / -1;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #d8ff3c;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(216, 255, 60, 0.2);
}

/* Tarjetas de proyecto COMPACTAS */
.project-card {
    background: rgba(0, 0, 0, 0.7);
    border-radius: 12px;
    border: 1px solid rgba(216, 255, 60, 0.2);
    padding: 20px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    position: relative;
    z-index: 1;
    /* Bajo z-index para las tarjetas */
}

/* Contenedor de imagen */
.project-image-container {
    width: 100%;
    height: 160px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.7) 0%,
            rgba(0, 0, 0, 0.4) 50%,
            rgba(0, 0, 0, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 15px;
}

.project-image-overlay h4 {
    color: #d8ff3c;
    font-size: 1.2rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 600;
}

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

.project-card:hover .project-image-overlay {
    opacity: 1;
}

/* Placeholder de imagen (fallback) */
.project-image-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(216, 255, 60, 0.05);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(216, 255, 60, 0.2);
    color: #d8ff3c;
    transition: all 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
}

.project-image-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.project-image-placeholder span {
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 0 10px;
    opacity: 0.9;
}

.project-card:hover .project-image-placeholder {
    background: rgba(216, 255, 60, 0.08);
    border-color: rgba(216, 255, 60, 0.4);
}

.project-desc {
    font-size: 0.95rem;
    color: #cccccc;
    line-height: 1.5;
    margin: 0;
    flex: 1;
    text-align: center;
    padding: 0 5px;
}

/* Footer Section */
.footer {
    background: rgba(0, 0, 0, 0.9);
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(216, 255, 60, 0.3);
    position: relative;
    z-index: 1;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #d8ff3c;
    margin-bottom: 5px;
}

.availability-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.availability,
.response-time {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #ffffff;
}

.availability i,
.response-time i {
    color: #d8ff3c;
    font-size: 1rem;
}

.footer-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.footer-cta p {
    font-size: 1.1rem;
    color: #ffffff;
    text-align: right;
    margin-bottom: 5px;
}

.rocket-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #d8ff3c;
    color: #000000;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 2px solid #d8ff3c;
    box-shadow:
        0 6px 20px rgba(216, 255, 60, 0.4),
        0 0 30px rgba(216, 255, 60, 0.2);
    position: relative;
    overflow: hidden;
}

.rocket-btn:hover {
    background: #000000;
    color: #d8ff3c;
    transform: translateY(-3px);
    box-shadow:
        0 8px 25px rgba(216, 255, 60, 0.5),
        0 0 40px rgba(216, 255, 60, 0.3);
    border-color: #d8ff3c;
}

/* Responsive para tarjeta ancha */
@media (max-width: 1250px) {
    .presentation-card {
        max-width: 95vw;
    }
}

@media (max-width: 1100px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-dropdown {
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        width: 90%;
        max-width: 400px;
    }

    .portfolio-dropdown.active {
        transform: translateX(-50%) translateY(0);
    }
}

/* MODIFICADO: Los botones del header SIEMPRE se mantienen a la derecha */
@media (max-width: 900px) {

    /* Los botones se mantienen donde están */
    .header-content {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }

    .name-title {
        align-items: flex-start;
    }

    .contact-links {
        text-align: right;
        align-items: flex-end;
        width: auto;
        min-width: 200px;
    }

    .whatsapp-btn,
    .email-btn {
        width: auto;
        justify-content: flex-start;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .footer {
        flex-direction: column;
        gap: 25px;
        align-items: stretch;
        text-align: center;
    }

    .footer-left,
    .footer-cta {
        width: 100%;
        align-items: center;
    }

    .footer-cta p {
        text-align: center;
    }
}

@media (max-width: 768px) {

    /* Ajustamos el layout pero manteniendo botones a la derecha */
    .header-content {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .name-title {
        flex: 1;
    }

    .contact-links {
        flex-shrink: 0;
    }

    .whatsapp-btn span,
    .email-btn span {
        display: inline;
        /* Siempre muestra el texto */
    }
}

@media (max-width: 600px) {
    .header-card {
        padding: 25px 20px;
    }

    /* Ajustamos para pantallas muy pequeñas pero manteniendo botones a la derecha */
    .header-content {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }

    .logo-original {
        width: 70px;
        height: 70px;
    }

    .logo-img {
        width: 50px;
        height: 50px;
    }

    .logo-fallback {
        font-size: 1.6rem;
    }

    .name-title h2 {
        font-size: 1.1rem;
    }

    .contact-links {
        min-width: 180px;
    }

    .whatsapp-btn,
    .email-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .whatsapp-btn span,
    .email-btn span {
        font-size: 0.85rem;
    }

    .main-content {
        padding: 20px;
    }

    .footer {
        padding: 20px;
    }

    .portfolio-btn {
        width: 100%;
        justify-content: center;
    }

    .project-card {
        min-height: 280px;
    }

    .project-image-container {
        height: 130px;
    }

    .project-image-overlay h4 {
        font-size: 1rem;
    }

    .rocket-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .rocket-btn i {
        font-size: 1.1rem;
    }

    .credential-row {
        flex-direction: column;
        gap: 10px;
    }

    .project-desc {
        font-size: 0.85rem;
    }

    /* Ajuste específico para el dropdown en móvil */
    .portfolio-dropdown {
        z-index: 1000;
        /* Mantenemos alto z-index */
        width: calc(100% - 40px);
        left: 20px;
        transform: translateX(0) translateY(-10px);
    }

    .portfolio-dropdown.active {
        transform: translateX(0) translateY(0);
    }
}

@media (max-width: 480px) {

    /* Pantallas muy pequeñas - ajustamos pero manteniendo estructura */
    .header-content {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }

    .logo-original {
        width: 60px;
        height: 60px;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }

    .logo-fallback {
        font-size: 1.4rem;
    }

    .name-title h2 {
        font-size: 1rem;
        white-space: nowrap;
    }

    .contact-links {
        min-width: 160px;
    }

    .whatsapp-btn,
    .email-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .whatsapp-btn i,
    .email-btn i {
        font-size: 0.9rem;
    }
}

/* Para pantallas extremadamente pequeñas */
@media (max-width: 380px) {
    .header-content {
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
    }

    .name-title {
        min-width: 120px;
    }

    .contact-links {
        min-width: 150px;
    }

    .whatsapp-btn,
    .email-btn {
        padding: 6px 8px;
        font-size: 0.75rem;
    }

    .whatsapp-btn span,
    .email-btn span {
        font-size: 0.75rem;
    }
}

