/*
 * Base Styles for hblondel.co.uk
 * Contains: CSS variables, reset, typography, foundational styles
 */
/* ===== IMPROVED BASE STYLES FOR MOBILE ===== */

/* Better box-sizing for all elements */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Root Variables: Defines the color palette and common values */
:root {
    --primary-color: #f8fafc;
    --secondary-color: #e2e8f0;
    --accent-color: #00529B;
    --accent-secondary: #003366;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --background: #F0F4F8;
    --surface: #ffffff;
    --button-bg-light: #00529B;
    --button-text-light: white;
    --button-hover-bg-light: #003366;
    --gemini-secondary-accent: #00A8CC;
    --gemini-light-bg: #E0F7FA;
}

/* Improved root font sizing */
html {
    font-size: 16px; /* Base font size */
    -webkit-text-size-adjust: 100%; /* Prevent iOS font scaling */
    -ms-text-size-adjust: 100%; /* Prevent Windows Phone font scaling */
}

/* Universal Box-Sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1f2937;
    background-color: #f9fafb;
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-align: justify;
}

text {
    white-space-collapse: preserve;
}

input {
    display: table-cell;
    vertical-align: middle
}

/* Typography */
/* Improved heading hierarchy */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem 0;
    font-weight: 600;
    line-height: 1.2;
    color: #111827;
}


h1 {
    font-size: 2.25rem; /* 36px */
    font-weight: 700;
}

h2, .section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem; /* 30px */
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.header-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}


.section-h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}

h3 {
    font-size: 1.5rem; /* 24px */
    color: var(--accent-secondary);
}

h4 {
    font-size: 1.25rem; /* 20px */
    color: var(--accent-secondary);
    margin-bottom: 0.8rem;
}

h5 {
    font-size: 1rem; 
    color: var(--accent-secondary);
}

/* Links */
/* Better link styling */
a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #1d4ed8;
    text-decoration: none;
}

a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

sup {
    font-style: italic;
    color: #003366;
}

/* Preview hover box */
.box{
    display: none;
    width: 100%;
    border-radius: 4px;
}

a:hover + .box,.box:hover{
    display: block;
    position: relative;
    z-index: 100;
}

/* Buttons */
/* Improved button base styles */
button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Lists */
/* Improved list styling */
ol {
    list-style-type: none;
}

ul, ol {
    margin: 0 0 1rem 0;
    padding-left: 0rem;
    list-style-type: none;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    text-align: left;
}

/* Paragraphs */
p {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

/* Form Elements Base */
input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
    padding: 0.75rem;
    border-radius: 0.375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Utility classes for responsive design */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }


/* Improved image responsiveness */
img {
    max-width: auto;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Better table responsiveness */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

th, td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

th {
    font-weight: 600;
    background-color: #f9fafb;
}

/* Responsive visibility utilities */
.hidden-mobile {
    display: block;
}

.visible-mobile {
    display: none;
}

@media (max-width: 768px) {
    .hidden-mobile {
        display: none;
    }
    
    .visible-mobile {
        display: block;
    }
}