/* assets/css/style.css */
:root {
    /* MisCasasRD Brand Colors */
    --primary-color: #f69822;
    /* Naranja Principal */
    --primary-hover: #e0891d;
    --secondary-color: #181b23;
    /* Dark Azul/Negro */
    --accent-color: #ffd767;
    /* Amarillo Claro / Acento */

    --background-color: #f8fafc;
    /* Gris muy claro para contraste con forms blancos */
    --card-bg: #ffffff;
    /* Blanco puro */
    --text-main: #181b23;
    /* Texto principal oscuro */
    --text-muted: #64748b;
    --border-color: #e2e8f0;

    --success-color: #10b981;
    --error-color: #ef4444;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 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-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 700;
}

/* Header */
.app-header {
    background-color: transparent;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    color: var(--secondary-color);
}

/* Main Content */
.app-main {
    flex: 1;
    max-width: 800px;
    margin: 3rem auto;
    width: 100%;
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Centrar verticalmente */
}

/* Footer */
.app-footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: auto;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
    gap: 0.5rem;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

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

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

/* Cards */
.card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 3rem;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(15px);
}

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

/* Utilities */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.w-full {
    width: 100%;
}

/* Botones en stack */
.btn-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 450px;
    margin: 0 auto;
}

/* Divisor */
.divider {
    position: relative;
    margin: 2rem 0;
}

.divider-line {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.divider-line-inner {
    width: 100%;
    border-top: 1px solid var(--border-color);
}

.divider-text {
    position: relative;
    display: flex;
    justify-content: center;
    font-size: 0.875rem;
}

.divider-text span {
    background-color: var(--card-bg);
    padding: 0 1rem;
    color: var(--text-muted);
}

/* Drag and Drop Zone */
.drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    background-color: var(--background-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--secondary-color);
    background-color: #eff6ff;
}

.drop-zone-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.drop-zone:hover .drop-zone-icon,
.drop-zone.dragover .drop-zone-icon {
    transform: translateY(-5px);
}

.drop-zone-text {
    font-weight: 500;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.drop-zone-subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.drop-zone-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.drop-zone.has-file {
    border-style: solid;
    border-color: var(--success-color);
    background-color: #ecfdf5;
}

.drop-zone.has-file .drop-zone-icon {
    color: var(--success-color);
}

/* =========================================
   Mobile Responsiveness (Responsive Fixes)
   ========================================= */
@media (max-width: 768px) {

    /* Header no-sticky on mobile */
    .app-header {
        position: relative !important;
        padding: 0.5rem 0 !important;
    }

    /* Stack form grids into 1 column */
    [style*="display: grid"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Reduce card padding on mobile */
    .card {
        padding: 1.5rem !important;
    }

    /* Reduce main container margins */
    .app-main {
        margin: 1rem auto !important;
        padding: 0 1rem !important;
    }

    /* Layout action buttons correctly on mobile (stack them) */
    [style*="justify-content: space-between"],
    [style*="justify-content: flex-end"] {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    .btn {
        width: 100% !important;
        flex: unset !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.15rem !important;
    }
}