/* KLK Digital Vallarta - Styles CSS */
/* Optimized for production */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #0a0a0a;
    color: #ffffff;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1000;
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    height: 60px;
}

.logo img {
    height: 100%;
    width: auto;
    max-height: 60px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: #E07A5F;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== HERO SECTION ===== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.05)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.03)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.04)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    padding: 2rem;
    z-index: 2;
    position: relative;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(50px);
    animation: fadeInUp 1s ease 0.5s forwards;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.8s forwards;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 1.1s forwards;
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ===== FLOATING ELEMENTS ===== */
.floating-element {
    position: absolute;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

/* ===== SERVICES SECTION ===== */
.services {
    padding: 100px 5% 80px;
    background: #111;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title p {
    font-size: 1.2rem;
    color: #aaa;
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(224, 122, 95, 0.1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(224, 122, 95, 0.1), transparent);
    transition: left 0.5s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(224, 122, 95, 0.2);
}

.service-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-card p {
    color: #bbb;
    line-height: 1.8;
}

/* ===== TESTIMONIALS SECTION ===== */
.testimonials {
    padding: 100px 5% 80px;
    background: #111;
}

.testimonial-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(224, 122, 95, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    color: #ddd;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.testimonial-author {
    color: #E07A5F;
    font-weight: 600;
}

/* ===== ABOUT SECTION ===== */
.about {
    padding: 100px 5%;
    background: #0a0a0a;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text p {
    color: #bbb;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 15px;
    border: 1px solid rgba(224, 122, 95, 0.1);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: #aaa;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.about-visual {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
    border-radius: 20px;
    overflow: hidden;
}

.about-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.3)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>');
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 100px 5%;
    background: #111;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(224, 122, 95, 0.1);
    transform: translateX(10px);
}

.contact-item i {
    font-size: 1.5rem;
    margin-right: 1rem;
    background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-form {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(224, 122, 95, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #ddd;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(224, 122, 95, 0.1);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #E07A5F;
    box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.1);
}

.form-group select option {
    background: #1a1a1a;
    color: white;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(224, 122, 95, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ===== FOOTER ===== */
footer {
    background: #0a0a0a;
    padding: 2rem 5%;
    text-align: center;
    border-top: 1px solid rgba(224, 122, 95, 0.1);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 10px 25px rgba(224, 122, 95, 0.3);
}

/* ===== PROJECTS SECTION ===== */
.projects {
    padding: 100px 5% 80px;
    background: #0a0a0a;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.project-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(224, 122, 95, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(224, 122, 95, 0.15);
    border-color: rgba(224, 122, 95, 0.3);
}

.project-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(224, 122, 95, 0.3);
}

.project-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.95) 0%, transparent 100%);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.project-card:hover .project-overlay {
    opacity: 1;
    transform: translateY(0);
}

.project-tech-stack {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.project-tech-stack span {
    background: rgba(224, 122, 95, 0.2);
    color: #F4A261;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(224, 122, 95, 0.3);
}

.project-content {
    padding: 2rem;
}

.project-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, rgba(224, 122, 95, 0.15) 0%, rgba(244, 162, 97, 0.15) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.project-icon i {
    font-size: 1.5rem;
    background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.project-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.project-tagline {
    font-size: 1rem;
    color: #E07A5F;
    font-weight: 500;
    margin-bottom: 1rem;
}

.project-description {
    color: #aaa;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.project-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #ddd;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(224, 122, 95, 0.1);
}

.feature-item i {
    font-size: 0.9rem;
    color: #E07A5F;
}

.projects-cta {
    text-align: center;
    padding: 2.5rem;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    border: 1px solid rgba(224, 122, 95, 0.1);
}

.projects-cta p {
    font-size: 1.2rem;
    color: #bbb;
    margin-bottom: 1.5rem;
}

.cta-button-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: transparent;
    color: #E07A5F;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid #E07A5F;
    transition: all 0.3s ease;
}

.cta-button-secondary:hover {
    background: linear-gradient(135deg, #E07A5F 0%, #F4A261 100%);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(224, 122, 95, 0.3);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== KEYBOARD NAVIGATION ===== */
.keyboard-navigation *:focus {
    outline: 2px solid #E07A5F !important;
    outline-offset: 2px !important;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large screens - Pantallas grandes */
@media (min-width: 1200px) {
    .logo {
        height: 60px;
    }

    .logo img {
        max-height: 60px;
    }
}

/* Medium to large screens - Pantallas medianas a grandes */
@media (min-width: 992px) and (max-width: 1199px) {
    .logo {
        height: 65px;
    }

    .logo img {
        max-height: 65px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .logo {
        height: 45px;
    }

    .logo img {
        max-height: 45px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.95);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-image {
        height: 220px;
    }

    .project-features {
        gap: 0.5rem;
    }

    .feature-item {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }

    nav {
        padding: 1rem 3%;
    }

    .hero,
    .services,
    .about,
    .contact,
    .testimonials,
    .projects {
        padding: 80px 3% 60px;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 38px;
    }

    .logo img {
        max-height: 38px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .service-card,
    .contact-form,
    .testimonial-card {
        padding: 1.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .about-text h2 {
        font-size: 2rem;
    }

    .contact-info h3 {
        font-size: 1.5rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        border-radius: 16px;
    }

    .project-image {
        height: 180px;
    }

    .project-content {
        padding: 1.5rem;
    }

    .project-content h3 {
        font-size: 1.25rem;
    }

    .project-description {
        font-size: 0.9rem;
    }

    .projects-cta {
        padding: 1.5rem;
    }

    .projects-cta p {
        font-size: 1rem;
    }

    .cta-button-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
}