@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Professional Trust */
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-light: #e7f1ff;
    --secondary: #6c757d;
    --dark: #212529;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --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);
    
    /* Typography */
    --font-main: 'Outfit', sans-serif;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-main);
    background-color: var(--white);
    color: var(--dark);
    line-height: 1.5;
    overflow-x: hidden;
}

/* --- Header & Navigation --- */
.header {
    background: var(--white);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.logo img {
    height: 48px;
    width: auto;
    transition: var(--transition);
}

.logo:hover img {
    transform: scale(1.05);
}

.address-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.address-selector:hover {
    background: var(--white);
    border-color: var(--gray-300);
    box-shadow: var(--shadow);
}

.address-selector i {
    color: var(--primary);
}

.address-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--secondary);
}

.address-value {
    font-size: 0.95rem;
    font-weight: 600;
}

.search-bar {
    flex: 1;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border-radius: 50px;
    border: 1px solid var(--gray-300);
    background: var(--gray-100);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    background: var(--white);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.search-bar .search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary);
}

.user-profile {
    position: relative;
    cursor: pointer;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    background: var(--white);
    border: 1px solid var(--gray-300);
    transition: var(--transition);
}

.profile-trigger:hover {
    box-shadow: var(--shadow);
}

.profile-trigger i {
    font-size: 1.25rem;
    color: var(--secondary);
}

.profile-trigger span {
    font-weight: 600;
}

/* --- Trade Icons Section --- */
.trade-categories {
    padding: 2rem 0;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.categories-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.category-icon {
    width: 64px;
    height: 64px;
    background: var(--gray-100);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.category-icon i {
    font-size: 1.75rem;
    color: var(--primary);
}

.category-item:hover .category-icon {
    transform: translateY(-5px);
    background: var(--primary);
}

.category-item:hover .category-icon i {
    color: var(--white);
}

.category-item span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
}

/* --- Hero Section --- */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e7f1ff 100%);
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.hero-content h1 span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    background: var(--primary);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 14px 0 rgba(13, 110, 253, 0.39);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.23);
    background: var(--primary-dark);
}

.hero-image {
    flex: 1;
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.hero-image::after {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--primary);
    border-radius: 20px;
    z-index: -1;
    opacity: 0.1;
}

/* --- Footer --- */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.footer-logo {
    height: 40px;
    filter: brightness(0) invert(1);
    margin-bottom: 2rem;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* --- Modal System --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: none; /* Controlled by JS */
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--white);
    width: 95%;
    max-width: 420px; /* Un poco más angosto */
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.8rem 2.2rem; /* Padding reducido para comprimir altura */
    border-radius: 20px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalAppear 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar personalizada para que se vea premium */
.modal-content::-webkit-scrollbar {
    width: 6px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
}

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

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--secondary);
    font-size: 0.95rem;
}

/* Modern Auth Styles (Matching modal.png layout but site colors) */
.auth-social-row {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1.2rem; /* Espacio reducido */
}

.btn-auth-social {
    flex: 1;
    height: 46px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-google-brand img { width: 22px; }

.btn-facebook-brand { 
    background: #1877f2; 
    border: none; 
}

.fb-circle {
    background: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1877f2;
    font-size: 1rem;
}

.disabled-btn { opacity: 0.6; cursor: not-allowed; filter: grayscale(0.5); }

.auth-divider-simple {
    position: relative;
    text-align: center;
    margin: 1.2rem 0; /* Comprimido */
}
.auth-divider-simple::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}
.auth-divider-simple span {
    position: relative;
    background: white;
    padding: 0 10px;
    color: #64748b;
    z-index: 2;
    font-size: 0.85rem;
}

.form-group-modern {
    margin-bottom: 1rem; /* Comprimido */
    text-align: left;
}
.form-group-modern label {
    display: block;
    color: #475569;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}
.form-group-modern input {
    width: 100%;
    height: 46px;
    padding: 0 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}
.form-group-modern input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 108, 252, 0.1);
}

.password-wrapper { position: relative; }
.password-wrapper i {
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #64748b;
    font-size: 0.9rem;
}

.link-forgot {
    display: block;
    text-align: left;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-decoration: none;
}

.btn-auth-full {
    width: 100%;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 1.5rem;
}
.btn-auth-full:hover { background: #0c56ca; }

.modal-footer-modern {
    text-align: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 1.2rem;
}
.modal-footer-modern p { margin-bottom: 0.8rem; font-size: 0.85rem; color: #475569; }
.modal-footer-modern a { color: var(--primary); text-decoration: none; }

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-auth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem;
    border-radius: 12px;
    font-weight: 600;
    font-family: var(--font-main);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid var(--gray-300);
    background: var(--white);
}

.btn-google img {
    width: 20px;
}

.btn-facebook {
    background: #1877f2;
    color: var(--white);
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--secondary);
    margin: 0.5rem 0;
}

.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--gray-200);
}

.auth-divider span {
    padding: 0 10px;
}

.form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--secondary);
}

.form-group input {
    width: 100%;
    padding: 0.85rem;
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.modal-footer {
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--secondary);
    text-align: center;
}

/* Search Results Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.provider-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid #f1f5f9;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.provider-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.provider-card-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.provider-card-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f5f9;
}

.provider-card-title h4 {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 0.2rem;
}

.provider-card-trade {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 700;
}

.provider-card-body {
    padding: 0 1.5rem 1.5rem;
    flex: 1;
}

.provider-card-bio {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.provider-card-footer {
    padding: 1rem 1.5rem;
    background: #fafafa;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.provider-card-rating {
    color: #f59e0b;
    font-weight: 700;
    font-size: 0.9rem;
}

.btn-view-profile {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}
.dropdown-menu {
    position: absolute;
    top: 120%;
    right: 0;
    width: 240px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
    padding: 0.5rem 0;
    border: 1px solid #f1f5f9;
}

.dropdown-header {
    padding: 1rem;
}

.dropdown-header p {
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.2rem;
}

.dropdown-header a {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #475569;
    font-size: 0.9rem;
    transition: var(--transition);
}

.dropdown-link:hover {
    background: #f8fafc;
    color: var(--primary);
}

.dropdown-link i {
    width: 20px;
    color: #94a3b8;
    font-size: 1rem;
}

.dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 0.5rem 0;
}

/* Profile Dashboard Layout */
.profile-layout {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 5rem; /* Espacio para que no se pegue abajo */
}

.profile-sidebar {
    flex: 0 0 300px;
}

.profile-main {
    flex: 1;
}

.profile-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.profile-photo-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 1.5rem;
}

.profile-photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary);
}

.photo-edit-btn {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: var(--primary);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 3px solid white;
    transition: var(--transition);
}

.photo-edit-btn:hover {
    transform: scale(1.1);
}

.badge-category {
    background: #e0e7ff;
    color: var(--primary);
    padding: 0.3rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0.5rem 0;
    display: inline-block;
}

.provider-rating {
    margin-top: 1rem;
    color: #f59e0b;
}

@media (max-width: 768px) {
    .profile-layout {
        flex-direction: column;
    }
    .profile-sidebar {
        flex: none;
    }
}

/* --- Dropdown Menu --- */
.dropdown-list {
    list-style: none;
}

.dropdown-list li {
    padding: 0.85rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.dropdown-list li:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.dropdown-list li i {
    width: 20px;
    text-align: center;
    color: var(--secondary);
}

.dropdown-list li:hover i {
    color: var(--primary);
}

.dropdown-list .divider {
    height: 1px;
    background: var(--gray-200);
    padding: 0;
    margin: 0.5rem 0;
    cursor: default;
}

/* --- Addresses Modal Specifics --- */
.addresses-modal-content {
    max-width: 500px;
}

.address-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.address-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: var(--transition);
}

.address-item:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.address-item.active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.address-icon {
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    color: var(--primary);
}

.address-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.address-alias {
    font-weight: 700;
    font-size: 1rem;
}

.address-details {
    font-size: 0.85rem;
    color: var(--secondary);
}

.address-check {
    color: var(--primary);
    font-size: 1.2rem;
    min-width: 25px;
}

.address-actions {
    display: flex;
    gap: 0.75rem;
    margin-left: 0.5rem;
}

.btn-action {
    color: var(--secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
}

.btn-action:hover {
    transform: scale(1.15);
}

.btn-edit:hover { color: var(--primary); }
.btn-delete:hover { color: #dc3545; }

.btn-add-address {
    width: 100%;
    padding: 1rem;
    border-radius: 50px;
    border: 2px dashed var(--gray-300);
    background: transparent;
    font-family: var(--font-main);
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-address:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

/* Responsive */
@media (max-width: 992px) {
    .header .nav-container {
        gap: 1rem;
    }
    .hero-container {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    .hero-content h1 {
        font-size: 2.5rem;
    }
    .search-bar {
        display: none;
    }
}
