/* CSS Variables for consistent theming */
:root {
    /* UK-focused color palette */
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #dc2626;
    --secondary-dark: #b91c1c;
    --accent-color: #059669;
    --accent-light: #10b981;
    
    /* Neutral colors */
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-secondary: 'Poppins', sans-serif;
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 5rem 0;
    --element-spacing: 2rem;
    
    /* 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);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-secondary);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1.125rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* Container and layout */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header styles */
.header {
    background: var(--bg-primary);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.nav-logo img {
    height: 2.5rem;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary);
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -0.5rem;
    left: 0;
    background-color: var(--primary-color);
    transition: width var(--transition-normal);
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 3px 0;
    transition: var(--transition-fast);
}

/* Hero section */
.hero {
    padding: 8rem 0 6rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    margin-top: 80px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    width: 100%;
    height: auto;
}

/* Services section */
.services {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-primary);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon img {
    width: 48px;
    height: 48px;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    text-align: left;
}

.service-features li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-secondary);
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

/* About section */
.about {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.about-image img {
    width: 100%;
    height: auto;
}

/* Reviews section */
.reviews {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.review-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-color);
}

.review-rating {
    margin-bottom: 1rem;
}

.stars {
    color: #fbbf24;
    font-size: 1.25rem;
}

.review-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.review-author strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 0.25rem;
}

.review-author span {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Newsletter section */
.newsletter {
    padding: var(--section-padding);
    background: var(--primary-color);
    color: white;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter h2 {
    color: white;
    margin-bottom: 1rem;
}

.newsletter p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.newsletter-form .form-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form input {
    flex: 1;
    padding: 1.5rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    min-height: 40px;
    min-width: 250px;
    box-sizing: border-box;
    outline: none;
    transition: box-shadow 0.3s ease;
}

.newsletter-form input:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.newsletter-form button {
    min-height: 70px;
    padding: 0 2.5rem;
    font-size: 1.25rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.newsletter-disclaimer {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* Contact section */
.contact {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-details {
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon img {
    width: 24px;
    height: 24px;
    filter: brightness(0) invert(1);
}

.contact-text h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.contact-text p {
    margin: 0;
    color: var(--text-secondary);
}

/* Forms */
.contact-form {
    background: var(--bg-primary);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition-fast);
}

.footer-section ul li a:hover {
    color: white;
}

.footer-logo img {
    height: 2rem;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin: 0;
}

/* Legal pages */
.legal-page {
    padding: 8rem 0 4rem;
    margin-top: 80px;
}

.legal-header {
    text-align: center;
    margin-bottom: 3rem;
}

.legal-updated {
    color: var(--text-light);
    font-size: 0.875rem;
    margin: 0;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-section {
    margin-bottom: 3rem;
}

.legal-section h2 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.legal-section h3 {
    color: var(--text-primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-section ul,
.legal-section ol {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.contact-details {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

/* Cookie table */
.cookie-table {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.cookie-table table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cookie-table th,
.cookie-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.cookie-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.cookie-table td {
    color: var(--text-secondary);
}

/* Thank you page */
.thank-you {
    padding: 8rem 0 4rem;
    margin-top: 80px;
    text-align: center;
}

.thank-you-content {
    max-width: 600px;
    margin: 0 auto;
}

.thank-you-icon {
    margin-bottom: 2rem;
}

.thank-you h1 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.thank-you-message {
    font-size: 1.125rem;
    margin-bottom: 2.5rem;
}

.thank-you-details {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-bottom: 2.5rem;
    text-align: left;
}

.thank-you-details h3 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.thank-you-details ul {
    list-style: none;
    margin: 0;
}

.thank-you-details li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    position: relative;
    padding-left: 1.5rem;
}

.thank-you-details li:last-child {
    border-bottom: none;
}

.thank-you-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.thank-you-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Newsletter benefits */
.newsletter-benefits {
    padding: var(--section-padding);
    background: var(--bg-secondary);
}

.newsletter-benefits h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.benefit-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: transform var(--transition-normal);
}

.benefit-card:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.benefit-card h3 {
    margin-bottom: 1rem;
}

.benefit-card p {
    margin: 0;
}

/* Contact summary */
.contact-summary {
    padding: var(--section-padding);
    background: var(--bg-primary);
}

.contact-summary-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-options {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* Responsive design */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 3rem 0;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--bg-primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-md);
        padding: 2rem 0;
        gap: 1rem;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    .hero {
        padding: 6rem 0 4rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
        max-width: 90%;
    }
    
    .newsletter-form input {
        min-width: unset;
        width: 100%;
        min-height: 60px;
        padding: 1.25rem 1.5rem;
        font-size: 1.125rem;
    }
    
    .newsletter-form button {
        min-height: 60px;
        padding: 0 2rem;
        font-size: 1.125rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-options {
        flex-direction: column;
        gap: 2rem;
    }
    
    .thank-you-actions {
        flex-direction: column;
        align-items: center;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .service-card,
    .benefit-card,
    .contact-form {
        padding: 1.5rem;
    }
    
    .review-card {
        padding: 1.5rem;
    }
    
    .legal-section ul,
    .legal-section ol {
        margin-left: 1rem;
    }
}

/* Print styles */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .cookie-modal,
    .hero-buttons,
    .newsletter,
    .contact-form {
        display: none;
    }
    
    .legal-page,
    .thank-you {
        margin-top: 0;
        padding-top: 2rem;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .legal-section {
        page-break-inside: avoid;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --text-primary: #000000;
        --text-secondary: #333333;
        --border-color: #000000;
    }
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Hidden class for JavaScript interactions */
.hidden {
    display: none !important;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
