/* ===================================
   VARIABLES Y RESET GLOBAL
   =================================== */

:root {
    --color-primary: #E07856;
    --color-primary-dark: #D97A4C;
    --color-primary-light: #F5E6E0;
    --color-secondary: #25D366;
    --color-text-primary: #2c3e50;
    --color-text-secondary: #7f8c8d;
    --color-text-light: #ecf0f1;
    --color-bg-light: #f8f9fa;
    --color-bg-dark: #1a1f2e;
    --color-bg-darker: #0f1318;
    --color-white: #ffffff;
    --color-border: #f0f1f3;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f3f4f6;
    --color-gray-200: #e5e7eb;
    --color-gray-300: #d1d5db;
    --color-gray-600: #4b5563;
    --color-gray-700: #374151;
    --color-gray-800: #1f2937;
    --color-gray-900: #111827;

    --font-mono: 'Space Mono', monospace;
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s ease;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 40px rgba(224, 120, 86, 0.12);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text-primary);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

p, span, a {
    font-family: var(--font-sans);
}

/* ===================================
   ANIMACIONES KEYFRAMES
   =================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(224, 120, 86, 0.3);
    }
    50% {
        box-shadow: 0 12px 32px rgba(224, 120, 86, 0.5);
    }
}

@keyframes scaleGrow {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes blurGlow {
    0% {
        opacity: 0;
        filter: blur(10px);
    }
    50% {
        opacity: 1;
    }
    100% {
        filter: blur(2px);
        opacity: 0.3;
    }
}

/* Clases de animación */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.animate-slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
    opacity: 0;
}

.animate-slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
    opacity: 0;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* ===================================
   BOTONES GLOBALES
   =================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-decoration: none;
    font-family: var(--font-sans);
    white-space: nowrap;
}

.btn--primary {
    background: linear-gradient(135deg, #E07856 0%, #D97A4C 100%);
    color: var(--color-white);
    box-shadow: 0 8px 24px rgba(224, 120, 86, 0.3);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(224, 120, 86, 0.4);
    background: linear-gradient(135deg, #D97A4C 0%, #C86B42 100%);
}

.btn--primary:active {
    transform: translateY(0);
}

.btn--secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn--secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-2px);
}

/* ===================================
   NAVBAR / HEADER
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
}

.navbar__container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar__logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.navbar__logo-icon {
    font-size: 1.75rem;
}

.navbar__logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-primary);
    font-family: var(--font-mono);
}

.navbar__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.navbar__toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--color-text-primary);
    transition: all var(--transition-normal);
}

.navbar__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.navbar__toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.navbar__menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar__link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-normal);
    font-size: 1rem;
}

.navbar__link:hover {
    color: var(--color-primary);
}

.navbar__cta {
    padding: 10px 20px;
    font-size: 0.875rem;
}

/* Mobile navbar */
@media (max-width: 768px) {
    .navbar__toggle {
        display: flex;
    }

    .navbar__menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        border-bottom: 1px solid var(--color-border);
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-normal);
    }

    .navbar__menu.active {
        max-height: 300px;
    }

    .navbar__link {
        width: 100%;
        padding: 0.5rem 0;
    }

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

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    padding-top: 8rem;
    padding-bottom: 6rem;
    padding-left: 1rem;
    padding-right: 1rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #f0f1f3 100%);
    margin-top: 60px;
}

.hero__background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.hero__background::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(224, 120, 86, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero__background::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(62, 80, 102, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero__container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero__content {
    padding-right: 2rem;
}

.hero__title {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.hero__highlight {
    color: var(--color-primary);
}

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero__buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.hero__card {
    background: linear-gradient(135deg, #E07856, #D97A4C);
    border-radius: 8px;
    padding: 2rem;
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

.hero__card::before {
    content: '';
    position: absolute;
    -top: -24px;
    -right: -24px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}

.hero__card-icon {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.hero__card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.hero__card-description {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.hero__card-list {
    list-style: none;
    space-y: 0.75rem;
}

.hero__card-list li {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* Mobile hero */
@media (max-width: 768px) {
    .hero {
        padding-top: 6rem;
        padding-bottom: 3rem;
    }

    .hero__container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 1rem;
    }

    .hero__buttons {
        flex-direction: column;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }

    .hero__content {
        padding-right: 0;
    }

    .hero__card {
        display: none;
    }
}

/* ===================================
   SECCIONES COMUNES
   =================================== */

section {
    position: relative;
}

.section__title {
    font-size: 2.625rem;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.section__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: 3rem;
    max-width: 600px;
}

.services__container,
.advantages__container,
.portfolio__container,
.contact__container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.services {
    padding: 6rem 1rem;
    background: var(--color-white);
}

.services__header {
    margin-bottom: 4rem;
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* ===================================
   SERVICE CARDS
   =================================== */

.service-card {
    background: var(--color-white);
    border: 2px solid var(--color-border);
    border-radius: 8px;
    padding: 0;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #E07856, #D97A4C);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-smooth);
    pointer-events: none;
    z-index: 10;
}

.service-card:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover .service-card__icon {
    background: linear-gradient(135deg, #E07856, #D97A4C);
    color: var(--color-white);
    transform: scale(1.1) rotate(5deg);
}

.service-card:hover .service-card__image img {
    transform: scale(1.08);
}

.service-card__image {
    width: 100%;
    height: 200px;
    background: var(--color-bg-light);
    overflow: hidden;
}

.service-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-smooth);
}

.service-card__content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-card__icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(224, 120, 86, 0.1), rgba(217, 122, 76, 0.05));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    margin-bottom: 1rem;
    transition: all var(--transition-normal);
}

.service-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-primary);
}

.service-card__description {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ===================================
   ADVANTAGES SECTION
   =================================== */

.advantages {
    padding: 6rem 1rem;
    background: var(--color-bg-light);
}

.advantages__header {
    margin-bottom: 4rem;
}

.advantages__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.advantage-card {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
    transition: box-shadow var(--transition-normal);
}

.advantage-card:hover {
    box-shadow: var(--shadow-md);
}

.advantage-card__number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
}

.advantage-card__title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.advantage-card__description {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ===================================
   PORTFOLIO SECTION
   =================================== */

.portfolio {
    padding: 6rem 1rem;
    background: var(--color-white);
}

.portfolio__header {
    margin-bottom: 4rem;
}

.portfolio__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.portfolio-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    height: 280px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    z-index: 1;
}

.portfolio-card__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

.portfolio-card:hover .portfolio-card__image {
    transform: scale(1.08);
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 300px;
    height: 300px;
    background: rgba(224, 120, 86, 0.2);
    border-radius: 50%;
    opacity: 0;
    transition: all var(--transition-smooth);
    pointer-events: none;
    z-index: 2;
}

.portfolio-card:hover::before {
    opacity: 1;
    right: -20%;
    top: -20%;
    transform: scale(1.5);
}

.portfolio-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.8) 100%);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 3;
    transition: all var(--transition-smooth);
}

.portfolio-card__location {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'IBM Plex Mono', monospace;
    z-index: 10;
}

.portfolio-card__title {
    font-size: 1.25rem;
    color: var(--color-white);
    margin: 1rem 0;
    z-index: 10;
    font-family: var(--font-mono);
}

.portfolio-card__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0;
    transform: translateX(-20px);
    transition: all var(--transition-smooth);
    z-index: 10;
}

.portfolio-card:hover .portfolio-card__link {
    opacity: 1;
    transform: translateX(0);
}

/* ===================================
   CONTACT SECTION
   =================================== */

.contact {
    padding: 6rem 1rem;
    background: linear-gradient(to right, #1a1f2e, #0f1318, #1a1f2e);
    color: var(--color-white);
}

.contact__container {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact__title {
    font-size: 2.625rem;
    margin-bottom: 1.5rem;
    color: var(--color-white);
}

.contact__description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
}

.contact__items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition-normal);
    text-decoration: none;
    color: inherit;
}

.contact-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(224, 120, 86, 0.3);
}

.contact-item__icon {
    font-size: 1.5rem;
}

.contact-item__label {
    font-weight: 600;
    font-size: 0.875rem;
}

.contact-item__value {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.contact__input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--color-white);
    font-family: var(--font-sans);
    font-size: 0.875rem;
    transition: all var(--transition-normal);
}

.contact__input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.contact__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(224, 120, 86, 0.1);
}

.contact__input option {
    background: var(--color-bg-darker);
    color: var(--color-white);
}

.contact__textarea {
    resize: none;
    min-height: 120px;
}

/* Mobile contact */
@media (max-width: 768px) {
    .contact__container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact__form {
        display: none;
    }
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--color-gray-900);
    color: var(--color-text-secondary);
    padding: 2rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer__container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer__text {
    font-size: 0.875rem;
}

.footer__subtext {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ===================================
   BOTÓN WHATSAPP FLOTANTE
   =================================== */

.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #20BA5A);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
    color: var(--color-white);
    z-index: 999;
    animation: pulse 2s ease-in-out infinite;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn:active {
    transform: scale(0.95);
}

@media (max-width: 768px) {
    .whatsapp-btn {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .section__title {
        font-size: 2rem;
    }

    .section__subtitle {
        font-size: 1rem;
    }

    .services__grid,
    .advantages__grid {
        grid-template-columns: 1fr;
    }

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

/* ===================================
   RESPONSIVE BREAKPOINTS
   =================================== */

@media (max-width: 640px) {
    .hero {
        padding-top: 5rem;
        padding-bottom: 2rem;
    }

    .hero__title {
        font-size: 1.75rem;
    }

    .section__title {
        font-size: 1.75rem;
    }

    .services,
    .advantages,
    .portfolio,
    .contact {
        padding: 4rem 1rem;
    }

    .contact__title {
        font-size: 1.75rem;
    }
}

/* Smooth scrolling para navegación */
@supports (scroll-behavior: smooth) {
    html {
        scroll-behavior: smooth;
    }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}