/* CSS Variables for colors (inspired by macOS) */
:root {
    --macos-bg-primary: #f2f2f7; /* Main light background (similar to macOS light mode) */
    --macos-bg-secondary: #ffffff; /* Card and element background (pure white) */
    --macos-text-primary: #1c1c1e; /* Main dark text */
    --macos-text-secondary: #636366; /* Secondary gray text */
    --macos-accent-blue: #007aff; /* macOS accent blue */
    --macos-accent-blue-hover: #0a84ff; /* macOS accent blue on hover */
    --macos-border-color: rgba(0, 0, 0, 0.08); /* Subtle, translucent border */
    --macos-card-shadow: rgba(0, 0, 0, 0.1); /* Soft shadow for cards */
    --macos-card-shadow-hover: rgba(0, 0, 0, 0.15); /* Slightly stronger shadow on hover */
    --macos-glass-effect: rgba(255, 255, 255, 0.7); /* Glass effect for elements */
    --macos-glass-border: rgba(255, 255, 255, 0.2); /* Border for glass effect */
}

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

body {
    font-family: 'Inter', sans-serif; /* Keep Inter, similar to SF Pro */
    line-height: 1.6;
    color: var(--macos-text-primary);
    background-color: var(--macos-bg-primary);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased; /* Font smoothing */
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--macos-accent-blue);
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

a:hover {
    color: var(--macos-accent-blue-hover);
    transform: translateY(-1px);
}

/* Section Titles */
.section-title {
    font-size: 3em;
    font-weight: 700; /* Less "heavy" than 900, more macOS */
    text-align: center;
    margin-bottom: 15px;
    color: var(--macos-text-primary);
    letter-spacing: -0.02em; /* Slight spacing adjustment */
}

.section-subtitle {
    font-size: 1.2em;
    text-align: center;
    margin-bottom: 60px;
    color: var(--macos-text-secondary);
    line-height: 1.4;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px; /* Slightly smaller */
    border-radius: 10px; /* Rounded corners */
    font-weight: 600;
    text-transform: none; /* No uppercase, like macOS */
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px var(--macos-card-shadow); /* Softer shadow */
    text-align: center;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--macos-accent-blue);
    color: var(--macos-bg-secondary); /* White text for contrast */
}

.btn-primary:hover {
    background-color: var(--macos-accent-blue-hover);
    transform: translateY(-2px); /* Less displacement */
    box-shadow: 0 4px 12px var(--macos-card-shadow-hover);
}

/* Header */
.header {
    background-color: var(--macos-glass-effect); /* Semi-transparent background */
    backdrop-filter: blur(10px); /* Blur effect */
    -webkit-backdrop-filter: blur(10px); /* For Safari compatibility */
    padding: 15px 0; /* Less padding */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 0 var(--macos-border-color); /* Subtle bottom border */
    border-bottom: 1px solid var(--macos-glass-border); /* Glass border */
}

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

.header .logo h1 {
    font-size: 1.8em; /* Slightly smaller */
    font-weight: 700;
    color: var(--macos-text-primary);
}

h1 .azul {
    color:#327bca;
}

.header .nav ul {
    list-style: none;
    display: flex;
}

.header .nav ul li {
    margin-left: 25px; /* Less margin */
}

.header .nav ul li a {
    color: var(--macos-text-primary);
    font-weight: 400; /* Lighter */
    font-size: 1em;
    position: relative;
}

.header .nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px; /* Thinner */
    background-color: var(--macos-accent-blue);
    left: 50%; /* Center the underline */
    transform: translateX(-50%);
    bottom: -5px;
    transition: width 0.2s ease;
}

.header .nav ul li a:hover::after {
    width: 100%;
}

/* Hamburger Menu Button */
.hamburger-menu {
    display: none; /* Hidden by default on desktop */
    background: none;
    border: none;
    font-size: 1.8em;
    color: var(--macos-text-primary);
    cursor: pointer;
    padding: 5px;
    z-index: 1001; /* Ensure it's above the menu */
    transition: color 0.2s ease;
}

.hamburger-menu:hover {
    color: var(--macos-accent-blue);
}

/* Hero Section */
.hero {
    background-color: var(--macos-bg-primary);
    padding: 80px 0; /* Less padding */
    display: flex;
    align-items: center;
    min-height: 70vh; /* Less height */
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.hero-content {
    flex: 1;
    min-width: 300px;
    margin-right: 40px;
    text-align: left;
}

.hero-title {
    font-size: 4em; /* Slightly smaller */
    font-weight: 200; /* A bit bolder */
    margin-bottom: 15px;
    line-height: 1.1;
    color: var(--macos-text-primary);
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-size: 1.4em; /* Slightly smaller */
    margin-bottom: 30px;
    color: var(--macos-text-secondary);
}

.hero-image {
    flex: 1;
    min-width: 300px;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px; /* More subtle borders */
    box-shadow: 0 8px 20px var(--macos-card-shadow); /* Softer shadow */
}

/* Services Section */
.services {
    background-color: var(--macos-bg-secondary); /* White background */
    padding: 80px 0;
    text-align: center;
    border-top: 1px solid var(--macos-border-color); /* Subtle border */
    border-bottom: 1px solid var(--macos-border-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* More compact */
    gap: 25px; /* Less space */
}

.service-card {
    background-color: var(--macos-bg-secondary);
    padding: 35px; /* Less padding */
    border-radius: 12px; /* More subtle borders */
    box-shadow: 0 4px 15px var(--macos-card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
    border: 1px solid var(--macos-border-color);
}

.service-card:hover {
    transform: translateY(-5px); /* Less displacement */
    box-shadow: 0 8px 20px var(--macos-card-shadow-hover);
}

.service-icon {
    font-size: 2.8em; /* Slightly smaller */
    color: var(--macos-accent-blue);
    margin-bottom: 18px;
}

.service-card h3 {
    font-size: 1.6em; /* Slightly smaller */
    margin-bottom: 10px;
    color: var(--macos-text-primary);
    font-weight: 600;
}

.service-card p {
    color: var(--macos-text-secondary);
    font-size: 0.95em;
}

/* Our Process Section */
.process {
    background-color: var(--macos-bg-primary);
    padding: 80px 0;
    text-align: center;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); /* More compact */
    gap: 25px;
}

.step-card {
    background-color: var(--macos-bg-secondary);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--macos-card-shadow);
    position: relative;
    text-align: left;
    border: 1px solid var(--macos-border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--macos-card-shadow-hover);
}

.step-number {
    background-color: var(--macos-accent-blue);
    color: var(--macos-bg-secondary);
    width: 45px; /* Smaller */
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.6em; /* Smaller */
    font-weight: 600;
    position: absolute;
    top: -22px; /* Position adjustment */
    left: 50%;
    transform: translateX(-50%);
    border: 2px solid var(--macos-bg-primary); /* Thinner border */
    box-shadow: 0 1px 5px var(--macos-card-shadow);
}

.step-card h3 {
    font-size: 1.5em;
    margin-top: 25px; /* Space for the number */
    margin-bottom: 8px;
    color: var(--macos-text-primary);
    font-weight: 600;
}

.step-card p {
    color: var(--macos-text-secondary);
    font-size: 0.95em;
}

/* Portfolio Section */
.portfolio {
    background-color: var(--macos-bg-secondary);
    padding: 80px 0;
    text-align: center;
    border-top: 1px solid var(--macos-border-color);
    border-bottom: 1px solid var(--macos-border-color);
}

/* General Portfolio Grid */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* More compact */
    gap: 25px;
    margin-bottom: 60px; /* Space between grid and slider */
}

.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--macos-card-shadow);
    border: 1px solid var(--macos-border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--macos-card-shadow-hover);
}

.portfolio-item img {
    width: 100%;
    height: 220px; /* Slightly smaller height */
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.portfolio-item:hover img {
    transform: scale(1.03); /* Less zoom */
}

.item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0)); /* More subtle transparency */
    color: var(--macos-bg-secondary);
    padding: 15px; /* Less padding */
    transform: translateY(100%);
    transition: transform 0.2s ease;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.portfolio-item:hover .item-overlay {
    transform: translateY(0);
}

.item-overlay h3 {
    font-size: 1.4em; /* Smaller */
    margin-bottom: 5px;
    font-weight: 600;
}

.item-overlay p {
    font-size: 0.85em; /* Smaller */
    color: rgba(255, 255, 255, 0.85);
}

/* Web Projects Slider Section */
.web-projects-slider-section {
    margin-top: 80px; /* Space above the slider section */
}

.web-slider-title {
    font-size: 2.2em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
    color: var(--macos-text-primary);
    letter-spacing: -0.02em;
}

.slider-container {
    position: relative;
    max-width: 900px; /* Max width of the slider */
    margin: 0 auto;
    overflow: hidden; /* Hides non-visible slides */
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--macos-card-shadow);
    border: 1px solid var(--macos-border-color);
    background-color: var(--macos-bg-secondary);
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out; /* Smooth transition for movement */
}

.slide {
    min-width: 100%; /* Each slide takes 100% of container width */
    flex-shrink: 0; /* Prevents slides from shrinking */
    position: relative;
    /* Removed padding-bottom to allow natural height based on content */
    overflow: hidden; /* Ensures image doesn't overflow */
    display: flex; /* Use flex to align image and caption */
    flex-direction: column; /* Stack image and caption vertically */
}


.slide {
    min-width: 25%; /* CAMBIADO: de 100% a 25% para 4 slides */
    width: 25%; /* NUEVO: Ancho fijo */
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.slide img {
    width: 100%;
    height: auto; /* Make height auto for responsiveness */
    display: block;
    border-radius: 12px; /* Rounded corners for image inside slide */
    flex-grow: 1; /* Allow image to grow and take available space */
}

.slide-caption {
    /* Removed absolute positioning to allow it to flow naturally */
    /* bottom: 0; */
    /* left: 0; */
    /* right: 0; */
    width: 100%; /* Ensure caption takes full width */
    background-color: var(--macos-glass-effect); /* Semi-transparent background for caption */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 15px 20px;
    text-align: left;
    color: var(--macos-text-primary);
    border-top: 1px solid var(--macos-glass-border);
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    flex-shrink: 0; /* Prevent caption from shrinking */
}

.slide-caption h3 {
    font-size: 1.3em;
    margin-bottom: 5px;
    font-weight: 600;
}

.slide-caption p {
    font-size: 0.9em;
    color: var(--macos-text-secondary);
}

.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.4); /* Semi-transparent buttons */
    color: var(--macos-bg-secondary);
    border: none;
    padding: 15px 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.2s ease, transform 0.2s ease;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px; /* Fixed size for buttons */
    height: 50px;
}

.slider-button:hover {
    background-color: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.05);
}

.prev-button {
    left: 15px;
}

.next-button {
    right: 15px;
}

.slider-dots {
    text-align: center;
    margin-top: 25px;
}

.slider-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 400%; /* NUEVO: Ancho fijo basado en 4 slides */
}

.dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background-color: var(--macos-border-color); /* Inactive dot color */
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.dot.active {
    background-color: var(--macos-accent-blue); /* Active dot color */
    transform: scale(1.2);
}

/* Contact Section */
.contact {
    background-color: var(--macos-bg-primary);
    padding: 80px 0;
    text-align: center;
}

.contact-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px; /* Less space */
    margin-top: 30px;
}

.contact-form {
    background-color: var(--macos-bg-secondary);
    padding: 35px; /* Less padding */
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--macos-card-shadow);
    flex: 1;
    min-width: 300px;
    max-width: 550px; /* Narrower */
    text-align: left;
    border: 1px solid var(--macos-border-color);
}

.form-group {
    margin-bottom: 18px; /* Less margin */
}

.form-group label {
    display: block;
    margin-bottom: 6px; /* Less margin */
    font-weight: 500; /* Lighter */
    color: var(--macos-text-primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px; /* Less padding */
    border: 1px solid var(--macos-border-color);
    border-radius: 8px; /* More subtle */
    background-color: var(--macos-bg-primary); /* Field background similar to general */
    color: var(--macos-text-primary);
    font-size: 0.95em;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-appearance: none; /* Remove default browser styles */
    -moz-appearance: none;
    appearance: none;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--macos-accent-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2); /* Blue focus shadow */
}

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

.contact-info {
    background-color: var(--macos-bg-secondary);
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 4px 15px var(--macos-card-shadow);
    flex: 1;
    min-width: 250px;
    max-width: 350px; /* Narrower */
    text-align: left;
    border: 1px solid var(--macos-border-color);
}

.contact-info h3 {
    font-size: 1.6em;
    margin-bottom: 20px;
    color: var(--macos-text-primary);
    font-weight: 600;
}

.contact-info p {
    margin-bottom: 12px;
    font-size: 1em;
    color: var(--macos-text-secondary);
}

.contact-info p i {
    margin-right: 8px;
    color: var(--macos-accent-blue);
}

.social-links {
    margin-top: 25px;
    display: flex;
    gap: 15px; /* More compact */
}

.social-links a {
    font-size: 1.6em; /* Slightly smaller */
    color: var(--macos-text-secondary); /* More subtle color */
    transition: color 0.2s ease, transform 0.2s ease;
}

.social-links a:hover {
    color: var(--macos-accent-blue);
    transform: translateY(-3px); /* Less displacement */
}


/* Estilos adicionales para el formulario de contacto */

/* Mensajes de estado del formulario */
.form-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    animation: slideDown 0.5s ease;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    animation: slideDown 0.5s ease;
}

/* Animación para los mensajes */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estados del botón de envío */
.btn-loading {
    display: none;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    background-color: #667eea;
    transform: none;
}

/* Validación de campos */
.form-group input:invalid,
.form-group textarea:invalid {
    border-color: #dc3545;
}

  /* Estilos para los mensajes del formulario */
        .form-message {
            padding: 15px;
            margin-bottom: 20px;
            border-radius: 8px;
            font-weight: 500;
            text-align: center;
        }
        
        .form-message.success {
            background-color: #d4edda;
            color: #155724;
            border: 1px solid #c3e6cb;
        }
        
        .form-message.error {
            background-color: #f8d7da;
            color: #721c24;
            border: 1px solid #f5c6cb;
        }
        
        .btn-loading {
            display: none;
        }
        
        .btn:disabled {
            opacity: 0.7;
            cursor: not-allowed;
        }

/* Footer */
.footer {
    background-color: var(--macos-bg-secondary);
    color: var(--macos-text-secondary);
    text-align: center;
    padding: 25px 0; /* Less padding */
    font-size: 0.85em;
    border-top: 1px solid var(--macos-border-color);
}

/* Media Queries for Responsiveness */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-content {
        margin-right: 0;
        margin-bottom: 30px;
    }

    .hero-title {
        font-size: 3em;
    }

    .hero-subtitle {
        font-size: 1.1em;
    }

    /* Mobile Menu Specifics */
    .header .nav {
        display: none; /* Hide desktop nav */
        flex-direction: column;
        position: absolute;
        top: 60px; /* Below header */
        left: 0;
        width: 100%;
        background-color: var(--macos-glass-effect);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 2px 10px var(--macos-card-shadow);
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
        overflow: hidden; /* Hide content that might overflow during transition */
        max-height: 0; /* Start hidden */
        transition: max-height 0.3s ease-in-out;
    }

    .header .nav.active {
        display: flex; /* Show when active */
        max-height: 300px; /* Arbitrary max-height for smooth transition */
    }

    .header .nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 20px 0;
    }

    .header .nav ul li {
        margin: 10px 0;
        width: 100%;
        text-align: center;
    }

    .header .nav ul li a {
        padding: 10px 0;
        display: block;
        color: var(--macos-text-primary);
        font-weight: 500;
    }

    .header .nav ul li a::after {
        display: none; /* No underline effect on mobile */
    }

    .hamburger-menu {
        display: block; /* Show hamburger on mobile */
    }

    /* Slider adjustments for tablets and smaller desktops */
    .slider-button {
        padding: 12px 15px;
        width: 40px;
        height: 40px;
        font-size: 1em;
    }

    .slide-caption h3 {
        font-size: 1.2em; /* Slightly smaller for tablets */
    }

    .slide-caption p {
        font-size: 0.85em; /* Slightly smaller for tablets */
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2em;
    }

    .section-subtitle {
        font-size: 0.9em;
    }

    .hero-title {
        font-size: 2.5em;
    }

    .hero-subtitle {
        font-size: 1em;
    }

    .services-grid,
    .process-steps {
        grid-template-columns: 1fr; /* One column on mobile */
    }

    .contact-content {
        flex-direction: column;
        align-items: center;
    }

    .contact-form,
    .contact-info {
        max-width: 100%;
        width: 100%;
        padding: 25px;
    }

    .header .container {
        flex-direction: row; /* Keep logo and hamburger on same row */
        justify-content: space-between;
    }

@media (max-width: 768px) {
    .slide-caption {
        padding: 12px 15px; /* Ajuste específico para móviles */
    }
    
    .slide-caption h3 {
        font-size: 1.1em;
        margin-bottom: 4px; /* Reducir margen en móvil */
    }
    
    .slide-caption p {
        font-size: 0.8em;
        line-height: 1.3; /* Mejorar legibilidad */
    }
}

@media (max-width: 480px) {
    .slide-caption h3 {
        font-size: 1em; /* Aún más pequeño en pantallas muy pequeñas */
    }
    
    .slide-caption p {
        font-size: 0.75em;
    }
}


    /* Slider adjustments for mobile */
    .slider-button {
        padding: 10px 12px;
        width: 35px;
        height: 35px;
        font-size: 0.9em;
    }

    .slide-caption {
        padding: 10px 15px; /* Reduced padding for mobile captions */
        /* Removed padding-bottom as it's no longer needed with flexbox */
    }

    .slide-caption h3 {
        font-size: 1.1em; /* Smaller font for mobile */
    }

    .slide-caption p {
        font-size: 0.8em; /* Smaller font for mobile */
    }
}

@media (max-width: 480px) {
    .header .logo h1 {
        font-size: 1.6em;
    }

    .hero-title {
        font-size: 1.8em;
    }

    .hero-subtitle {
        font-size: 0.9em;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.85em;
    }

    .service-card, .step-card, .contact-form, .contact-info {
        padding: 20px;
    }
}
