/* assets/styles/dashboard.css */

body.full-width-layout {
    align-items: stretch;
    justify-content: flex-start;
    background-color: #ffffff;
    background-image: none;
}

/* Dashboard Floating Header Styles */
.dashboard-header {
    position: fixed;
    top: 20px;
    left: 40px;
    right: 40px;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.35s ease-in-out, opacity 0.7s ease-in-out;
    z-index: 100;
    box-sizing: border-box;
}
.dashboard-header.header-hidden {
    transform: translateY(-160px);
    opacity: 0;
    pointer-events: none;
}
.dashboard-header .logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
}
.dashboard-header .logo-img {
    height: 80px;
    width: auto;
}
.dashboard-header .header-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}
.dashboard-header .nav-link {
    color: #475569;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}
.dashboard-header .nav-link:hover {
    color: var(--color-spse-dark);
}
.dashboard-header .nav-link.active {
    color: var(--color-spse-dark);
    font-weight: 700;
}
.dashboard-header .nav-icon-svg {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    color: #64748b;
}
.dashboard-header .btn-oficina-virtual {
    background-color: var(--color-spse-dark);
    color: #ffffff;
    border-radius: 50px;
    padding: 12px 32px;
    font-weight: 600;
    text-decoration: none;
    font-size: 1.05rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 45, 98, 0.15);
}
.dashboard-header .btn-oficina-virtual:hover {
    background-color: var(--color-spse-hover);
    box-shadow: 0 4px 12px rgba(0, 45, 98, 0.25);
    transform: translateY(-1px);
}

/* Hamburger Menu Button (Hidden on desktop) */
.hamburger-menu {
    display: none;
}

/* Scroll to Top Button */
.btn-scroll-top {
    position: fixed;
    bottom: 32px;
    right: 40px;
    width: 48px;
    height: 48px;
    background-color: var(--color-spse-dark);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 99;
}
.btn-scroll-top:hover {
    background-color: var(--color-spse-hover);
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.btn-scroll-top svg {
    width: 20px;
    height: 20px;
    color: #ffffff;
}
.btn-scroll-top.btn-scroll-top-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Dashboard Main Content */
.dashboard-container {
    flex: 1;
    width: 100%;
    max-width: 1340px;
    margin: 0 auto;
    padding: 180px 24px 60px 24px; /* Increased top padding to accommodate the taller header */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Hero Section */
.dashboard-hero {
    text-align: center;
    margin-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.hero-icon-wrapper {
    width: 64px;
    height: 64px;
    background-color: #eff6ff;
    color: #1d4ed8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}
.hero-icon-wrapper svg {
    width: 28px;
    height: 28px;
    color: #1e3a8a;
}
.dashboard-hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--color-spse-dark);
    margin: 0 0 12px 0;
    letter-spacing: -0.02em;
}
.dashboard-hero p {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    margin: 0 0 20px 0;
}
.hero-divider {
    width: 48px;
    height: 3px;
    background-color: #2563eb;
    border-radius: 2px;
}

/* Grid of Procedures */
.tramites-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
    width: 100%;
    margin-bottom: 60px;
    align-items: stretch;
}
.tramite-card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    padding: 36px 24px 28px 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 410px;
}
.tramite-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
    border-color: #cbd5e1;
}
.tramite-card-icon-wrapper {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background-color: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}
.tramite-card:hover .tramite-card-icon-wrapper {
    background-color: #dbeafe;
    transform: scale(1.05);
}
.tramite-card-icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
}
.tramite-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-spse-dark);
    margin: 0 0 16px 0;
    line-height: 1.3;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tramite-card-divider {
    width: 100%;
    height: 1px;
    background-color: #f1f5f9;
    margin-bottom: 20px;
}
.tramite-card p {
    font-size: 0.92rem;
    color: var(--color-text-muted);
    line-height: 1.6;
    margin: 0 0 24px 0;
    flex: 1;
}
.tramite-card .btn-tramite {
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    background-color: #003b94;
    color: #ffffff;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    gap: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tramite-card .btn-tramite:hover {
    background-color: #002d72;
    box-shadow: 0 4px 12px rgba(0, 59, 148, 0.25);
}
.tramite-card .btn-tramite .btn-arrow {
    width: 16px;
    height: 16px;
    stroke-width: 2.75px; /* Matches the weight of the bold text perfectly */
    display: inline-block;
    transition: transform 0.2s ease;
}
.tramite-card .btn-tramite:hover .btn-arrow {
    transform: translateX(4px);
}

/* Bottom Info Bar */
.dashboard-info-bar {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-lg);
    padding: 32px 40px;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}
.info-bar-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.info-bar-item:not(:last-child) {
    border-right: 1px solid #e2e8f0;
    padding-right: 40px;
}
.info-bar-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.info-bar-icon-wrapper svg {
    width: 22px;
    height: 22px;
}
.info-bar-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.info-bar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-spse-dark);
}
.info-bar-description {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Footer (Centered style) */
.dashboard-footer {
    background-color: var(--color-spse-dark);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}
.footer-social-container {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}
.footer-social-link {
    color: #ffffff;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.footer-social-link:hover {
    opacity: 0.8;
    transform: scale(1.1);
}
.footer-social-link svg {
    width: 28px;
    height: 28px;
}
.footer-copyright {
    color: #ffffff;
    font-size: 0.88rem;
    opacity: 0.85;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Toast Notification */
.dashboard-toast {
    position: fixed;
    bottom: 32px;
    right: 32px;
    background-color: var(--color-spse-dark);
    color: #ffffff;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.dashboard-toast.show {
    transform: translateY(0);
    opacity: 1;
}
.dashboard-toast-icon {
    color: #60a5fa;
    display: flex;
    align-items: center;
}
.dashboard-toast-icon svg {
    width: 20px;
    height: 20px;
}
.dashboard-toast-text {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Responsive Queries */
@media (max-width: 1024px) {
    .tramites-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .dashboard-info-bar {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .info-bar-item:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding-right: 0;
        padding-bottom: 24px;
    }
}
@media (max-width: 850px) {
    .dashboard-header {
        position: fixed;
        top: 16px;
        left: 16px;
        right: 16px;
        flex-direction: row; /* Logo and hamburger on the same row! */
        justify-content: space-between;
        align-items: center;
        padding: 12px 20px;
        border-radius: 16px;
        height: 72px; /* Fixed height on mobile/tablet */
    }
    .dashboard-header .logo-img {
        height: 48px; /* Tighter logo for mobile header bar */
    }
    .dashboard-header .hamburger-menu {
        display: flex; /* Make it visible on mobile/tablet */
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--color-spse-dark);
        cursor: pointer;
        padding: 8px;
        border-radius: 8px;
        transition: background-color 0.2s ease;
    }
    .dashboard-header .hamburger-menu:active {
        background-color: #f1f5f9;
    }
    .dashboard-header .hamburger-menu svg {
        width: 26px;
        height: 26px;
    }
    .dashboard-header .header-nav {
        position: absolute;
        top: calc(100% + 8px); /* Float right below the header bar */
        left: 0;
        right: 0;
        background-color: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 16px;
        box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
        padding: 20px;
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        opacity: 0;
        transform: translateY(-10px);
        pointer-events: none;
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        width: auto;
    }
    .dashboard-header .header-nav.menu-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
    .dashboard-header .nav-link {
        font-size: 0.95rem;
        padding: 14px 0;
        width: 100%;
        justify-content: center;
        border-bottom: 1px solid #f1f5f9;
    }
    .dashboard-header .nav-link:last-of-type {
        border-bottom: none; /* No border for the last text link */
    }
    .dashboard-header .btn-oficina-virtual {
        margin-top: 12px;
        padding: 12px 16px;
        font-size: 0.92rem;
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}

@media (max-width: 640px) {
    .tramites-grid {
        grid-template-columns: 1fr;
    }
    .tramite-card {
        min-height: auto;
        padding: 32px 24px;
    }
    .dashboard-footer {
        padding: 24px 20px;
    }
}
