/* Base Theme Setup */
:root {
    --primary: #e67d33;
    --secondary: #1b2b3b;
    --tertiary: #f1ede2;

    --appbar-bg: #1b2b3b;
    --appbar-text: #ffffff;

    --background: #f8f9fb;
    --surface: #ffffff;

    --drawer-bg: #ffffff;
    --drawer-text: #1b2b3b;

    --text-primary: #1b2b3b;
    --text-secondary: #555e6b;

    --action-default: #e67d33;
    --divider: #e0e0e0;
    
    
}

/* Dark Mode Overrides */
@media (prefers-color-scheme: dark) {
    :root {
        --primary: #e67d33;
        --secondary: #2a2e35;

        --appbar-bg: #1b2b3b;
        --appbar-text: #ffffff;

        --background: #1b2b3b;
        --surface: #27303a;

        --drawer-bg: #1f2730;
        --drawer-text: #f1ede2;

        --text-primary: #ffffff;
        --text-secondary: #cfcfcf;

        --action-default: #ffb676;
        --divider: #38424f;
    }
}

html, body {
    margin: 0;
    background-color: #1b2b3b;
    color: white;
    font-family: 'Segoe UI', sans-serif;
}


.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IH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uNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }
    
/* Hero Section Background */
.hero-background {
    background-image:
            linear-gradient(rgba(27, 43, 59, 0.85), rgba(27, 43, 59, 0.85)),
            url('../images/bg_bb.jpg');
    background-size: 100% auto;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    width: 100%;
    color: white;
    display: flex;
    flex-direction: column;
}

.hero-background-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 0;
    pointer-events: none;
}

.custom-background {
    position: relative;
    z-index: 1;
}


.about-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    background: linear-gradient(to bottom right, #f3f4f6, #e0e7ff);
    min-height: 100vh;
}

.profile-card {
    width: 100%;
    max-width: 500px;
    animation: fadeIn 1s ease-in-out;
}

.rounded-img {
    border-radius: 50%;
    object-fit: cover;
    margin: auto;
    margin-top: 1rem;
    width: 150px;
    height: 150px;
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-in-out;
}

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

.text-muted {
    color: #6b7280;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    width: 100%;
    max-width: 1100px;
    padding: 2rem;
}
.text-shadow-lg {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.animate-fade-in {
    animation: fadeIn 1s ease-in-out;
}

.animate-slide-in {
    animation: slideIn 1.2s ease-in-out;
}

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

.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}


.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

.logo-pulse {
    animation: pulseLogo 1.5s infinite ease-in-out;
    transform-origin: center;
}

@keyframes pulseLogo {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Optional: staggered slide delays */
.slide-delay-1 {
    transition-delay: 0.1s;
}
.slide-delay-2 {
    transition-delay: 0.2s;
}
.slide-delay-3 {
    transition-delay: 0.3s;
}
.slide-delay-4 {
    transition-delay: 0.4s; 
}
.slide-delay-5 {
    transition-delay: 0.5s; 
}

.fade-in-soft {
    opacity: 0;
    animation: fadeInSoft 0.6s ease-in-out forwards;
}

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

/* Directional animations */
.slide-from-left {
    transform: translateX(-60px);
}

.slide-from-right {
    transform: translateX(60px);
}

.animate-visible.slide-from-left,
.animate-visible.slide-from-right {
    opacity: 1;
    transform: translateX(0);
}

/* Mobile drawer styling */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background: rgba(0, 0, 0, 0.3); /* subtle dark overlay */
    backdrop-filter: blur(4px);     /* softens the background */
    z-index: 1100;
    transition: opacity 0.3s ease-in-out;
}

/* Old left drawer animation */
.animated-drawer {
    animation: slideInDrawer 0.35s ease forwards;
}

@keyframes slideInDrawer {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* New top drawer styling */
.mobile-drawer {
    position: fixed;
    top: 64px; /* Height of the AppBar */
    left: 0;
    transform: none;
    width: auto;
    min-width: 200px;
    max-width: fit-content;
    background-color: #1b2b3b;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 0 12px 12px 0;
    z-index: 1200;
    overflow: hidden;
}

/* Mobile drawer item alignment */
@media (max-width: 768px) {
    .mobile-nav-item {
        align-items: flex-start !important; /* Left align text for mobile navigation drawer */
        text-align: left !important;
    }
}

/* Top drawer animations */
.animated-drawer-top {
    animation: slideInDrawerTop 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animated-drawer-top-exit {
    animation: slideOutDrawerTop 0.35s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes slideInDrawerTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutDrawerTop {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

/* Compact mobile navigation */
.mobile-nav-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    border-radius: 8px;
    margin: 4px;
    transition: background-color 0.2s ease;
}

.mobile-nav-item:hover {
    background-color: rgba(230, 125, 51, 0.2); /* Slightly adjusted for better contrast on dark background */
}

.rounded-top {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
.carousel-wrapper {
    padding-bottom: 2rem; /* ensures space for dots */
}
@media (max-width: 768px) {
    .hero-background {
        background-size: 100% auto;
        background-attachment: scroll;
        background-position: center 80px;
    }
}
/* Overwrite the fill color of the carousel arrows */
.mud-icon-root.mud-svg-icon {
    fill: var(--primary) !important; /* Set the arrow color to your desired color */
}

/* Social media dropdown and drawer */
.social-dropdown {
    position: fixed; /* Changed from absolute to fixed */
    top: 64px; /* Positioned relative to viewport instead of parent */
    right: 16px;
    background-color: #1b2b3b;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    z-index: 1300;
    width: 200px;
    padding: 8px 0;
    max-height: 80vh; /* Limit height to prevent overflow */
    overflow-y: auto; /* Allow scrolling if too many items */
}

.social-dropdown-enter {
    animation: slideInSocialDropdown 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.social-dropdown-exit {
    animation: slideOutSocialDropdown 0.35s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

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

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

/* Social media side drawer for mobile */
.social-drawer {
    position: fixed;
    top: 64px; /* Height of the AppBar */
    right: 0;
    left: auto;
    transform: none;
    width: auto;
    min-width: 200px;
    max-width: fit-content;
    height: auto;
    max-height: 70vh;
    background-color: #1b2b3b;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 12px 0 0 12px;
    z-index: 1300; /* Increased z-index to ensure it's above other elements */
    overflow: hidden;
    overflow-y: auto; /* Allow scrolling if too many items */
}

/* Mobile-specific animations - changed from bottom to top */
@keyframes slideInSocialDrawerTop {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutSocialDrawerTop {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

.social-drawer-enter {
    animation: slideInSocialDrawerTop 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.social-drawer-exit {
    animation: slideOutSocialDrawerTop 0.35s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

.social-item {
    display: flex;
    padding: 12px 16px;
    text-decoration: none;
    align-items: center;
    justify-content: flex-start; /* Align to the left */
    transition: background-color 0.2s ease;
}

.social-item-icon {
    margin-right: 16px; /* Add right margin to create space between icon and text */
    margin-left: 0; /* Remove left margin */
}

/* Mobile-specific social drawer alignment */
@media (max-width: 768px) {
    .social-item {
        justify-content: flex-end !important; /* Force right align for mobile */
        text-align: right !important;
        flex-direction: row-reverse !important; /* Ensure icon appears on right */
    }
    
    .social-item-icon {
        margin-right: 0 !important; /* Remove right margin */
        margin-left: 16px !important; /* Add left margin to create space between text and icon */
    }
    
    .icon-container {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 24px !important; /* Fixed width for consistent alignment */
    }
    
    /* Style for fixed positioning of icons in mobile drawer */
    .fixed-icon {
        position: absolute;
        right: 16px;
        width: 24px;
        text-align: center;
    }
    
    .social-nav-item {
        position: relative;
        padding-right: 50px; /* Ensure enough space for the icon */
    }
}

@media (min-width: 769px) {
    /* Desktop specific social item styles */
    .social-item {
        justify-content: space-between !important;
        padding: 12px 16px;
        border-radius: 0;
    }
    
    .social-item:hover {
        background-color: rgba(241, 237, 226, 0.1);
    }
    
    .social-dropdown .icon-container {
        width: 24px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-right: 0 !important;
    }
    
    .social-dropdown .social-item-icon {
        margin-right: 0 !important;
    }
}

.social-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}