/* ======================
    GLOBAL STYLES
====================== */
:root {
    --primary-pink: #ec4899; /* Pink-500 */
    --light-pink: #fce7f3;   /* Pink-100 */
    --dark-text: #1f2937;    /* Gray-800 */
    --light-text: #f9fafb;   /* Gray-50 */
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #fff; /* White background as requested */
    color: var(--dark-text);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}

/* ======================
    HEADER & NAVIGATION
====================== */
header {
    background-color: var(--primary-pink);
    color: white;
    /* Mobile-first responsive styles */
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    position: sticky;
    top: 0;
    z-index: 100;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.header-content {
    text-align: center;
}

header p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Mobile navigation container */
header nav {
    display: flex;
    gap: 15px;
    align-items: center;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

nav a:hover {
    opacity: 0.8;
}

/* Style for Register/Login buttons in the header */
header nav a.btn-nav {
    background-color: rgba(255, 255, 255, 0.2); /* A subtle background to stand out on the pink header */
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9rem;
}
header nav a.btn-nav:hover {
    background-color: rgba(255, 255, 255, 0.3);
    opacity: 1; /* Override general nav a hover */
}

/* Styles for the user's profile icon in the header */
.header-profile-link {
    line-height: 0; /* Removes extra space around the image */
}
.header-profile-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

/* Desktop styles for header and navigation */
@media (min-width: 768px) {
    header {
        flex-direction: row;
        padding: 15px 20px;
        position: relative; /* For positioning the nav */
    }
    .header-content {
        flex-grow: 1;
    }
    header nav {
        position: absolute;
        top: 50%;
        right: 20px;
        transform: translateY(-50%);
        gap: 20px;
    }
}

/* ======================
    PROFILE GRID & CARDS
====================== */
.profile-grid {
    display: grid;
    gap: 1rem;
    /* Mobile: 3 columns */
    grid-template-columns: repeat(3, 1fr);
}

/* Desktop: 6 columns */
@media (min-width: 1024px) {
    .profile-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3 / 4; /* Maintain aspect ratio */
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    /* Create a stacking context to contain the overlay and fix mobile rendering bug */
    z-index: 0;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
    color: var(--light-text);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: background 0.3s;
}

.card-name {
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-details {
    font-size: 0.8rem;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ======================
    FORMS & BUTTONS
====================== */

.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
    border: none;
}

.btn-primary {
    background-color: var(--primary-pink);
    color: white;
}
.btn-primary:hover {
    background-color: #d94682; /* Darker pink */
}
.btn-block {
    display: block;
    width: 100%;
}

.form-box {
    max-width: 450px;
    margin: 50px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.form-box h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--dark-text);
}

.form-box input,
.form-box textarea,
.form-box button {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.form-box textarea {
    resize: vertical;
    min-height: 80px;
}

.form-box button {
    background-color: var(--primary-pink);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

.form-box button:hover {
    background-color: #d94682;
}

.form-box p {
    text-align: center;
    font-size: 0.9rem;
}

.form-box a {
    color: var(--primary-pink);
    font-weight: 500;
    text-decoration: none;
}

/* ======================
    WHATSAPP FLOATING BTN
====================== */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}