/* ============================================
   GLORIA CÁRDENAS - PORTAFOLIO FREELANCE
   Estilo: Minimalista Artístico con Animaciones
   Colores: Fucsia #a61f51, Azul #024361, Dorado #db972e
   Tipografía: Georgia (títulos), Poppins (textos)
   ============================================ */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap');

/* --- CSS Variables --- */
:root {
    --fucsia: #a61f51;
    --azul: #024361;
    --dorado: #db972e;
    --negro: #0a0a0a;
    --blanco: #fafafa;
    --gris-claro: #e8e8e8;
    --gris-medio: #888888;
    
    --font-titulo: 'Georgia', 'Times New Roman', serif;
    --font-texto: 'Poppins', sans-serif;
    
    --espaciado-seccion: 120px;
    --max-width: 1400px;
    --transition-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-texto);
    font-weight: 300;
    background-color: var(--blanco);
    color: var(--negro);
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Cursor Personalizado --- */
.cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--fucsia);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease, opacity 0.15s ease;
    transform: translate(-50%, -50%);
}

.cursor.hover {
    transform: translate(-50%, -50%) scale(1.8);
    background-color: rgba(166, 31, 81, 0.1);
}

/* --- Selección de Texto --- */
::selection {
    background-color: var(--fucsia);
    color: var(--blanco);
}

/* --- Links & Botones --- */
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s var(--transition-smooth);
}

a:hover {
    color: var(--fucsia);
}

/* --- Tipografía --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-titulo);
    font-weight: normal;
    line-height: 1.2;
}

h1 {
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

p {
    font-size: 1rem;
    max-width: 65ch;
}

.text-small {
    font-size: 0.875rem;
}

.text-large {
    font-size: 1.25rem;
}

/* --- Layout Containers --- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    padding: var(--espaciado-seccion) 0;
    position: relative;
}

/* --- Header / Navegación --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 30px 0;
    transition: all 0.4s var(--transition-smooth);
}

.header.scrolled {
    padding: 15px 0;
    background-color: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-titulo);
    font-size: 1.5rem;
    color: var(--negro);
    position: relative;
}

.logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--fucsia);
    transition: width 0.4s var(--transition-smooth);
}

.logo:hover::after {
    width: 100%;
}

.nav-menu {
    display: flex;
    gap: 40px;
    list-style: none;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    position: relative;
    padding: 5px 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--fucsia);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--transition-smooth);
}

.nav-link:hover::before,
.nav-link.active::before {
    transform: scaleX(1);
    transform-origin: left;
}

/* Menú Hamburguesa (Mobile) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    width: 30px;
    height: 2px;
    background-color: var(--negro);
    transition: all 0.3s var(--transition-smooth);
}

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

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

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

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background-color: var(--negro);
    color: var(--blanco);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
}

.hero-bg-line {
    position: absolute;
    background-color: var(--fucsia);
    opacity: 0.3;
}

.hero-bg-line:nth-child(1) {
    width: 1px;
    height: 100%;
    left: 20%;
    animation: lineMove 8s ease-in-out infinite;
}

.hero-bg-line:nth-child(2) {
    width: 1px;
    height: 100%;
    left: 50%;
    animation: lineMove 8s ease-in-out infinite 2s;
}

.hero-bg-line:nth-child(3) {
    width: 1px;
    height: 100%;
    left: 80%;
    animation: lineMove 8s ease-in-out infinite 4s;
}

@keyframes lineMove {
    0%, 100% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-eyebrow {
    font-size: 0.875rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--dorado);
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInUp 1s var(--transition-smooth) 0.3s forwards;
}

.hero-title {
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInUp 1s var(--transition-smooth) 0.5s forwards;
}

.hero-title .highlight {
    color: var(--fucsia);
    font-style: italic;
}

.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    color: var(--gris-claro);
    max-width: 600px;
    margin: 0 auto 50px;
    opacity: 0;
    animation: fadeInUp 1s var(--transition-smooth) 0.7s forwards;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 18px 40px;
    border: 1px solid var(--blanco);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: all 0.4s var(--transition-smooth);
    opacity: 0;
    animation: fadeInUp 1s var(--transition-smooth) 0.9s forwards;
}

.hero-cta:hover {
    background-color: var(--fucsia);
    border-color: var(--fucsia);
    color: var(--blanco);
}

.hero-cta svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s var(--transition-smooth);
}

.hero-cta:hover svg {
    transform: translateX(5px);
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gris-medio);
    opacity: 0;
    animation: fadeIn 1s var(--transition-smooth) 1.2s forwards;
}

.hero-scroll-line {
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--fucsia), transparent);
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- Animaciones Globales --- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

/* Clase para elementos animados al scroll */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s var(--transition-smooth), transform 0.8s var(--transition-smooth);
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* --- Sección Sobre Mí --- */
.about {
    background-color: var(--blanco);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image-wrapper {
    position: relative;
    overflow: hidden;
}

.about-image-wrapper::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--fucsia);
    z-index: -1;
    transition: transform 0.4s var(--transition-smooth);
}

.about-image-wrapper:hover::before {
    transform: translate(10px, 10px);
}

.about-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(20%);
    transition: filter 0.4s var(--transition-smooth);
}

.about-image-wrapper:hover img {
    filter: grayscale(0%);
}

.about-image-placeholder {
    width: 100%;
    aspect-ratio: 4/5;
    background: linear-gradient(135deg, var(--gris-claro) 0%, var(--gris-medio) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: var(--gris-medio);
    text-align: center;
    padding: 20px;
}

.about-content {
    padding-left: 40px;
}

.section-label {
    font-size: 0.75rem;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--fucsia);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-label::before {
    content: '';
    width: 40px;
    height: 1px;
    background-color: var(--fucsia);
}

.about-title {
    margin-bottom: 30px;
    color: var(--negro);
}

.about-text {
    color: var(--gris-medio);
    margin-bottom: 20px;
}

.about-signature {
    font-family: var(--font-titulo);
    font-size: 2rem;
    font-style: italic;
    color: var(--fucsia);
    margin-top: 40px;
}

/* --- Sección Servicios --- */
.services {
    background-color: var(--negro);
    color: var(--blanco);
}

.services-header {
    text-align: center;
    margin-bottom: 80px;
}

.services-title {
    color: var(--blanco);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 50px 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s var(--transition-smooth);
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--fucsia) 0%, var(--azul) 100%);
    opacity: 0;
    transition: opacity 0.4s var(--transition-smooth);
    z-index: 0;
}

.service-card:hover::before {
    opacity: 0.1;
}

.service-card:hover {
    border-color: var(--fucsia);
    transform: translateY(-10px);
}

.service-number {
    font-family: var(--font-titulo);
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 1;
}

.service-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 30px;
    color: var(--dorado);
    position: relative;
    z-index: 1;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.service-description {
    font-size: 0.9rem;
    color: var(--gris-medio);
    position: relative;
    z-index: 1;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    font-size: 0.875rem;
    color: var(--fucsia);
    position: relative;
    z-index: 1;
}

.service-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s var(--transition-smooth);
}

.service-link:hover svg {
    transform: translateX(5px);
}

/* --- Sección Portfolio/Galería --- */
.portfolio {
    background-color: var(--blanco);
}

.portfolio-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 60px;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.portfolio-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.portfolio-image {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: var(--gris-claro);
    overflow: hidden;
    position: relative;
}

.portfolio-item.large .portfolio-image {
    aspect-ratio: 1/1;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--transition-smooth);
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gris-claro) 0%, #d0d0d0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--gris-medio);
    text-align: center;
    padding: 20px;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.9) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s var(--transition-smooth);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-category {
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--dorado);
    margin-bottom: 10px;
}

.portfolio-name {
    font-family: var(--font-titulo);
    font-size: 1.5rem;
    color: var(--blanco);
}

/* --- Página Individual de Servicio --- */
.service-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    background-color: var(--negro);
    color: var(--blanco);
    padding-top: 120px;
}

.service-hero-content {
    max-width: 800px;
}

.service-hero-title {
    margin-bottom: 30px;
}

.service-hero-description {
    font-size: 1.25rem;
    color: var(--gris-claro);
    margin-bottom: 40px;
}

/* Galería de Proyectos */
.projects-section {
    padding: var(--espaciado-seccion) 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.project-card {
    position: relative;
    overflow: hidden;
}

.project-image {
    width: 100%;
    aspect-ratio: 16/10;
    background-color: var(--gris-claro);
    overflow: hidden;
    margin-bottom: 20px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--transition-smooth);
}

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

.project-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gris-claro) 0%, #d0d0d0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: var(--gris-medio);
    text-align: center;
    padding: 20px;
}

.project-info {
    padding: 10px 0;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.project-category {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gris-medio);
}

/* --- Sección IA/Automatizaciones --- */
.ia-section {
    background: linear-gradient(135deg, var(--azul) 0%, #012a3d 100%);
    color: var(--blanco);
    position: relative;
    overflow: hidden;
}

.ia-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(166, 31, 81, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(219, 151, 46, 0.1) 0%, transparent 50%);
}

.ia-content {
    position: relative;
    z-index: 2;
}

.ia-header {
    text-align: center;
    margin-bottom: 80px;
}

.ia-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.ia-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s var(--transition-smooth);
}

.ia-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--dorado);
    transform: translateY(-5px);
}

.ia-card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 25px;
    color: var(--dorado);
}

.ia-card-title {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.ia-card-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* --- Sección Contacto --- */
.contact {
    background-color: var(--blanco);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-info h2 {
    margin-bottom: 30px;
}

.contact-text {
    color: var(--gris-medio);
    margin-bottom: 40px;
}

.contact-details {
    list-style: none;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1rem;
}

.contact-details svg {
    width: 24px;
    height: 24px;
    color: var(--fucsia);
}

.contact-details a:hover {
    color: var(--fucsia);
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 40px;
}

.social-link {
    width: 50px;
    height: 50px;
    border: 1px solid var(--gris-claro);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--transition-smooth);
}

.social-link:hover {
    background-color: var(--fucsia);
    border-color: var(--fucsia);
    color: var(--blanco);
}

.social-link svg {
    width: 20px;
    height: 20px;
}

.contact-form {
    background-color: var(--negro);
    padding: 60px;
}

.form-group {
    margin-bottom: 30px;
}

.form-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--blanco);
    margin-bottom: 10px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--blanco);
    font-family: var(--font-texto);
    font-size: 1rem;
    transition: border-color 0.3s var(--transition-smooth);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--fucsia);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-submit {
    width: 100%;
    padding: 18px 40px;
    background-color: var(--fucsia);
    border: none;
    color: var(--blanco);
    font-family: var(--font-texto);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.4s var(--transition-smooth);
}

.form-submit:hover {
    background-color: var(--dorado);
}

/* --- Footer --- */
.footer {
    background-color: var(--negro);
    color: var(--blanco);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 30px;
}

.footer-logo {
    font-family: var(--font-titulo);
    font-size: 1.5rem;
}

.footer-nav {
    display: flex;
    gap: 40px;
    list-style: none;
}

.footer-nav a {
    font-size: 0.875rem;
    color: var(--gris-medio);
    transition: color 0.3s var(--transition-smooth);
}

.footer-nav a:hover {
    color: var(--fucsia);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--gris-medio);
}

.footer-lang {
    display: flex;
    gap: 15px;
}

.footer-lang a {
    color: var(--gris-medio);
}

.footer-lang a.active,
.footer-lang a:hover {
    color: var(--blanco);
}

/* --- Botones Globales --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 35px;
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.4s var(--transition-smooth);
}

.btn-primary {
    background-color: var(--fucsia);
    color: var(--blanco);
}

.btn-primary:hover {
    background-color: var(--azul);
    color: var(--blanco);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--negro);
    color: var(--negro);
}

.btn-outline:hover {
    background-color: var(--negro);
    color: var(--blanco);
}

.btn-outline-white {
    background: transparent;
    border: 1px solid var(--blanco);
    color: var(--blanco);
}

.btn-outline-white:hover {
    background-color: var(--blanco);
    color: var(--negro);
}

/* --- Responsive Design --- */
@media (max-width: 1200px) {
    .container {
        padding: 0 30px;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .portfolio-item.large {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 992px) {
    :root {
        --espaciado-seccion: 80px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .about-content {
        padding-left: 0;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .ia-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--negro);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right 0.4s var(--transition-smooth);
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.5rem;
        color: var(--blanco);
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .ia-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        padding: 40px 30px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .cursor {
        display: none;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .hero-cta {
        padding: 15px 30px;
    }
    
    .service-card {
        padding: 40px 30px;
    }
}

/* --- Utilidades --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mt-5 { margin-top: 50px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }
.mb-5 { margin-bottom: 50px; }

/* --- Página de Servicio Individual --- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.875rem;
    color: var(--gris-medio);
    margin-bottom: 40px;
    transition: color 0.3s var(--transition-smooth);
}

.back-link:hover {
    color: var(--fucsia);
}

.back-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s var(--transition-smooth);
}

.back-link:hover svg {
    transform: translateX(-5px);
}

/* --- Loading Animation --- */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--negro);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-text {
    font-family: var(--font-titulo);
    font-size: 2rem;
    color: var(--blanco);
    overflow: hidden;
}

.loader-text span {
    display: inline-block;
    animation: loadText 0.8s ease forwards;
    opacity: 0;
    transform: translateY(100%);
}

@keyframes loadText {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
