:root {
    --primary: #0ea5e9;
    --primary-dark: #0284c7;
    --secondary: #3b82f6;
    --background: #f8fafc;
    --text-main: #0f172a;
    --text-light: #64748b;
    --card-bg: rgba(255, 255, 255, 0.7);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding: 0 5%;
    background: radial-gradient(circle at top right, #e0f2fe, var(--background));
}

.hero-content {
    max-width: 50%;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    letter-spacing: -2px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 10px 20px rgba(14, 165, 233, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(14, 165, 233, 0.4);
}

.hero-image {
    width: 45%;
    height: 500px;
    /* Imagen de stock de lavandería de Unsplash */
    background: url('https://images.unsplash.com/photo-1545173168-9f1947eebb7f?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80') center/cover;
    border-radius: 30px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

/* Services */
.services-section {
    padding: 6rem 5%;
    text-align: center;
    background-color: white;
}

.services-section h2 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}

.section-subtitle {
    color: var(--text-light);
    margin-bottom: 4rem;
    font-size: 1.2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.service-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    background: #e2e8f0;
}

.service-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.service-desc {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 1.05rem;
}

.service-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #f0f9ff;
    border-radius: 10px;
    align-self: flex-start;
}

.loader {
    grid-column: 1 / -1;
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 600;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.footer {
    background: #0f172a;
    color: white;
    text-align: center;
    padding: 3rem 5%;
}

.admin-login-link {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.admin-login-link:hover {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 120px;
    }
    .hero-content {
        max-width: 100%;
        margin-bottom: 3rem;
    }
    .hero h1 {
        font-size: 3rem;
    }
    .hero-image {
        width: 100%;
    }
    .nav-links {
        display: none; /* Simplificado para móvil por ahora */
    }
}

/* Modals */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 3rem 2.5rem;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    animation: modalSlideIn 0.3s ease-out;
}

.modal-content h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--text-main);
    text-align: center;
    font-weight: 800;
    letter-spacing: -1px;
}

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

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--text-main);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #f8fafc;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.1);
    background: white;
}

/* Botón Editar en tarjetas */
.service-card {
    position: relative; /* Para posicionar el botón dentro */
}

.edit-service-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    display: none; /* Se muestra solo si es admin */
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s, color 0.2s;
    z-index: 10;
}

.edit-service-btn:hover {
    transform: scale(1.1);
    background: var(--primary);
    color: white;
}

/* User status en navbar */
.admin-badge {
    background: #ef4444; /* Rojo para cerrar sesión */
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.admin-badge:hover {
    background: #dc2626;
}
