/* ==============================================================
   FATECO DIRECTORIO - ESTILOS PRINCIPALES (Vanilla CSS)
   Traducción de Tailwind a CSS Nativo para Elementor/WordPress
============================================================== */

.fateco-dir-wrapper {
    font-family: system-ui, -apple-system, sans-serif;
    color: #1a2e44;
    background-color: #f8fafc;
    min-height: 100vh;
    overflow-x: hidden;
}

.fateco-dir-wrapper *, .fateco-dir-wrapper *::before, .fateco-dir-wrapper *::after {
    box-sizing: border-box;
}

/* --- Hero Section --- */
.fateco-dir-hero {
    background-color: #1a2e44;
    padding: 64px 24px 96px 24px;
    position: relative;
    z-index: 999;
}

.fateco-dir-hero-bg {
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    z-index: 10;
    background-image: url('../images/bghome.jpg') !important;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    mix-blend-mode: overlay;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    clip-path: inset(0 0 0 0);
}

.fateco-dir-hero-content {
    position: relative;
    z-index: 20;
    max-width: 768px;
    margin: 0 auto;
    text-align: center;
}

.fateco-dir-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

@media (min-width: 768px) {
    .fateco-dir-hero h1 { font-size: 3.75rem; }
}

.fateco-dir-hero h1 span {
    display: inline-flex;
    transform: rotate(-2deg) skewY(-1.5deg);
    transform-origin: left;
}

.fateco-dir-hero h1 img {
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    height: 38px;
    width: 56px;
}

.fateco-dir-hero p {
    margin-top: 24px;
    font-size: 1.25rem;
    color: rgba(255,255,255,0.8);
}

/* --- Dropdown Search --- */
.fateco-dir-search-container {
    margin-top: 40px;
    position: relative;
    max-width: 576px;
    margin-left: auto;
    margin-right: auto;
}

.fateco-dir-search-input-wrapper {
    position: relative;
}

.fateco-dir-icon-search {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: #9ca3af;
    pointer-events: none;
}

#fateco-search-input {
    width: 100%;
    height: 64px;
    padding-left: 56px !important;
    padding-right: 48px !important;
    border-radius: 1rem;
    border: none;
    font-size: 1.125rem;
    font-weight: 500;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    outline: none;
    color: #1f2937;
    transition: box-shadow 0.2s;
    box-sizing: border-box;
}

#fateco-search-input:focus {
    box-shadow: 0 0 0 4px rgba(243, 146, 4, 0.4);
}

#fateco-search-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #9ca3af;
    cursor: pointer;
    font-size: 18px;
}

#fateco-search-toggle:hover {
    color: #f39204;
}

.fateco-dir-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    border: 1px solid #f3f4f6;
    max-height: 288px;
    overflow-y: auto;
    z-index: 9999;
    padding: 8px;
    display: flex;
    flex-direction: column;
}

.fateco-dir-dropdown-item {
    width: 100% !important;
    text-align: left !important;
    padding: 12px 16px !important;
    border-radius: 0.75rem !important;
    background: transparent !important;
    border: none !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
    font-weight: 500 !important;
    color: #374151 !important;
    font-size: 1rem !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.fateco-dir-dropdown-item:hover { background: #f9fafb !important; color: #111827 !important; }
.fateco-dir-dropdown-item.active { background: #f39204 !important; color: #ffffff !important; font-weight: bold !important; }
.fateco-dir-dropdown-item-all { color: #f39204 !important; font-weight: bold !important; background: rgba(243, 146, 4, 0.05) !important; }

/* --- Main Content Area --- */
.fateco-dir-main-content {
    padding: 64px 16px;
    margin-top: -40px;
    position: relative;
    z-index: 10;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

/* --- Grid View (Tarjetas) --- */
.fateco-dir-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    width: 100%;
}
@media (min-width: 768px) { .fateco-dir-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .fateco-dir-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.fateco-dir-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 2rem;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
    border: 1px solid #f3f4f6;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    min-height: 400px;
}

.fateco-dir-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.fateco-dir-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.fateco-dir-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    background: #ffffff;
    border: 2px solid rgba(26, 46, 68, 0.1);
    padding: 6px 16px;
    font-size: 0.875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #1a2e44;
}

.fateco-dir-icon-pin {
    height: 40px;
    width: 40px;
    border-radius: 50%;
    background: rgba(243, 146, 4, 0.1);
    color: #f39204;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.fateco-dir-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fateco-dir-card .fateco-role {
    margin-top: 4px;
    color: #f39204;
    font-weight: 600;
}

.fateco-dir-card .fateco-spec {
    margin-top: 20px;
    font-size: 0.875rem;
    font-style: italic;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}

.fateco-dir-contact-links {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fateco-dir-contact-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #4b5563;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.tel-link svg, .mail-link svg {
    color: #9ca3af;
    transition: color 0.2s;
}

.tel-link:hover { color: #f39204; }
.tel-link:hover svg { color: #f39204; }
.mail-link:hover { color: #22c55e; }
.mail-link:hover svg { color: #22c55e; }

.fateco-dir-wa-btn {
    margin-top: 40px;
    display: flex;
    height: 48px;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    border-radius: 0;
    border-bottom-left-radius: 40px;
    border-top-right-radius: 50px;
    background: #25D366;
    color: #ffffff;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0 24px;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}

.fateco-dir-wa-btn:hover {
    background: #128C7E;
    color: #ffffff !important;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

.fateco-dir-wa-btn .chevron-wa {
    transition: transform 0.3s;
}

.fateco-dir-wa-btn:hover .chevron-wa {
    transform: translateX(4px);
}

/* --- Single View (Mapa) --- */
.fateco-dir-single {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    background: #ffffff;
    border-radius: 2rem;
    padding: 32px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.04);
    border: 1px solid #f3f4f6;
}

@media (min-width: 1024px) {
    .fateco-dir-single {
        grid-template-columns: 1fr 1fr;
        padding: 48px;
    }
}

.fateco-dir-back-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    padding: 0;
}
.fateco-dir-back-btn:hover { color: #f39204; }

.fateco-dir-single-info h3 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
    margin-top: 24px;
    line-height: 1.2;
}

.fateco-dir-single-info .fateco-role {
    font-size: 1.25rem;
    color: #f39204;
    font-weight: 600;
    margin-top: 12px;
}

.fateco-dir-single-info .fateco-spec {
    font-size: 1.125rem;
    color: #6b7280;
    font-style: italic;
    margin-top: 20px;
}

.fateco-dir-single .fateco-dir-contact-links {
    margin-top: 40px;
}
.fateco-dir-single .fateco-dir-contact-links a {
    font-size: 1.125rem;
}

.fateco-dir-single .fateco-dir-wa-btn {
    max-width: 384px;
    margin-top: 40px;
}

.fateco-dir-map {
    border-radius: 2rem;
    overflow: hidden;
    background: #f9fafb;
    border: 1px solid #f3f4f6;
    min-height: 300px;
}

.fateco-dir-map iframe {
    width: 100%;
    height: 100%;
    min-height: 300px;
    border: none;
}
@media (min-width: 1024px) {
    .fateco-dir-map iframe { min-height: 400px; }
}

/* --- Formulario de Contacto --- */
.fateco-dir-form-section {
    padding: 80px 24px 112px 24px;
    background: #ffffff;
    border-top: 1px solid #f3f4f6;
}

.fateco-dir-form-header {
    text-align: center;
    margin-bottom: 64px;
}

.fateco-dir-form-header h2 {
    font-size: 1.875rem;
    font-weight: 800;
    color: #111827;
    margin: 0;
}
@media (min-width: 768px) { .fateco-dir-form-header h2 { font-size: 3rem; } }

.fateco-dir-form-header p {
    margin-top: 16px;
    font-size: 1.125rem;
    color: #6b7280;
}

.fateco-dir-form-box {
    background: #1a2e44;
    border-radius: 3rem;
    padding: 32px;
    max-width: 896px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
@media (min-width: 768px) { .fateco-dir-form-box { padding: 48px; } }

.fateco-dir-form-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .fateco-dir-form-grid input:first-child { grid-column: span 2; }
    .fateco-dir-form-grid textarea { grid-column: span 2; }
    .fateco-dir-form-grid { grid-template-columns: 1fr 1fr; }
}

.fateco-dir-form-box input, .fateco-dir-form-box textarea {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 0.75rem;
    padding: 16px;
    color: #ffffff;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.fateco-dir-form-box input::placeholder, .fateco-dir-form-box textarea::placeholder {
    color: rgba(255,255,255,0.7);
}

.fateco-dir-form-box input:focus, .fateco-dir-form-box textarea:focus {
    border-color: #f39204;
}

.fateco-dir-form-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 32px;
}
@media (min-width: 640px) { .fateco-dir-form-footer { flex-direction: row; } }

.fateco-dir-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 0.875rem;
    cursor: pointer;
}

#fateco-form-btn {
    background: #f39204;
    color: #ffffff;
    border: none;
    border-bottom-left-radius: 102px;
    border-top-right-radius: 131px;
    padding: 15px 40px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}
@media (min-width: 640px) { #fateco-form-btn { width: auto; } }

#fateco-form-btn:hover {
    background: #ea580c;
    transform: translateY(-2px);
}

#fateco-form-success {
    text-align: center;
    padding: 40px 0;
}

.fateco-icon-success {
    height: 80px;
    width: 80px;
    background: #22c55e;
    color: white;
    font-size: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
}

#fateco-form-success h3 {
    color: #ffffff;
    font-size: 1.875rem;
    font-weight: 700;
}

#fateco-form-reset {
    margin-top: 32px;
    background: none;
    border: none;
    color: #f39204;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

/* --- Animaciones --- */
@keyframes fateco-bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8,0,1,1);
    }
    50% {
        transform: none;
        animation-timing-function: cubic-bezier(0,0,0.2,1);
    }
}

/* Specific SVG Sizing to prevent theme conflict */
.fateco-dir-wrapper svg {
    display: inline-block !important;
    vertical-align: middle !important;
}

.fateco-dir-wrapper .fateco-dir-icon-pin svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
}

.fateco-dir-wrapper .tel-link svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
}

.fateco-dir-wrapper .mail-link svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
}

.fateco-dir-wrapper .fateco-dir-single .tel-link svg {
    width: 24px !important;
    height: 24px !important;
}

.fateco-dir-wrapper .fateco-dir-single .mail-link svg {
    width: 24px !important;
    height: 24px !important;
}

.fateco-dir-wrapper .fateco-dir-wa-btn svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
}

.fateco-dir-wrapper .fateco-dir-back-btn svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

