/* --------------------------------------------------
   1) CSS Variables
   - Reusable variables for brand colors, fonts, spacing, etc.
   -------------------------------------------------- */
:root {
    --primary-color: #004438; /* Dark green for primary elements */
    --secondary-color: #396a60; /* Lighter green for accents */
    --text-color: #004438; /* Same as primary for text consistency */
    --text-color-values: "#4a4a49"; /* text color for card values*/
    --button-bg-color: #004438; /* Button background color */
    --button-hover-color: #00362e; /* Darker shade for hover effect */
    --button-text-color: #fff; /* High contrast text on buttons */
    --link-color: #004438; /* Distinct purple for links */
    --link-hover-color: #b7cfb4; /* Slightly darker purple on hover */
    /* If you plan to use a gradient, uncomment in your layout section */
    --background-gradient: linear-gradient(135deg, #004438, #396a60, #698e87, #9cb6af, #cfdad8);
    --box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Subtle shadow for depth */
    --font-size-small: 14px;
    --font-size-medium: 15px;
    --font-size-large: 24px;
}

/* --------------------------------------------------
   2) Utility Classes
   - Common margin, alignment, and layout helpers.
   -------------------------------------------------- */
.mb-4 {
    margin-bottom: 4px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-12 {
    margin-bottom: 12px;
}

.text-center {
    text-align: center;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.center {
    align-items: center;
    justify-content: center;
}

/* --------------------------------------------------
   3) Base Reset & Layout
   - Normalize and set base styles for html, body.
   -------------------------------------------------- */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100vh;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    overflow-x: hidden;
    /* Toggle the background gradient if desired: */
    /* background: var(--background-gradient); */
    background: #fff;
    background-size: cover;
    background-attachment: fixed;
}

.wrapper {
    min-height: calc(100vh - 50px);
    display: flex; /* Center child elements */
    align-items: center;
    justify-content: center;
    padding: 10px; /* Prevent content from touching edges */
}

/* --------------------------------------------------
   4) Profile Card
   - Main container for the card elements.
   -------------------------------------------------- */
.profile-card {
    width: 100%;
    max-width: 340px;
    background-color: #fff;
    box-shadow: var(--box-shadow);
    border-radius: 10px;
    padding: 0 16px;
    text-align: left;
    /* Flex layout to stack child elements vertically */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin: 0;
}

/* --------------------------------------------------
   5) Logos
   - Top and bottom logo styling for scaling & layout.
   -------------------------------------------------- */
.top-logo,
.bottom-logo {
    display: block;
    height: auto; /* Maintain natural aspect ratio */
    /* aspect-ratio: auto;  <-- default; can be removed */
}

/* Removed old commented code for .top-logo to keep clean */

.top-logo {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Keep image from distorting */
}

.top-logo-container {
    width: 75%;
    max-width: 450px;
    margin: 0 auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.bottom-logo-default {
    width: 70%;
    min-width: 180px;
    max-width: 340px;
    margin: 0 auto; /* Center horizontally */
}
.bottom-logo-brands {
    width: 100%; 
    max-width: 100%;
    margin: 0 auto; /* Center horizontally */
}

/* --------------------------------------------------
   6) Text Styles
   - Name, Title, Contact Info, Address, etc.
   -------------------------------------------------- */
.name {
    font-size: var(--font-size-large);
    font-weight: bold;
    color: var(--text-color);
}

.title {
    font-size: var(--font-size-medium);
    font-weight: normal;
    color: var(--text-color);
    /*margin-bottom: var(--font-size-small);*/
}

.contact-info {
    font-size: var(--font-size-small);
    color: var(--text-color);
    margin-bottom: var(--font-size-medium);
    line-height: 1.4;
}

    .contact-info a {
        color: var(--link-color);
        text-decoration: none;
    }

        .contact-info a:hover {
            color: var(--link-hover-color);
            text-decoration: underline;
        }

.address {
    font-size: var(--font-size-small);
    color: var(--text-color);
    line-height: 1.4;
    margin-bottom: var(--font-size-small);
}
.value-color {
    color: var(--text-color-values);
}

/* --------------------------------------------------
   7) Address + QR Section
   - Use CSS Grid for columns, plus Flex for vertical alignment.
   -------------------------------------------------- */
.address-wrapper {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch; /* Ensure both columns match height */
    column-gap: 1rem; /* Gap between address column & QR column */
}

.address-and-button {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Address at top, button at bottom */
}

.qr-code-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Bottom align the QR code */
    align-items: flex-end; /* Right-align if needed */
}

.qr-code {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

/* --------------------------------------------------
   8) Button
   - "Save Contact" button with hover effects
   -------------------------------------------------- */
.download-button {
    display: inline-block;
    padding: 10px 20px;
    background: var(--button-bg-color);
    color: var(--button-text-color);
    text-decoration: none;
    border: none;
    border-radius: 5px;
    font-size: var(--font-size-small);
    font-weight: bold;
    box-shadow: var(--box-shadow);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    margin-top: var(--font-size-small);
    max-width: 135px;
    text-align: center;
}

    .download-button:hover {
        background: var(--button-hover-color);
        transform: translateY(-2px);
        box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2);
    }

/* --------------------------------------------------
   9) Responsive Styles
   - Adjust layout for different screen sizes
   -------------------------------------------------- */
@media screen and (max-width: 768px) {
    /* On small screens, reduce padding and remove heavy styling */
    html, body {
        background: #fff;
    }

    .wrapper {
        padding: 0;
    }

    .profile-card {
        box-shadow: none;
        border: none;
    }

    /* Hide the QR code entirely on small screens (optional) */
    .qr-code {
        display: none;
    }
}

@media screen and (min-width: 769px) {
    /* Desktop-specific styles: show QR code again */
    .qr-code {
        display: block;
    }
}
