/* =========================================================
   Handyman Middlesbrough - Main Stylesheet
   Font: Atkinson Hyperlegible
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&display=swap');

:root {
    --primary: #1e4d8c;       /* Deep blue - trust, dependable */
    --primary-dark: #143560;
    --primary-light: #2e6bb5;
    --accent: #f39c12;        /* Warm amber - friendly, approachable */
    --accent-dark: #c87f08;
    --dark: #1a1a1a;
    --grey-900: #2c3e50;
    --grey-700: #4a5568;
    --grey-500: #718096;
    --grey-300: #cbd5e0;
    --grey-100: #f7fafc;
    --white: #ffffff;
    --success: #27ae60;
    --error: #e74c3c;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --radius: 8px;
    --container-width: 1200px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: 'Atkinson Hyperlegible', Arial, sans-serif;
    line-height: 1.6;
    color: var(--grey-900);
    background-color: var(--white);
    overflow-x: hidden;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Atkinson Hyperlegible', Arial, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--grey-900);
    margin-bottom: 1rem;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }

p { margin-bottom: 1rem; }

/* ========== HEADER ========== */
.site-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary);
}

.header-top {
    background: var(--primary-dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.9rem;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header-top a {
    color: var(--white);
}

.header-top a:hover {
    color: var(--accent);
}

.header-main {
    padding: 15px 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.site-logo svg {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.logo-text {
    font-weight: 700;
    line-height: 1.1;
}

.logo-text .logo-main {
    display: block;
    color: var(--primary);
    font-size: 1.4rem;
}

.logo-text .logo-sub {
    display: block;
    color: var(--accent-dark);
    font-size: 0.95rem;
    font-weight: 400;
}

.phone-cta {
    background: var(--accent);
    color: var(--white);
    padding: 12px 22px;
    border-radius: var(--radius);
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.phone-cta:hover {
    background: var(--accent-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========== NAVIGATION ========== */
.main-nav {
    background: var(--primary);
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: block;
    color: var(--white);
    padding: 14px 22px;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.main-nav a:hover, .main-nav a.active {
    background: var(--primary-dark);
    color: var(--accent);
}

/* Mobile menu toggle */
.mobile-toggle {
    display: none;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    font-family: inherit;
    font-weight: 700;
    text-transform: uppercase;
}

.mobile-toggle span {
    display: inline-block;
    margin-right: 8px;
}

/* ========== HERO ========== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: clamp(2rem, 5vw, 3.5rem);
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
    border-color: var(--accent);
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

/* ========== BREADCRUMBS ========== */
.breadcrumbs {
    background: var(--grey-100);
    padding: 12px 0;
    font-size: 0.9rem;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
}

.breadcrumbs li:not(:last-child)::after {
    content: '›';
    margin: 0 10px;
    color: var(--grey-500);
}

.breadcrumbs a {
    color: var(--primary);
}

.breadcrumbs li:last-child {
    color: var(--grey-700);
}

/* ========== SECTIONS ========== */
section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    color: var(--primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

.section-title p {
    color: var(--grey-700);
    max-width: 700px;
    margin: 1.5rem auto 0;
}

/* ========== SERVICE GRID ========== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--grey-300);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.service-card-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--grey-100);
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-card-image img {
    transform: scale(1.05);
}

.service-card-content {
    padding: 20px;
}

.service-card h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.service-card h3 a {
    color: var(--primary);
}

.service-card p {
    color: var(--grey-700);
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.service-card .read-more {
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.service-card .read-more::after {
    content: ' →';
}

/* ========== CONTENT AREA ========== */
.page-content {
    padding: 60px 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

.main-content h2 {
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.main-content h3 {
    color: var(--grey-900);
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.main-content p {
    margin-bottom: 1.2rem;
    color: var(--grey-900);
    font-size: 1.05rem;
    line-height: 1.7;
}

.main-content ul, .main-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.main-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.content-image {
    margin: 2rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.content-image img {
    width: 100%;
}

.content-image figcaption {
    padding: 10px;
    background: var(--grey-100);
    font-size: 0.9rem;
    text-align: center;
    color: var(--grey-700);
    font-style: italic;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin: 2rem 0;
}

.image-grid img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: sticky;
    top: 200px;
    align-self: start;
}

.sidebar-block {
    background: var(--grey-100);
    padding: 25px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    border-left: 4px solid var(--accent);
}

.sidebar-block h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.sidebar-block ul {
    list-style: none;
    padding: 0;
}

.sidebar-block li {
    border-bottom: 1px solid var(--grey-300);
    padding: 8px 0;
}

.sidebar-block li:last-child {
    border-bottom: none;
}

.sidebar-block a {
    color: var(--primary);
    font-weight: 400;
    display: block;
    transition: padding 0.3s ease;
}

.sidebar-block a:hover {
    padding-left: 5px;
    color: var(--accent-dark);
}

.contact-block {
    background: var(--primary);
    color: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    text-align: center;
    border: none;
}

.contact-block h3 {
    color: var(--white);
}

.contact-block .phone-big {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin: 10px 0;
}

.contact-block .phone-big a {
    color: var(--accent);
}

/* ========== CONTACT FORM ========== */
.contact-form {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--grey-300);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--grey-900);
}

.form-group label .required {
    color: var(--error);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--grey-300);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

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

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 4px;
    flex-shrink: 0;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: 400;
    cursor: pointer;
}

.form-message {
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* ========== FAQ ========== */
.faq-section {
    background: var(--grey-100);
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    padding: 18px 25px;
    background: var(--white);
    cursor: pointer;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 1.05rem;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: var(--grey-100);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-question.active::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 25px;
    color: var(--grey-700);
}

.faq-answer.active {
    max-height: 500px;
    padding: 15px 25px 25px;
}

/* ========== CALL TO ACTION ========== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    text-align: center;
    padding: 70px 0;
}

.cta-section h2 {
    color: var(--white);
}

.cta-section p {
    font-size: 1.15rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ========== TESTIMONIALS ========== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--accent);
}

.testimonial-text {
    font-style: italic;
    color: var(--grey-700);
    margin-bottom: 15px;
    line-height: 1.7;
}

.testimonial-author {
    font-weight: 700;
    color: var(--primary);
}

.stars {
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

/* ========== TRUST SIGNALS ========== */
.trust-bar {
    background: var(--grey-100);
    padding: 30px 0;
    border-top: 1px solid var(--grey-300);
    border-bottom: 1px solid var(--grey-300);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.trust-item {
    color: var(--grey-700);
}

.trust-item strong {
    display: block;
    color: var(--primary);
    font-size: 1.4rem;
    margin-bottom: 5px;
}

/* ========== FOOTER ========== */
.site-footer {
    background: var(--grey-900);
    color: var(--grey-300);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-block h4 {
    color: var(--white);
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
    display: inline-block;
}

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

.footer-block li {
    margin-bottom: 8px;
}

.footer-block a {
    color: var(--grey-300);
    transition: color 0.3s ease;
}

.footer-block a:hover {
    color: var(--accent);
}

.footer-logo svg {
    width: 50px;
    height: 50px;
}

.footer-logo .logo-main {
    color: var(--white);
}

.footer-logo .logo-sub {
    color: var(--grey-300);
}

.footer-bottom {
    border-top: 1px solid var(--grey-700);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--accent);
}

/* ========== MAP IFRAME ========== */
.map-container {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin: 2rem 0;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ========== LINKS PAGE ========== */
.links-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    padding: 0;
}

.links-list li {
    background: var(--grey-100);
    padding: 12px 18px;
    border-radius: var(--radius);
    border-left: 3px solid var(--accent);
    transition: all 0.3s ease;
}

.links-list li:hover {
    background: var(--primary);
    border-left-color: var(--white);
}

.links-list li:hover a {
    color: var(--white);
}

.links-list a {
    color: var(--primary);
    font-weight: 700;
    display: block;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .header-top {
        font-size: 0.8rem;
    }
    .header-top .container {
        justify-content: center;
        text-align: center;
    }
    .site-logo svg {
        width: 45px;
        height: 45px;
    }
    .logo-text .logo-main {
        font-size: 1.1rem;
    }
    .logo-text .logo-sub {
        font-size: 0.8rem;
    }
    .phone-cta {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
    .mobile-toggle {
        display: block;
    }
    .main-nav ul {
        display: none;
        flex-direction: column;
    }
    .main-nav ul.open {
        display: flex;
    }
    .main-nav li {
        width: 100%;
    }
    .main-nav a {
        padding: 14px 20px;
        border-bottom: 1px solid var(--primary-dark);
    }
    .hero {
        padding: 50px 0;
    }
    .hero-buttons {
        flex-direction: column;
    }
    .hero-buttons .btn {
        width: 100%;
    }
    section {
        padding: 40px 0;
    }
    .services-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    .service-card-content {
        padding: 15px;
    }
    .service-card h3 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .header-main .container {
        flex-wrap: wrap;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .image-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ========== SKIP LINK FOR ACCESSIBILITY ========== */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary);
    color: var(--white);
    padding: 10px 20px;
    z-index: 9999;
}

.skip-link:focus {
    left: 0;
}

/* ========== UTILITY ========== */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
