/* Global Styles */
:root {
    --primary-color: #ff512f;
    --secondary-color: #dd2476;
    --accent-color: #fff;
    --text-color: #333;
    --bg-color: #f8f9fa;
    --alive-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
}

main {
    flex: 1;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

/* Custom Buttons */
.btn-alive {
    background: var(--alive-gradient);
    border: none;
    color: white;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 50px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-alive:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(221, 36, 118, 0.4);
    color: white;
}

.btn-outline-alive {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.2s;
}

.btn-outline-alive:hover {
    background: var(--alive-gradient);
    color: white;
    border-color: transparent;
}

/* Header & Footer */
.site-header,
.site-footer {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-title {
    background: var(--alive-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.site-footer {
    background: #333;
    color: white;
    padding: 2rem 0;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.site-footer a:hover {
    color: white;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Card Styles */
.card-alive {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-alive-header {
    background: var(--alive-gradient);
    color: white;
    padding: 1.5rem;
    border-bottom: none;
}

/* Responsive Backgrounds for Auth Pages */
.auth-page-body {
    background: url('../img/riad-grafiti-sc.png') no-repeat center center fixed;
    background-size: cover;
}

.auth-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    margin-top: 5vh;
    margin-bottom: 5vh;
}

.whatsapp-qr-box {
    position: fixed;
    right: 25px;
    z-index: 9999;
    text-decoration: none;
}

.qr-inner {
    background: #ffffff;
    border-radius: 18px;
    padding: 16px 16px 12px 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    max-width: 200px;
}

.qr-inner:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
}

.qr-inner img {
    width: 100%;
    border-radius: 12px;
}

.qr-text {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin-top: 10px;
    color: #e86c2f;
    line-height: 1.4;
}

/* =========================
   Mobile Adjustments
========================= */
@media (max-width: 768px) {
    /* QR box 50% smaller, bottom-left */
    .whatsapp-qr-box {
        right: auto;
        left: 15px;
        bottom: 20px; /* JS will adjust with footer height */
        max-width: 100px; /* 50% of desktop (~200px) */
    }

    .qr-inner {
        padding: 8px 8px 6px 8px;
    }

    .qr-inner img {
        width: 100%;
        border-radius: 10px;
    }

    .qr-text {
        font-size: 10px;
        margin-top: 5px;
    }

    /* Hero section adjustments */
    .hero-section {
        height: 100vh;
        min-height: 400px;
        padding: 0 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .btn-alive {
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    /* Push footer down to avoid overlap with QR and buttons */
    .site-footer {
        margin-top: 120px; /* adjust if needed */
    }
}

/* Extra small devices (<480px) */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.5rem;
    }
    .hero-content p {
        font-size: 0.9rem;
    }
    .btn-alive {
        font-size: 0.85rem;
        padding: 6px 14px;
    }
    .qr-text {
        font-size: 9px;
    }
}

/* ===============================
   Responsive Navbar Adjustments
=============================== */

/* Allow brand to wrap on small screens */
.navbar-brand.header-title {
    white-space: normal; /* allows wrapping */
    line-height: 1.2;   /* tighter line spacing */
}

/* Prevent navbar-collapse from moving under the brand */
.navbar .container {
    display: flex;
    flex-wrap: nowrap;      /* prevent wrapping */
    align-items: center;    /* vertical alignment */
    justify-content: space-between; /* brand left, toggler/right */
}

/* Ensure toggler and menu stay right on small screens */
.navbar-collapse {
    flex-grow: 0;           /* do not take full width */
}

/* Optional: reduce brand font-size slightly on very small screens */
@media (max-width: 480px) {
    .navbar-brand.header-title {
        font-size: 1.2rem;
    }
}

.navbar-nav .nav-link.fw-bold.text-dark {
    display: inline-block;
    padding: 6px 16px;        /* comfortable button padding */
    border: 2px solid black;  /* black border */
    border-radius: 12px;      /* rounded corners */
    text-align: center;
    color: black !important;  /* force text black */
    font-weight: 600;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link.fw-bold.text-dark:hover {
    background-color: black;
    color: white !important;  /* text turns white on hover */
    text-decoration: none;
}