/* ============================================
   CSS Reset & Base Styles
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #2b67a3;
    --color-primary-dark: #215a8f;
    --color-accent: #2d7a8f;
    --color-accent-light: #e6f2f5;
    --color-text: #2d3748;
    --color-text-light: #718096;
    --color-white: #ffffff;
    --color-grey: #f7fafc;
    --color-grey-dark: #e2e8f0;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
    overflow-x: hidden;
}

/* ============================================
   Container & Layout
   ============================================ */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   Header & Navigation
   ============================================ */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
    transition: var(--transition);
}

.logo-link:hover {
    opacity: 0.8;
}

.logo-text {
    height: 40px;
    width: auto;
    max-width: 200px;
}

.nav {
    position: relative;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    width: 25px;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link:focus {
    color: var(--color-primary);
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
}

.nav-link.active {
    color: var(--color-primary);
}

.nav-link.active::after {
    width: 100%;
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    background-image: url('/img/PFG-Paul.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: var(--color-white);
    padding: 120px 0 80px;
    text-align: center;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(43, 103, 163, 0.75);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-logo {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    animation: fadeInUp 0.6s ease-out;
}

.hero-logo-wrapper {
    position: relative;
    display: inline-block;
}

.hero-logo-img {
    max-width: 200px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.2)) 
            drop-shadow(0 0 15px rgba(255, 255, 255, 0.6)) 
            drop-shadow(0 0 30px rgba(255, 255, 255, 0.4));
    position: relative;
    z-index: 1;
    display: block;
}

.hero-logo-wrapper::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    z-index: -1;
    backdrop-filter: blur(5px);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--color-white);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.95);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-primary);
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #256a7f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-block {
    width: 100%;
    text-align: center;
}

/* ============================================
   Sections
   ============================================ */

section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   Services Section
   ============================================ */

.services {
    background-color: var(--color-grey);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background-color: var(--color-white);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.5rem;
    background-color: var(--color-accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
}

.service-icon svg {
    width: 32px;
    height: 32px;
}

.service-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.service-description {
    color: var(--color-text-light);
    line-height: 1.7;
}

/* ============================================
   About Section
   ============================================ */

.about {
    background-color: var(--color-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    animation: fadeInLeft 0.8s ease-out;
}

.about-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 1.5rem;
}

.about-tagline {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: var(--color-accent-light);
    border-left: 4px solid var(--color-accent);
    border-radius: 4px;
}

.tagline-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    margin: 0;
}

.about-image {
    animation: fadeInRight 0.8s ease-out;
}

.family-photo {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    object-fit: contain;
}

.image-placeholder {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, var(--color-grey-dark) 0%, var(--color-grey) 100%);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-light);
    box-shadow: var(--shadow-md);
}

.image-placeholder svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.image-placeholder span {
    font-size: 1rem;
    font-weight: 500;
}

/* ============================================
   Gallery Section
   ============================================ */

.gallery {
    background-color: var(--color-grey);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    aspect-ratio: 4 / 3;
    cursor: pointer;
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: var(--transition);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

/* ============================================
   Reviews Section
   ============================================ */

.reviews {
    background-color: var(--color-white);
}

.reviews-content {
    margin-top: 2rem;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.review-badge,
.checkatrade-badge {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 12px;
    padding: 3rem;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
    color: var(--color-white);
    animation: fadeInUp 0.8s ease-out;
}

.review-badge:nth-child(2) {
    animation-delay: 0.2s;
}

.badge-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.badge-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.badge-icon svg {
    width: 40px;
    height: 40px;
}

.badge-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    max-width: 200px;
    width: 100%;
}

.checkatrade-logo-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.checkatrade-icon-img {
    max-width: 200px;
    width: 100%;
    height: auto;
    max-height: 100px;
    display: block;
    object-fit: contain;
}

.checkatrade-logo {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    width: auto;
    filter: brightness(0) invert(1);
}

.badge-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-white);
    margin: 0;
}

.badge-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
}

.review-badge .btn-primary,
.checkatrade-badge .btn-primary {
    background-color: var(--color-white);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.review-badge .btn-primary:hover,
.review-badge .btn-primary:focus,
.checkatrade-badge .btn-primary:hover,
.checkatrade-badge .btn-primary:focus {
    background-color: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
}

.btn-icon {
    width: 18px;
    height: 18px;
    transition: var(--transition);
}

.review-badge .btn-primary:hover .btn-icon,
.checkatrade-badge .btn-primary:hover .btn-icon {
    transform: translateX(3px);
}

/* ============================================
   Contact Section
   ============================================ */

.contact {
    background-color: var(--color-grey);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    margin-top: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background-color: var(--color-accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
}

.contact-item-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.contact-item-text {
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
}

.contact-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.contact-link:hover,
.contact-link:focus {
    color: var(--color-primary);
    text-decoration: underline;
}

/* ============================================
   Contact Form
   ============================================ */

.contact-form {
    background-color: var(--color-white);
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--font-primary);
    border: 2px solid var(--color-grey-dark);
    border-radius: 6px;
    transition: var(--transition);
    background-color: var(--color-white);
    color: var(--color-text);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(45, 122, 143, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 3rem 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-logo-img {
    height: 50px;
    width: auto;
    opacity: 0.9;
}

.footer-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    transition: var(--transition);
}

.footer-link:hover,
.footer-link:focus {
    color: var(--color-white);
    opacity: 1;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 1rem;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================
   Responsive Design - Desktop
   ============================================ */

@media (min-width: 969px) {
    .hero {
        background-position: 50% 20%;
        background-attachment: scroll;
    }
}

/* ============================================
   Responsive Design - Tablet
   ============================================ */

@media (max-width: 968px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image {
        order: -1;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-info {
        flex-direction: row;
        justify-content: space-around;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .review-badge,
    .checkatrade-badge {
        padding: 2.5rem 2rem;
    }
}

/* ============================================
   Responsive Design - Mobile
   ============================================ */

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background-color: var(--color-white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        gap: 0;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 1rem 0;
        width: 100%;
        border-bottom: 1px solid var(--color-grey-dark);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    section {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 3rem;
    }

    .hero {
        padding: 100px 0 60px;
        min-height: 90vh;
        background-attachment: scroll;
    }

    .hero-logo {
        margin-bottom: 1.5rem;
    }

    .hero-logo-img {
        max-width: 150px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.25rem;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }

    .about-content {
        gap: 2rem;
    }

    .about-description {
        font-size: 1rem;
    }

    .contact-content {
        gap: 2rem;
    }

    .contact-info {
        flex-direction: column;
        gap: 2rem;
    }

    .contact-form {
        padding: 2rem 1.5rem;
    }

    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .review-badge,
    .checkatrade-badge {
        padding: 2rem 1.5rem;
    }

    .badge-title {
        font-size: 1.5rem;
    }

    .badge-description {
        font-size: 1rem;
    }

    .badge-icon {
        width: 70px;
        height: 70px;
    }

    .badge-icon svg {
        width: 35px;
        height: 35px;
    }

    .footer-content {
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .logo-text {
        height: 35px;
        max-width: 150px;
    }

    .hero-logo-img {
        max-width: 120px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .service-card {
        padding: 1.5rem 1.25rem;
    }

    .contact-form {
        padding: 1.5rem 1.25rem;
    }

    .review-badge,
    .checkatrade-badge {
        padding: 1.5rem 1.25rem;
    }

    .badge-title {
        font-size: 1.35rem;
    }

    .badge-description {
        font-size: 0.95rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .back-to-top svg {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   Back to Top Button
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    transition: var(--transition);
    opacity: 0;
    transform: translateY(20px);
}

.back-to-top.visible {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus {
    background-color: var(--color-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   Accessibility
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Skip to main content link (hidden but accessible) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-white);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

