/* --- Base & Root Variables --- */
:root {
    --font-primary: 'Inter', sans-serif;

    /* Dark Theme (Default) */
    --bg-dark-primary: #0D1117; /* GitHub Dark Dimmed bg */
    --bg-dark-secondary: #161B22; /* GitHub Dark Dimmed borders, cards */
    --bg-dark-tertiary: #21262D; /* GitHub Dark Dimmed lighter cards, inputs */
    --text-dark-primary: #C9D1D9; /* Main text */
    --text-dark-secondary: #8B949E; /* Softer text, placeholders */
    --border-dark: #30363D;

    /* Light Theme */
    --bg-light-primary: #F7F8FA;
    --bg-light-secondary: #FFFFFF;
    --bg-light-tertiary: #F1F3F6;
    --text-light-primary: #1F2328;
    --text-light-secondary: #57606A;
    --border-light: #D0D7DE;

    /* Accent Colors (Futuristic Vibe) */
    --accent-blue: #388BFD; /* Bright Blue */
    --accent-green: #2DA44E; /* Bright Green */
    --accent-red: #F85149;   /* Bright Red */
    --accent-purple: #A371F7; /* Tech Purple */
    --accent-cyan: #22B0FO;   /* Tech Cyan */


    /* Card Specific Dimensions */
    --card-width: 85.6mm;
    --card-height: 54.0mm;

    /* UI Elements */
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-inset: inset 0 2px 4px 0 rgba(0,0,0,0.06);
    
    /* Transition */
    --transition-fast: all 0.15s ease-in-out;
    --transition-std: all 0.3s ease-in-out;
}

/* --- Global Styles & Dark Mode Setup --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px; /* Base font size */
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: var(--transition-std);
}

body.dark-mode {
    background-color: var(--bg-dark-primary);
    color: var(--text-dark-primary);
}

body.light-mode {
    background-color: var(--bg-light-primary);
    color: var(--text-light-primary);
}

.container {
    width: 90%;
    max-width: 1300px; /* Wider for dashboard feel */
    margin: 0 auto;
    padding: 20px 0;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 0.5em;
}

a {
    text-decoration: none;
    transition: var(--transition-fast);
}
body.dark-mode a { color: var(--accent-blue); }
body.light-mode a { color: var(--accent-blue); } /* Can adjust light mode link color if needed */
body.dark-mode a:hover { color: var(--accent-cyan); }
body.light-mode a:hover { color: #1c67c9; }


/* --- Header --- */
header {
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-std);
}
body.dark-mode header {
    background-color: rgba(13, 17, 23, 0.85); /* Dark bg with slight transparency */
    border-bottom: 1px solid var(--border-dark);
    backdrop-filter: blur(10px);
}
body.light-mode header {
    background-color: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid var(--border-light);
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area { display: flex; align-items: center; }
#header-logo { height: 40px; margin-right: 12px; }
.logo-area h1 {
    font-size: 1.6em;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}
body.dark-mode .logo-area h1 { color: var(--text-dark-primary); }
body.light-mode .logo-area h1 { color: var(--text-light-primary); }
.logo-accent { color: var(--accent-blue); }


nav ul { list-style: none; display: flex; gap: 10px; }
nav ul li a {
    padding: 8px 16px;
    font-weight: 500;
    border-radius: var(--border-radius-md);
    transition: var(--transition-std);
}
body.dark-mode nav ul li a { color: var(--text-dark-secondary); }
body.light-mode nav ul li a { color: var(--text-light-secondary); }

body.dark-mode nav ul li a:hover,
body.dark-mode nav ul li a.active {
    background-color: var(--bg-dark-tertiary);
    color: var(--text-dark-primary);
}
body.light-mode nav ul li a:hover,
body.light-mode nav ul li a.active {
    background-color: var(--bg-light-tertiary);
    color: var(--text-light-primary);
}

.header-right { display: flex; align-items: center; gap: 20px; }
.social-icons { display: flex; gap: 15px; }
.social-icons a { font-size: 1.3em; }
body.dark-mode .social-icons a { color: var(--text-dark-secondary); }
body.light-mode .social-icons a { color: var(--text-light-secondary); }
body.dark-mode .social-icons a:hover { color: var(--accent-cyan); }
body.light-mode .social-icons a:hover { color: var(--accent-blue); }

#darkModeToggle {
    background: transparent;
    border: 1px solid transparent;
    padding: 8px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    font-size: 1.2em;
    line-height: 1;
    transition: var(--transition-std);
}
body.dark-mode #darkModeToggle { color: var(--text-dark-secondary); border-color: var(--border-dark); }
body.light-mode #darkModeToggle { color: var(--text-light-secondary); border-color: var(--border-light); }
body.dark-mode #darkModeToggle:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); background-color: var(--bg-dark-tertiary); }
body.light-mode #darkModeToggle:hover { color: var(--accent-blue); border-color: var(--accent-blue); background-color: var(--bg-light-tertiary); }

/* Sun/Moon icons for toggle */
#darkModeToggle .fa-sun { display: none; }
#darkModeToggle .fa-moon { display: inline-block; }
body.light-mode #darkModeToggle .fa-sun { display: inline-block; }
body.light-mode #darkModeToggle .fa-moon { display: none; }

/* --- Main Content & Sections --- */
main section {
    padding: 60px 0;
    text-align: left; /* Dashboard elements often left-aligned */
}
.section-header {
    margin-bottom: 40px;
    text-align: center; /* Center section headers */
}
.section-header h2 {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.section-header h2 i {
    color: var(--accent-blue); /* Or other accents */
}
.section-header p {
    font-size: 1.1em;
    max-width: 700px;
    margin: 0 auto;
}
body.dark-mode .section-header p { color: var(--text-dark-secondary); }
body.light-mode .section-header p { color: var(--text-light-secondary); }

/* --- Card Generator Section --- */
.insurance-options {
    display: grid; /* Use grid for more control */
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.insurance-dropdown {
    border-radius: var(--border-radius-lg);
    overflow: hidden; /* For rounded corners on summary */
    transition: var(--transition-std);
}
body.dark-mode .insurance-dropdown {
    background-color: var(--bg-dark-secondary);
    border: 1px solid var(--border-dark);
    box-shadow: var(--shadow-md);
}
body.light-mode .insurance-dropdown {
    background-color: var(--bg-light-secondary);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
}

.insurance-dropdown summary {
    padding: 18px 25px;
    font-weight: 600;
    font-size: 1.1em;
    cursor: pointer;
    list-style: none; /* Remove default marker */
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition-std);
}
.insurance-dropdown summary i { margin-right: 10px; } /* Icon before title */
.insurance-dropdown summary::-webkit-details-marker { display: none; }
.insurance-dropdown summary::marker { display: none; }

.dropdown-arrow { transition: transform 0.2s ease-in-out; }
.insurance-dropdown[open] > summary .dropdown-arrow { transform: rotate(180deg); }

body.dark-mode .insurance-dropdown summary {
    color: var(--text-dark-primary);
    border-bottom: 1px solid var(--border-dark);
}
body.light-mode .insurance-dropdown summary {
    color: var(--text-light-primary);
    border-bottom: 1px solid var(--border-light);
}

.insurance-dropdown[open] > summary {
    /* Optional: Change background when open */
}
body.dark-mode .insurance-dropdown[open] > summary { background-color: var(--bg-dark-tertiary); }
body.light-mode .insurance-dropdown[open] > summary { background-color: var(--bg-light-tertiary); }

/* Specific summary colors based on card type */
.insurance-dropdown:nth-of-type(1) summary i { color: var(--accent-blue); } /* Health */
.insurance-dropdown:nth-of-type(2) summary i { color: var(--accent-green); } /* Pet */
.insurance-dropdown:nth-of-type(3) summary i { color: var(--accent-red); } /* Life */


.insurance-form {
    padding: 25px;
    border-top: none; /* Summary has bottom border */
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two columns */
    gap: 20px;
    margin-bottom: 25px;
}
.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: 1 / -1; } /* Span full width */

.insurance-form label {
    font-weight: 500;
    font-size: 0.9em;
    margin-bottom: 8px;
}
body.dark-mode .insurance-form label { color: var(--text-dark-secondary); }
body.light-mode .insurance-form label { color: var(--text-light-secondary); }

.insurance-form input[type="text"],
.insurance-form input[type="number"],
.insurance-form input[type="date"],
.insurance-form input[type="file"],
.insurance-form textarea {
    width: 100%;
    padding: 12px 15px;
    border-radius: var(--border-radius-md);
    font-family: var(--font-primary);
    font-size: 1em;
    transition: var(--transition-std);
}
body.dark-mode .insurance-form input,
body.dark-mode .insurance-form textarea {
    background-color: var(--bg-dark-tertiary);
    color: var(--text-dark-primary);
    border: 1px solid var(--border-dark);
}
body.light-mode .insurance-form input,
body.light-mode .insurance-form textarea {
    background-color: var(--bg-light-tertiary);
    color: var(--text-light-primary);
    border: 1px solid var(--border-light);
}

body.dark-mode .insurance-form input:focus,
body.dark-mode .insurance-form textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(var(--accent-blue-rgb, 56, 139, 253), 0.3); /* Create --accent-blue-rgb if needed */
    outline: none;
}
body.light-mode .insurance-form input:focus,
body.light-mode .insurance-form textarea:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(var(--accent-blue-rgb, 56, 139, 253), 0.3);
    outline: none;
}

.insurance-form input[type="file"] {
    padding: 8px; /* Adjust padding for file input */
}
body.dark-mode .insurance-form input[type="file"]::file-selector-button {
    background-color: var(--accent-blue);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    margin-right: 10px;
    transition: var(--transition-fast);
}
body.light-mode .insurance-form input[type="file"]::file-selector-button {
    background-color: var(--accent-blue);
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    margin-right: 10px;
    transition: var(--transition-fast);
}
body.dark-mode .insurance-form input[type="file"]::file-selector-button:hover { background-color: #2c7de9; }
body.light-mode .insurance-form input[type="file"]::file-selector-button:hover { background-color: #2c7de9; }

.insurance-form textarea {
    resize: vertical;
    min-height: 80px;
}

.insurance-form button {
    padding: 12px 25px;
    font-weight: 600;
    font-size: 1em;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-std);
    display: inline-flex; /* For icon alignment */
    align-items: center;
    gap: 8px;
    width: 100%; /* Full width button */
    justify-content: center;
    margin-top: 10px;
}
/* Button colors per type */
#healthInsuranceForm button { background-image: linear-gradient(to right, var(--accent-blue), #2970c7); color: white; }
#petInsuranceForm button   { background-image: linear-gradient(to right, var(--accent-green), #1e7e38); color: white; }
#lifeInsuranceForm button  { background-image: linear-gradient(to right, var(--accent-red), #c93c37); color: white; }

.insurance-form button:hover {
    opacity: 0.9;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* --- Card Output Area --- */
#cardOutputArea {
    margin-top: 50px;
    padding: 30px;
    border-radius: var(--border-radius-lg);
    text-align: center;
}
body.dark-mode #cardOutputArea {
    background-color: var(--bg-dark-secondary);
    border: 1px solid var(--border-dark);
}
body.light-mode #cardOutputArea {
    background-color: var(--bg-light-secondary);
    border: 1px solid var(--border-light);
}
#cardOutputArea h3 {
    font-size: 1.5em;
    margin-bottom: 25px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
}
#cardOutputArea h3 i { color: var(--accent-purple); }

#cardPreviewContainer {
    display: inline-block; /* To center the card */
    position: relative;
    margin-bottom: 25px;
}

/* --- Insurance Card Styling (Futuristic) --- */
.insurance-card {
    width: var(--card-width);
    height: var(--card-height);
    border-radius: 10px; /* Standard card radius */
    padding: 2mm 3mm; /* Approx values */
    margin: 0 auto; /* Centered */
    box-shadow: 0 5px 15px rgba(0,0,0,0.2), 0 0 0 1px rgba(255,255,255,0.05); /* Subtle edge highlight */
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    background-size: cover;
    background-position: center;
    font-family: 'Inter', sans-serif; /* Or a more specific monospace/tech font */
    font-size: 0.18cm; /* Base font for card */
    transform-style: preserve-3d; /* For potential 3D effects */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.insurance-card:hover {
    /* transform: scale(1.02) perspective(1000px) rotateY(1deg); */ /* Subtle hover effect */
    /* box-shadow: 0 10px 25px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1); */
}

.card-overlay { /* For subtle gradients or patterns on top of bg image */
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* Example: linear-gradient(rgba(0,0,0,0.1), rgba(0,0,0,0.3)); */
    z-index: 1;
}

.card-image {
    width: 22mm;
    height: 22mm;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 2.5mm;
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.card-info {
    flex-grow: 1;
    z-index: 2;
    color: #E0E0E0; /* Light text for dark cards */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribute content vertically */
    height: 100%;
}

.card-name {
    font-size: 0.35cm;
    font-weight: 600;
    margin: 50px 0 0.05cm 0;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.card-ca-label {
    margin-top: 10px;
    font-size: 0.28cm;
    font-weight: 500;
    color: rgba(224, 224, 224, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.05cm;
}
.card-ca {
font-family: 'Courier New', Courier, monospace;
    font-size: 0.18cm;
    margin: 0 0 0.2cm 0;
    max-height: 1.2cm;
    overflow: hidden;
    word-break: break-all;
    line-height: 1.2;
    color: rgba(224, 224, 224, 0.85);
}

.card-details-grid {
    display: grid;
    grid-template-columns: auto auto; /* Two columns for details */
    gap: 0.05cm 0.5cm; /* Row gap, Column gap */
    font-size: 0.17cm;
    margin-top: auto; /* Push to bottom */
}
.card-age, .card-issued, .card-expiry {
    margin: 0;
    font-weight: 500;
}
.card-details-grid span {
    font-weight: 400;
    color: rgba(224, 224, 224, 0.9);
}

.card-type-label {
    position: absolute;
    top: 1.5mm;
    right: 3mm;
    font-size: 0.2cm;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    z-index: 2;
    text-shadow: 0 1px 1px rgba(0,0,0,0.3);
}

.card-watermark {
    position: absolute;
    bottom: 1.5mm;
    right: 3mm;
    font-size: 0.15cm;
    font-weight: 500;
    opacity: 0.5;
    color: rgba(255,255,255,0.5);
    z-index: 2;
}

/* Specific Card Templates - YOU WILL REPLACE BACKGROUNDS HERE */
/* Default dark background for cards if no image is set */
.insurance-card {
    background-color: #2a3038; /* Dark gray base */
}

.health-card-template {
    background-image: url('images/health-card-bg.png'), linear-gradient(135deg, var(--accent-blue), #1c4a8c);
    /* Fallback gradient if image fails */
}
.health-card-template .card-name,
.health-card-template .card-type-label { color: #D1E7FF; } /* Lighter blue text */

.pet-card-template {
    background-image: url('images/pet-card-bg.png'), linear-gradient(135deg, var(--accent-green), #17622d);
}
.pet-card-template .card-name,
.pet-card-template .card-type-label { color: #D4F0DB; } /* Lighter green text */

.life-card-template {
    background-image: url('images/life-card-bg.png'), linear-gradient(135deg, var(--accent-red), #a82c26);
}
.life-card-template .card-name,
.life-card-template .card-type-label { color: #FADBD8; } /* Lighter red text */

#printCardButton {
    padding: 12px 25px;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-std);
    background-image: linear-gradient(to right, var(--accent-purple), #764abc);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
#printCardButton:hover {
    opacity: 0.9;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* --- Company Promo & About Section --- */
#company-promo { text-align: center; }
#promo-logo {
    width: 180px;
    height: auto;
    margin-bottom: 25px;
    filter: drop-shadow(0 0 15px rgba(var(--accent-blue-rgb, 56, 139, 253), 0.3)); /* Glow effect */
}
#company-promo h2 { font-size: 2.4em; font-weight: 700; margin-bottom: 15px;  }
body.dark-mode #company-promo h2 {
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
body.light-mode #company-promo h2 { color: var(--text-light-primary); }

#company-promo p {
    font-size: 1.2em;
    max-width: 750px;
    margin: 0 auto 20px auto;
    line-height: 1.7;
}
body.dark-mode #company-promo p { color: var(--text-dark-secondary); }
body.light-mode #company-promo p { color: var(--text-light-secondary); }

#about-company .about-content {
    text-align: center;
    max-width: 850px;
    margin: 0 auto;
}
#about-company p {
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 20px;
}
body.dark-mode #about-company p { color: var(--text-dark-secondary); }
body.light-mode #about-company p { color: var(--text-light-secondary); }

/* --- Footer --- */
footer {
    padding: 30px 0;
    text-align: center;
    font-size: 0.9em;
}
body.dark-mode footer {
    background-color: var(--bg-dark-primary); /* Match body for seamless feel */
    border-top: 1px solid var(--border-dark);
    color: var(--text-dark-secondary);
}
body.light-mode footer {
    background-color: var(--bg-light-primary);
    border-top: 1px solid var(--border-light);
    color: var(--text-light-secondary);
}
footer p { margin-bottom: 5px; }
footer a {
    margin: 0 8px;
    font-weight: 500;
}
body.dark-mode footer a { color: var(--text-dark-secondary); }
body.light-mode footer a { color: var(--text-light-secondary); }
body.dark-mode footer a:hover { color: var(--accent-blue); }
body.light-mode footer a:hover { color: var(--accent-blue); }

/* --- Print Styles --- */
@media print {
    body {
        background-color: white !important; /* Ensure white background for printing */
        color: black !important;
    }
    body * {
        visibility: hidden;
        background-color: transparent !important;
        box-shadow: none !important;
        text-shadow: none !important;
        color: black !important;
    }
    #cardPreviewContainer, #cardPreviewContainer *,
    #cardPreview, #cardPreview * {
        visibility: visible;
    }
    #cardPreview {
        position: absolute;
        left: 0;
        top: 0;
        width: var(--card-width) !important;
        height: var(--card-height) !important;
        margin: 0 !important;
        border: 1px solid #666 !important; /* Light border for print cut lines */
        box-shadow: none !important;
        page-break-after: always;
        border-radius: 10px !important; /* Ensure radius prints */
        overflow: hidden !important;
    }
    .card-image { border: 1px solid #ccc !important; }
    .card-overlay, .card-watermark { display: none !important; } /* Hide overlays for cleaner print */

    /* Adjust font sizes for print legibility on small card */
    .insurance-card { font-size: 6pt !important; }
    .card-name { font-size: 10pt !important; color: #000 !important; }
    .card-ca-label { font-size: 5pt !important; color: #333 !important; }
    .card-ca { font-size: 5.5pt !important; color: #111 !important; }
    .card-details-grid { font-size: 5.5pt !important; color: #000 !important; }
    .card-details-grid span { color: #222 !important; }
    .card-type-label { font-size: 6pt !important; color: #000 !important; }

    /* Specific template text colors for print (if background makes default black hard to read) */
    .health-card-template .card-name,
    .health-card-template .card-type-label { color: #003366 !important; } /* Dark blue on light bg */
    .pet-card-template .card-name,
    .pet-card-template .card-type-label { color: #004d00 !important; } /* Dark green */
    .life-card-template .card-name,
    .life-card-template .card-type-label { color: #660000 !important; } /* Dark red */

    /* Ensure background images print if you want them to (browser settings dependent) */
    /* This is often tricky and might require users to enable "Print background graphics" */
    .health-card-template { background-image: url('images/health-card-bg.png') !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .pet-card-template { background-image: url('images/pet-card-bg.png') !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .life-card-template { background-image: url('images/life-card-bg.png') !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .insurance-card { background-color: white !important; } /* Fallback if images don't print */
}

/* --- Responsive Adjustments --- */
@media (max-width: 1024px) {
    .insurance-options {
        grid-template-columns: 1fr; /* Stack on smaller screens */
    }
    .form-grid {
        grid-template-columns: 1fr; /* Stack form fields */
    }
    .form-group.full-width { /* No change needed, already full */ }
}

@media (max-width: 768px) {
    html { font-size: 15px; }
    .header-content { flex-direction: column; gap: 15px; }
    nav ul { flex-wrap: wrap; justify-content: center; }
    .logo-area h1 { font-size: 1.4em; }
    #header-logo { height: 35px; }
    .section-header h2 { font-size: 1.8em; }
    .section-header p { font-size: 1em; }
    #company-promo h2 { font-size: 2em; }
    #company-promo p { font-size: 1.1em; }

    .insurance-card { /* Scale down card for preview on small screens */
        transform: scale(0.85);
        margin: 0 auto 15px auto;
    }
    #cardPreviewContainer { /* Adjust container if card is scaled */
        min-height: calc(var(--card-height) * 0.85 + 20px);
    }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    .container { width: 95%; }
    nav ul li a { padding: 6px 10px; font-size: 0.9em; }
    .header-right { gap: 10px; }
    .social-icons { gap: 10px; font-size: 1.1em; }
    #darkModeToggle { font-size: 1.1em; }
    .insurance-dropdown summary { padding: 15px 20px; font-size: 1em; }
    .insurance-form { padding: 20px; }
    .insurance-form button { padding: 10px 20px; font-size: 0.95em; }
    .insurance-card { transform: scale(0.7); }
    #cardPreviewContainer { min-height: calc(var(--card-height) * 0.7 + 15px); }
    #printCardButton { padding: 10px 20px; font-size: 0.95em; }
    footer { font-size: 0.85em; }
}