/* --- CSS Variables & Reset --- */
:root {
    /* --- MAPPING: Custom Vars -> WP Presets --- */
    
    /* Backgrounds */
    --bg-body:              var(--wp--preset--color--base);
    --bg-body-secondary:    var(--wp--preset--color--base-secondary);
    --bg-nav:               rgba(255, 255, 255, 0.85); /* Kept manual (opacity) */
    --bg-glass:             rgba(255, 255, 255, 0.9);  /* Kept manual */
    --bg-hover:             #f3f4f6; /* Could map to a light gray preset if created */
    --bg-menu:              var(--wp--preset--color--base);

    /* Brand Colors */
    --medical-teal:         var(--wp--preset--color--brand);
    --medical-teal-dark:    var(--wp--preset--color--brand-dark);
    --accent-color:         var(--wp--preset--color--accent);
    
    /* Shadows using Brand Color */
    /* Note: We can't put opacity on a WP var easily in CSS without Calc/RGB tricks, 
       so we often have to keep the raw rgba here OR use a defined shadow preset. 
       I left this raw for safety unless you have an RGB preset. */
    --shadow-color:         rgba(36, 163, 162, 0.25); 

    /* Text */
    --text-primary:         var(--wp--preset--color--text-primary);
    --text-secondary:       var(--wp--preset--color--text-secondary);
    --text-tertiary:        var(--wp--preset--color--text-tertiary);
    
    --border-color:         #e4e4e7; /* or map to a gray preset */

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 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);

    /* Buttons */
    --btn-bg-primary:       var(--wp--preset--color--text-primary);
    --btn-bg-secondary:     var(--wp--preset--color--base);
    
    /* Gradients */
    --btn-bg-gradient:       var(--wp--preset--gradient--teal-gradient);
    --btn-bg-stack-gradient: var(--wp--preset--gradient--teal-gradient);

    --btn-text:             #ffffff;
    --btn-border-radius:    6px;
    --btn-pd-sm:            8px 16px;
    --btn-pd-md:            12px 24px;
    --btn-pd-lg:            16px 32px;

    /* Layout */
    --container-width:      var(--wp--style--global--wide-size); /* Maps to 1440px */
    --side-padding:         24px; /* Matches the theme.json padding */
    --header-height:        64px;
    --transition:           all 0.2s ease;   
    
    /* Typography Variables */
    /* WP now handles fluid type, but we map your specific clamps just in case 
       you use these variables directly in custom blocks */
    --size-h1:      var(--wp--preset--font-size--xx-large);
    --size-h2:      var(--wp--preset--font-size--x-large);
    --size-h3:      var(--wp--preset--font-size--large);
    --size-body:    var(--wp--preset--font-size--medium);
    --size-lead:    var(--wp--preset--font-size--large); 
    --size-small:   var(--wp--preset--font-size--small); 

    /* SPACING */
    --measure-standard: 60ch; 
    --measure-narrow:   45ch; 
}

/* =========================================
   REST OF YOUR CSS (UNCHANGED)
   ========================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    width: 100%;
    overflow-x: hidden;
}

::selection{
    background-color: #333;
    color: #f5f5f5;
}

ul { list-style: none; }
a { text-decoration: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }


/* --- Typography --- */

h1, h2, h3 {
  margin-bottom: 0.50em;
}

h1, h2, h3, h4, h5, h6{
    display: block;
}

h1 strong,
h2 strong
 {
    font-weight: 500;
    background: var(--btn-bg-gradient);

    /* make the text act as a mask */
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.eyebrow {
  display: block; 
  font-size: 20px;
  color: var(--medical-teal);
  text-transform: uppercase;
  letter-spacing: 0.1em; 
  font-weight: 700;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.5em; 
}

/* The "Lead" paragraph */
.lead {
  font-size: var(--size-lead);
  color: var(--text-primary); /* Fixed variable name from text-heading */
  max-width: var(--measure-narrow); 
  margin-bottom: 2em;
}


/* --- Utilities --- */

.relative{ position: relative;}
.relative-z { position: relative; z-index: 1; width: 100%;}
.column{ flex-direction: column;}
.reverse {flex-direction: row-reverse;}

.text-align-right{text-align: right !important;}
.text-align-left{text-align: left !important;}

.full-width{width: 100% !important;}

.container {
        max-width: var(--container-width);
        margin: 0 auto;
        padding: 0 var(--side-padding);
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
}

.space-between {
    justify-content: space-between !important;
}

section {
     padding: 100px 0;
}


/* --- Basic Components --- */

.btn-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
}
.btn-text:hover { color: var(--text-primary); }



.btn {
    color: var(--btn-text);
    border-radius: var(--btn-border-radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    overflow: hidden;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255,255,255,0.1), 
        rgba(255,255,255,0.5), 
        rgba(255,255,255,0.1), 
        transparent
    );
    transform: skewX(-20deg);
    pointer-events: none;
}

.btn:hover::after {
    animation: sheen-sweep 1.2s ease-out;
}



.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: scale(0.97) translateY(1px);
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.1),
        0 2px 6px var(--shadow-color);
}

.btn:active::after {
            opacity: 0;
            transition: opacity 0.1s;
        }

.med-btn:focus-visible {
    outline: 2px solid var(--medical-teal);
    outline-offset: 4px;
}

.btn-primary {background-color: var(--btn-bg-primary);} 
.btn-secondary {background: var(--btn-bg-secondary);} 
.btn-gradient {background: var(--btn-bg-gradient);} 

.btn-stack {
    background: var(--btn-bg-stack-gradient); 
    box-shadow: 
                inset 0 1px 0 rgba(255, 255, 255, 0.3),
                0 4px 12px var(--shadow-color),
                0 8px 24px -4px rgba(36, 163, 162, 0.15);
} 
.btn-stack:hover { 
    
    box-shadow: 
                inset 0 1px 0 rgba(255, 255, 255, 0.3),
                0 8px 20px var(--shadow-color),
                0 12px 32px -4px rgba(36, 163, 162, 0.2);
}

.btn-sm {padding: var(--btn-pd-sm);}
.btn-md {padding:var(--btn-pd-md);}
.btn-lg {padding: var(--btn-pd-lg);}


/* This is the animation rewriten for WP button blocks, it's to be fixed later 
*/

/* 1. Base setup for the animation to work */
.wp-block-button__link {
    position: relative; /* Keeps the sheen inside */
    overflow: hidden;   /* Hides the sheen when it's outside the button boundaries */
    transition: all 0.4s ease-out;
}

/* 2. The Sheen Element */
.wp-block-button__link::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255,255,255,0.1), 
        rgba(255,255,255,0.5), 
        rgba(255,255,255,0.1), 
        transparent
    );
    transform: skewX(-20deg);
    pointer-events: none; /* Ensures the sheen doesn't block clicks */
}



.wp-block-button__link:hover::after {
    animation: sheen-sweep 1.2s ease-out;
}

/* 4. Active/Click States */
.wp-block-button__link:active {
    transform: scale(0.95);
}

.wp-block-button__link:active::after {
    opacity: 0;
    transition: opacity 0.1s;
}

.btn-video {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px;
    transition: opacity 0.2s ease;
}

.btn-video:hover { opacity: 0.8; }



input:focus {
    border-color: #2563eb;
    /* background: rgba(255, 255, 255, 0.08); */
}

input[type="text"],
input[type="email"] {
    border-bottom: 4px solid var(--medical-teal);
}

input[type="submit"] {
    appearance: none; 
    -webkit-appearance: none;
    border: none;
    cursor: pointer; 
    display: inline-block; 
    width: auto; 
}


/* --- Basic Animations --- */
@keyframes sheen-sweep {
    0% { 
        left: -100%; 
        opacity: 0; 
    }
    10% { 
        opacity: 1; 
    }
    100% { 
        left: 200%; 
        opacity: 0; 
    }
}


/* Container for the row */
.two-column-row {
    display: flex;
    justify-content: space-between;
    gap: 20px; 
    width: 100%;
}

/* Settings for individual columns */
.form-column {
    width: 48%; 
}

/* Make inputs fill their column */
.form-column input {
    width: 100%;
}


/* Mobile Responsiveness */
@media only screen and (max-width: 600px) {
    .two-column-row {
        flex-direction: column;
        gap: 0;
    }
    .form-column {
        width: 100%;
    }
}

form p {
    font-size: var(--wp--preset--font-size--small);
}

/* --- Contact Form 7 styling --- */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
    background-color: var(--bg-body);
    color: #333333; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    padding: 10px 12px; 
    font-size: 16px;
    width: 100%; 
    box-sizing: border-box; 
    outline: none; 
    transition: border-color 0.2s; 
}

/* Focus State */
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 textarea:focus {
    border-color: #0056b3; 
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1); 
}

/* --- Validation Error Bubble --- */
.wpcf7-not-valid-tip {
    background-color: var(--bg-body);
    color: #333; 
    border: 1px solid #ccc; 
    border-radius: 4px;
    padding: 10px;
    margin-top: 8px; 
    position: relative;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
    display: flex;
    align-items: center;
}

.wpcf7-not-valid-tip::before {
    content: '!'; 
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: #ff9900; 
    color: white;
    text-align: center;
    line-height: 20px;
    font-weight: bold;
    margin-right: 10px; 
    border-radius: 2px; 
}

.wpcf7-not-valid-tip::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #ccc; 
}

textarea {
    resize: none;
}

/* --- Response Box --- */
div.wpcf7-response-output {
    border: none !important; 
    margin: 20px 0 0 0 !important;
    padding: 15px 20px !important;
    border-radius: 5px; 
    background-color: var(--wp--preset--color--base-secondary, #f7fafc);
    position: relative; 
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

div.wpcf7-response-output::after {
    content: " ";
    position: absolute;
    bottom: 100%; 
    left: 20px; 
    border-width: 10px;
    border-style: solid;
    border-color: transparent transparent transparent transparent; 
}




/* --- Global Form Styling --- */

/* 1. Standard Inputs, Textareas, and Dropdowns */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
textarea,
select {
    background-color: var(--bg-body);
    color: #333333; 
    border: 1px solid #ccc; 
    border-radius: 4px; 
    padding: 10px 12px; 
    font-size: 16px;
    width: 100%; 
    box-sizing: border-box; 
    outline: none; 
    transition: border-color 0.2s, box-shadow 0.2s; 
    /* Fix for some themes overriding height */
    min-height: 45px; 
}

/* Adjust textarea height specifically */
textarea {
    min-height: 120px;
    resize: vertical; /* Allows user to resize vertically only */
}

/* Focus State for all inputs */
input:focus,
textarea:focus,
select:focus {
    border-color: #0056b3; 
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1); 
}


/* --- Radio Button & Checkbox Styling --- */

/* Remove default browser appearance */
input[type="radio"],
input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--bg-body);
    margin: 0 8px 0 0; /* Space between button and label text */
    font: inherit;
    color: currentColor;
    width: 1.15em;
    height: 1.15em;
    border: 1px solid #ccc;
    border-radius: 50%; /* Circular for Radio */
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* Checkboxes should be square(ish) with slight rounding */
input[type="checkbox"] {
    border-radius: 4px;
}

/* Hover State */
input[type="radio"]:hover,
input[type="checkbox"]:hover {
    border-color: #0056b3;
}

/* Focus State (Accessibility) */
input[type="radio"]:focus,
input[type="checkbox"]:focus {
    border-color: #0056b3; 
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1); 
}

/* --- The "Checked" Dot/Checkmark --- */

/* Create the inner dot/check using ::before */
input[type="radio"]::before,
input[type="checkbox"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em #0056b3; /* This sets the inner color */
}

/* Radio Button Inner Dot */
input[type="radio"]::before {
    border-radius: 50%;
}

/* Checkbox Inner Square/Check */
input[type="checkbox"]::before {
    transform-origin: center;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    box-shadow: inset 1em 1em #0056b3;
}

/* Trigger animation when checked */
input[type="radio"]:checked::before,
input[type="checkbox"]:checked::before {
    transform: scale(1);
}

input[type="radio"]:checked,
input[type="checkbox"]:checked {
    border-color: #0056b3;
}