/**
 * ErincsTesvian Theme - Public Website Styles
 * Global styles for public-facing pages
 */

/* ============================================
   BASE & RESET
   ============================================ */
* {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

body {
    background: var(--bs-body-bg);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    min-height: auto !important;
    height: auto !important;
    display: block !important;
    flex: none !important;
}

/* ============================================
   HIDE DASHBOARD ELEMENTS
   ============================================ */
#sidebar,
#sidebar-toggler,
.sidebar-toggle {
    display: none !important;
}

#content {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    min-height: auto !important;
    height: auto !important;
    flex: none !important;
    display: block !important;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
main {
    width: 100%;
    max-width: 100%;
    padding: 0;
    min-height: auto !important;
    height: auto !important;
    flex: none !important;
    display: block !important;
}

/* ============================================
   SECTION STYLING
   ============================================ */
.cms-section {
    width: 100%;
    padding: 3rem 0;
    margin: 0;
}

.section-hero {
    padding: 4rem 0;
}

.theme-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.page-section {
    padding: 3rem 0;
    width: 100%;
}

.page-section:first-child {
    padding-top: 4rem;
}

.content-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.container-public {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--bs-heading-color, var(--bs-body-color));
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* ============================================
   HEADER STYLES
   ============================================ */
.public-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .public-header {
    background: rgba(31, 41, 55, 0.95);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.public-header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.public-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

/* Logo */
.public-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.public-logo:hover {
    transform: translateY(-2px);
}

.public-logo svg {
    width: 2rem;
    height: 2rem;
    transition: transform 0.3s ease;
}

.public-logo-image {
    width: auto !important;
    height: 2rem !important; /* 32px */
    max-width: 90px !important;
    max-height: 2rem !important;
    min-height: auto !important;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
}

.public-logo:hover svg,
.public-logo:hover .public-logo-image {
    transform: rotate(5deg);
}

.public-logo svg circle {
    fill: var(--bs-primary);
}

.public-logo svg rect {
    fill: currentColor;
}

.public-logo-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--bs-body-color);
    letter-spacing: -0.02em;
}

/* Navigation Links */
.public-nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.public-nav-links li {
    margin: 0;
}

.public-nav-links a {
    display: inline-block;
    text-decoration: none;
    color: var(--bs-body-color);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
}

.public-nav-links a:hover {
    color: var(--bs-primary);
    background: rgba(59, 130, 246, 0.1);
}

.public-nav-links a.active {
    color: var(--bs-primary);
    font-weight: 600;
}

/* Action Buttons */
.public-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Theme Switcher */
#theme-switcher {
    border: none;
    background: transparent;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#theme-switcher:hover {
    background: var(--bs-secondary-bg);
}

#theme-switcher i {
    font-size: 1.25rem;
    color: var(--bs-body-color);
}

.dropdown-menu {
    min-width: 12rem;
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border-radius: 0.75rem;
    padding: 0.5rem;
    margin-top: 0.5rem;
}

[data-bs-theme="dark"] .dropdown-menu {
    background: rgba(31, 41, 55, 0.98);
    backdrop-filter: blur(10px);
}

.dropdown-item {
    cursor: pointer;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.dropdown-item:hover {
    background: var(--bs-secondary-bg);
}

.dropdown-item:active {
    background-color: var(--bs-primary);
    color: var(--bs-white);
}

.dropdown-item i.ph-check {
    color: var(--bs-success);
    font-weight: bold;
}

/* ============================================
   BUTTONS - Material UI Style
   ============================================ */
.btn {
    position: relative;
    overflow: hidden;
    font-weight: 500;
    letter-spacing: 0.02857em;
    text-transform: uppercase;
    font-size: 0.875rem;
    line-height: 1.75;
    padding: 0.5rem 1.5rem;
    border-radius: 0.25rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    user-select: none;
}

/* Contained (Primary) Button */
.btn-primary {
    background: var(--bs-primary);
    color: #ffffff;
    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2),
                0 2px 2px 0 rgba(0, 0, 0, 0.14),
                0 1px 5px 0 rgba(0, 0, 0, 0.12);
}

.btn-primary:hover {
    background: #2563eb;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2),
                0 4px 5px 0 rgba(0, 0, 0, 0.14),
                0 1px 10px 0 rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.btn-primary:active {
    box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
                0 8px 10px 1px rgba(0, 0, 0, 0.14),
                0 3px 14px 2px rgba(0, 0, 0, 0.12);
    transform: translateY(0);
}

/* Outlined Button */
.btn-outline-primary {
    background: transparent;
    color: var(--bs-primary);
    border: 1px solid rgba(59, 130, 246, 0.5);
    box-shadow: none;
}

.btn-outline-primary:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    box-shadow: none;
}

.btn-outline-primary:active {
    background: rgba(59, 130, 246, 0.16);
}

/* Text Button */
.btn-text {
    background: transparent;
    color: var(--bs-primary);
    box-shadow: none;
    padding: 0.5rem 1rem;
}

.btn-text:hover {
    background: rgba(59, 130, 246, 0.08);
}

.btn-text:active {
    background: rgba(59, 130, 246, 0.16);
}

/* Secondary Button */
.btn-secondary {
    background: #6c757d;
    color: #ffffff;
    box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2),
                0 2px 2px 0 rgba(0, 0, 0, 0.14),
                0 1px 5px 0 rgba(0, 0, 0, 0.12);
}

.btn-secondary:hover {
    background: #5a6268;
    box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.2),
                0 4px 5px 0 rgba(0, 0, 0, 0.14),
                0 1px 10px 0 rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

/* Button Sizes */
.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.625rem 2rem;
    font-size: 0.9375rem;
}

/* Icon Buttons */
.btn-icon {
    padding: 0.5rem;
    min-width: 40px;
    border-radius: 50%;
}

/* Disabled State */
.btn:disabled,
.btn.disabled {
    opacity: 0.38;
    cursor: not-allowed;
    pointer-events: none;
}

/* Ripple Effect (pseudo-element) */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
    opacity: 0;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border: 1px solid var(--bs-border-color);
    border-radius: 1rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.card-body {
    padding: 2rem;
}

/* ============================================
   FOOTER STYLES
   ============================================ */
.public-footer {
    background: linear-gradient(180deg, var(--bs-body-bg) 0%, var(--bs-secondary-bg) 100%);
    padding: 3rem 0 2rem;
    margin-top: 3rem;
    border-top: 1px solid var(--bs-border-color);
    width: 100%;
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    flex: none !important;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.footer-content .row {
    margin: 0 !important;
    width: 100% !important;
}

.footer-content .row > * {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-brand svg {
    width: 1.5rem;
    height: 1.5rem;
}

.footer-logo-image {
    width: auto !important;
    height: 1.5rem !important; /* 24px */
    max-width: 70px !important;
    max-height: 1.5rem !important;
    min-height: auto !important;
    object-fit: contain;
    display: block;
}

.footer-brand-text {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--bs-body-color);
}

.footer-description {
    color: var(--bs-secondary-color);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.footer-section-title {
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-body-color);
    margin-bottom: 1.25rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--bs-secondary-color);
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--bs-primary);
    transform: translateX(4px);
}

.footer-bottom {
    border-top: 1px solid var(--bs-border-color);
    padding-top: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    color: var(--bs-secondary-color);
    font-size: 0.875rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: var(--bs-secondary-bg);
    color: var(--bs-body-color);
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--bs-primary);
    color: white;
    transform: translateY(-3px);
}

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

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

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .public-nav {
        padding: 0.75rem 1rem;
    }

    .public-logo svg,
    .public-logo-image {
        width: auto !important;
        height: 1.75rem !important; /* 28px on mobile */
        max-width: 80px !important;
        max-height: 1.75rem !important;
    }

    .public-logo-text {
        font-size: 1.25rem;
    }

    .public-nav-links {
        display: none;
    }

    .footer-logo-image {
        height: 1.25rem !important; /* 20px on mobile */
        max-width: 60px !important;
        max-height: 1.25rem !important;
    }

    .public-footer {
        padding: 2rem 0 1.5rem;
        margin-top: 2rem;
    }

    .cms-section {
        padding: 2rem 0;
    }

    .section-hero {
        padding: 3rem 0;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }

    .page-section {
        padding: 2rem 0;
    }

    .page-section:first-child {
        padding-top: 3rem;
    }

    .container-public,
    .content-wrapper,
    .theme-container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .public-nav {
        padding: 1rem;
    }

    .container-public,
    .content-wrapper,
    .theme-container {
        padding: 0 2rem;
    }
}
