/* AADR - Aluminium & Automatic Door Repair Styles */

/* ===== BASE STYLES ===== */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background: #f7f7f7;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== LAYOUT CONTAINERS ===== */
/* Site-wide container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Services container override for wider layout */
.services .container {
    max-width: 1400px;
    padding: 0 1rem;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background: #4CAF50;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar {
    padding: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 45px;
    width: auto;
    border-radius: 6px;
    object-fit: contain;
    display: block;
}

.logo-img:not([src]),
.logo-img[src=""] {
    display: none;
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}

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

.nav-item {
    margin: 0;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ===== MAIN CONTENT ===== */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('img/hero.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    min-height: 60vh;
}

main h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    margin: 0 auto 1rem;
    max-width: 700px;
    font-weight: 500;
}

.hero-description {
    font-size: 1.1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    margin: 0 auto 1rem;
    max-width: 600px;
}

.logo {
    max-width: 250px;
    height: auto;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    backdrop-filter: blur(5px);
}

/* ===== CALL TO ACTION BUTTONS ===== */
.cta {
    margin-top: 2rem;
}

.cta a {
    display: inline-block;
    background: rgba(76, 175, 80, 0.9);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    margin: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.cta a:hover {
    background: rgba(69, 160, 73, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

/* ===== STANDARDIZED SECTIONS ===== */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #333;
    font-weight: 700;
}

.section-description {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: #666;
}

/* Spacing for extended services area without inline styles */
.services-section .section-description--extended {
    margin-top: 2.5rem;
}

/* ===== ABOUT SECTION ===== */
.about-section {
    background: #f9f9f9;
}

/* ===== CERTIFICATIONS SECTION ===== */
.certifications-section {
    background: #f9f9f9;
    /* same as About */
}

.certifications-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    background: rgba(76, 175, 80, 0.08);
    /* translucent green to complement footer */
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    max-width: 1000px;
    margin: 0 auto;
}

.map-wrapper {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

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

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

/* Contact form (right column) */
.contact-form {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.form-contact {
    width: 100%;
    max-width: 420px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

/* Form controls: unified styling for inputs, selects and textarea */
.form-contact input,
.form-contact select,
.form-contact textarea {
    padding: 0.75rem 0.9rem;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 1rem;
    color: #222;
    width: 100%;
    box-sizing: border-box;
    transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-contact input::placeholder,
.form-contact textarea::placeholder {
    color: #9aa0a6;
}

.form-contact input:focus,
.form-contact select:focus,
.form-contact textarea:focus {
    outline: none;
    border-color: rgba(76, 175, 80, 0.9);
    box-shadow: 0 6px 18px rgba(76, 175, 80, 0.08);
}

.form-contact textarea {
    resize: vertical;
    grid-column: 1 / -1;
    min-height: 120px;
    line-height: 1.5;
}

/* Honeypot: visually hidden but present for bots */
.hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Form feedback (success/error) */
.form-feedback {
    grid-column: 1 / -1;
    background: rgba(76, 175, 80, 0.08);
    border: 1px solid rgba(76, 175, 80, 0.16);
    color: #155724;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

.form-feedback.hidden {
    display: none;
}

.btn-submit {
    background: #4CAF50;
    color: #fff;
    border: none;
    padding: 0.9rem 1.2rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    grid-column: 1 / -1;
    justify-self: center;
    min-width: 180px;
}

.btn-submit:hover {
    background: #45a049;
}

/* Ensure contact form stacks nicely under 900px as well */
@media (max-width: 900px) {
    .contact-form {
        padding: 0 1rem;
    }

    .form-contact {
        max-width: 720px;
    }
}

/* Contact CTA buttons: light background, green text to complement section */
.contact-cta a {
    background: #fff;
    color: #4CAF50;
    border: 2px solid rgba(76, 175, 80, 0.12);
    padding: 0.9rem 1.6rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    display: inline-block;
    margin: 0.35rem;
}

.contact-cta a:hover {
    background: #f1fdf1;
}

@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .contact-panel {
        text-align: center;
    }
}

.cert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.cert-logo img {
    display: block;
    max-height: 84px;
    /* allow larger logos */
    width: auto;
}

.cert-text h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    color: #333;
}

.cert-text p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Trigger stacking on slightly larger screens for better layout (<= 900px) */
@media (max-width: 900px) {
    .certifications-grid {
        grid-template-columns: 1fr;
    }

    .cert-item {
        flex-direction: column;
        text-align: center;
    }

    /* For GateSafe, ensure logo appears above the paragraph when stacked */
    .cert-gatesafe .cert-logo {
        order: -1;
    }
}

/* ===== SERVICES SECTION ===== */
.services-section {
    background: #fff;
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    justify-content: center;
    max-width: 1000px;
    margin: 0 auto;
}

.service-card {
    background: #f9f9f9;
    border: 2px solid #4CAF50;
    border-radius: 12px;
    padding: 0;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 230px;
    height: 360px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(76, 175, 80, 0.2);
}

.service-icon {
    height: 120px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    margin-bottom: 0;
}

.service-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.service-card h4 {
    color: #4CAF50;
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.service-card p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
}

/* ===== FOOTER ===== */
.footer {
    background: #4CAF50;
    color: #fff;
    text-align: center;
    padding: 2rem 0;
}

.footer-text {
    font-size: 0.9rem;
    margin: 0;
}

/* Accreditation logos in footer */
.accreditations {
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.accreditations img {
    display: inline-block;
    max-height: 48px;
    width: auto;
    opacity: 0.95;
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.accreditations a {
    display: inline-block;
    outline: none;
    border-radius: 6px;
    transition: box-shadow 0.2s, outline 0.2s;
}

.accreditations a:focus-visible {
    outline: 2px solid #1976d2;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(25, 118, 210, 0.15);
}

.accreditations a:hover img,
.accreditations a:focus img {
    transform: scale(1.06) translateY(-2px);
    opacity: 1;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.18);
}

/* ===== SERVICE CALLOUTS WITH LOGOS ===== */
.callouts {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Callout container - logos flank the text on wide screens, stack on small screens */
.callout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.5rem;
    background: transparent;
}

.callout-logo {
    flex: 0 0 auto;
    display: inline-block;
}

.callout-logo img {
    display: block;
    height: auto;
    max-height: 56px;
    width: auto;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* Match the section description typography and width */
.callout .callout-text {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 700px;
    margin: 0;
    text-align: center;
}

@media (min-width: 768px) {
    .callout {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        padding: 0.75rem 0;
    }

    /* For the ADSA callout: logo left, text to the right, text remains centered */
    .callout-adsa {
        justify-content: center;
    }

    .callout-adsa .callout-logo {
        order: 0;
        margin-right: 1rem;
    }

    /* For the GateSafe callout: text then logo to place logo on the right */
    .callout-gatesafe {
        justify-content: center;
    }

    .callout-gatesafe .callout-logo {
        order: 1;
        margin-left: 1rem;
    }

    .callout .callout-text {
        padding: 0 1rem;
        text-align: center;
        flex: 1 1 60%;
    }
}

/* ===== WHATSAPP FLOATING BUTTON ===== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    border-radius: 50%;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.whatsapp-float:hover {
    background-color: #1ebe5d;
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .services-grid {
        gap: 1rem;
        max-width: 950px;
    }

    .service-card {
        width: 220px;
        height: 350px;
    }
}

@media (max-width: 768px) {

    /* Mobile Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: #4CAF50;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 0.5rem 0;
    }

    .nav-link {
        padding: 1rem;
        display: block;
        font-size: 1.1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .container {
        padding: 0 1rem;
    }

    .services-grid {
        gap: 1rem;
        max-width: 480px;
        /* Forces 2 cards per row on tablets */
    }

    .service-card {
        width: 210px;
        height: 340px;
    }

    .service-icon {
        height: 100px;
        font-size: 2.5rem;
    }

    /* Hero section mobile optimizations */
    main {
        padding: 3rem 0;
        min-height: 50vh;
        background-attachment: scroll;
    }

    main h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .logo {
        max-width: 200px;
        padding: 0.75rem;
    }

    .cta a {
        padding: 0.75rem 1.5rem;
        margin: 0.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .service-card {
        width: 100%;
        max-width: 320px;
        height: 280px;
        margin: 0 auto;
    }

    .service-icon {
        height: 80px;
        font-size: 2rem;
    }

    .service-content {
        padding: 1rem;
    }

    /* Small screen hero optimizations */
    main {
        padding: 2rem 0;
        min-height: 40vh;
    }

    main h1 {
        font-size: 1.5rem;
    }

    .hero-subtitle,
    .hero-description {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .cta a {
        display: block;
        margin: 0.5rem auto;
        max-width: 200px;
    }
}