﻿/* Inicio.css - Diseño para Home Page con Login Integrado */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #4f46e5;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light: #f9fafb;
    --dark: #1f2937;
    --gray: #6b7280;
    --light-gray: #e5e7eb;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* ==================== HEADER ==================== */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    padding: 32px;
    position: relative;
    overflow: hidden;
}

    .header::before {
        content: "";
        position: absolute;
        top: -50%;
        right: -50%;
        width: 100%;
        height: 200%;
        background: rgba(255, 255, 255, 0.1);
        transform: rotate(25deg);
    }

.header-content {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.header-icon {
    font-size: 2.5rem;
    margin-right: 20px;
    background: rgba(255, 255, 255, 0.2);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-text h1 {
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.header-text p {
    font-weight: 300;
    opacity: 0.9;
    font-size: 1rem;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    padding: 40px;
}

    .main-content > section {
        margin-bottom: 40px;
    }

        .main-content > section h1 {
            font-size: 2.2rem;
            font-weight: 700;
            margin-bottom: 16px;
            color: var(--dark);
        }

        .main-content > section > p.lead {
            font-size: 1.1rem;
            color: var(--gray);
            margin-bottom: 20px;
            line-height: 1.8;
        }

        .main-content > section > p a {
            display: inline-block;
        }

/* ==================== FORM CONTAINER ==================== */
.form-container {
    background: var(--light);
    border-radius: var(--radius);
    padding: 32px;
    margin: 50px 0;
    border: 1px solid var(--light-gray);
}

/* ==================== AUTH FORM ==================== */
.auth-form {
    text-align: center;
    max-width: 450px;
    margin: 0 auto;
}

.auth-header {
    margin-bottom: 32px;
}

.auth-icon {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
}

.auth-form h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
}

.auth-form > div p {
    color: var(--gray);
    margin-bottom: 28px;
    font-size: 1rem;
}

/* ==================== LOGIN FORM ==================== */
.login-form {
    text-align: left;
}

.input-group {
    margin-bottom: 22px;
}

.input-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark);
    font-size: 0.95rem;
}

    .input-label i {
        margin-right: 8px;
        color: var(--primary);
        width: 18px;
        text-align: center;
    }

.form-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--light-gray);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--white);
    font-family: 'Inter', sans-serif;
}

    .form-input:focus {
        outline: none;
        border-color: var(--primary);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
        background-color: var(--white);
    }

    .form-input::placeholder {
        color: #9ca3af;
    }

.password-container {
    position: relative;
    display: flex;
    align-items: center;
}

    .password-container .form-input {
        padding-right: 45px;
    }

.password-toggle {
    position: absolute;
    right: 14px;
    background: none;
    border: none;
    color: var(--gray);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 1.1rem;
}

    .password-toggle:hover {
        color: var(--primary);
    }

    .password-toggle:focus {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
        border-radius: 4px;
    }

.error-message {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 6px;
    display: block;
    font-weight: 500;
}

/* ==================== FORM ACTIONS ==================== */
.form-actions {
    text-align: center;
    margin: 36px 0 28px;
}

.btn-login {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    border: none;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    width: 100%;
    font-family: 'Inter', sans-serif;
    gap: 8px;
}

    .btn-login:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    .btn-login:active:not(:disabled) {
        transform: translateY(0);
    }

    .btn-login:disabled {
        opacity: 0.8;
        cursor: not-allowed;
    }

    .btn-login i {
        font-size: 1.1rem;
    }

/* ==================== AUTH FOOTER ==================== */
.auth-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid var(--light-gray);
    color: var(--gray);
    font-size: 0.95rem;
}

.register-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .register-link:hover {
        color: var(--primary-dark);
        text-decoration: underline;
    }

    .register-link:focus {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
        border-radius: 4px;
    }

/* ==================== HOME PAGE ROWS ==================== */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin-bottom: 32px;
}

    .row section {
        padding: 28px;
        background: var(--light);
        border-radius: var(--radius);
        border: 1.5px solid var(--light-gray);
        transition: var(--transition);
        display: flex;
        flex-direction: column;
    }

        .row section:hover {
            border-color: var(--primary);
            box-shadow: 0 8px 16px rgba(37, 99, 235, 0.12);
            transform: translateY(-4px);
        }

        .row section h2 {
            font-size: 1.4rem;
            font-weight: 700;
            margin-bottom: 16px;
            color: var(--dark);
        }

        .row section p {
            color: var(--gray);
            margin-bottom: 18px;
            line-height: 1.7;
            font-size: 0.95rem;
            flex-grow: 1;
        }

/* ==================== BOTONES ==================== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-align: center;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    box-shadow: var(--shadow);
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    .btn-primary:focus {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }

    .btn-primary.btn-md {
        padding: 12px 28px;
        font-size: 1rem;
    }

.btn-outline-dark {
    background: var(--white);
    color: var(--dark);
    border: 1.5px solid var(--light-gray);
    font-weight: 600;
}

    .btn-outline-dark:hover {
        background: var(--light);
        border-color: var(--primary);
        color: var(--primary);
        box-shadow: var(--shadow);
    }

    .btn-outline-dark:focus {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }

/* ==================== NOTIFICATIONS ==================== */
.notification {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 16px 20px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 380px;
    font-weight: 500;
    gap: 12px;
}

    .notification.success {
        background: var(--success);
        color: var(--white);
    }

    .notification.error {
        background: var(--danger);
        color: var(--white);
    }

    .notification i {
        font-size: 1.3rem;
        flex-shrink: 0;
    }

    .notification span {
        flex: 1;
    }

.notification-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.4rem;
    opacity: 0.8;
    padding: 0;
    display: flex;
    align-items: center;
    transition: var(--transition);
    line-height: 1;
}

    .notification-close:hover {
        opacity: 1;
    }

@keyframes slideIn {
    from {
        transform: translateX(420px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 992px) {
    .main-content {
        padding: 32px;
    }

    .row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        border-radius: 0;
        margin: 0;
    }

    .header {
        padding: 24px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-icon {
        margin-right: 0;
        margin-bottom: 16px;
    }

    .header-text h1 {
        font-size: 1.5rem;
    }

    .main-content {
        padding: 24px;
    }

        .main-content > section h1 {
            font-size: 1.8rem;
        }

    .form-container {
        padding: 24px;
        margin: 40px 0;
    }

    .auth-form {
        max-width: 100%;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

        .row section {
            padding: 24px;
        }

    .notification {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
}

@media (max-width: 576px) {
    body {
        padding: 12px;
    }

    .header {
        padding: 20px;
    }

    .header-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .header-text h1 {
        font-size: 1.3rem;
    }

    .header-text p {
        font-size: 0.9rem;
    }

    .main-content {
        padding: 16px;
    }

        .main-content > section h1 {
            font-size: 1.5rem;
        }

        .main-content > section > p.lead {
            font-size: 1rem;
        }

    .form-container {
        padding: 18px;
        margin: 30px 0;
    }

    .auth-icon {
        width: 55px;
        height: 55px;
        font-size: 1.5rem;
    }

    .auth-form h2 {
        font-size: 1.5rem;
    }

    .input-label {
        font-size: 0.9rem;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 16px;
    }

    .btn-login {
        padding: 13px 24px;
        font-size: 0.95rem;
    }

    .row section {
        padding: 20px;
    }

        .row section h2 {
            font-size: 1.2rem;
        }

        .row section p {
            font-size: 0.9rem;
        }

    .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .btn-primary.btn-md {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .notification {
        bottom: 12px;
        right: 12px;
        left: 12px;
        padding: 14px 16px;
        font-size: 0.9rem;
    }
}

/* ==================== ACCESSIBILITY ==================== */
.form-input:focus-visible,
.btn-login:focus-visible,
.password-toggle:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
