/* Root variables for colours and fonts */
:root {
    --primary: #003E7E; /* king's blue - derived from company logo */
    --secondary: #035fae; /* slightly lighter blue */
    --light-bg: #ffffff;
    --grey: #f5f6f7;
    --text: #333;
    --heading: #1a1a1a;
    --accent: #005fa2;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--light-bg);
}

/* Navigation */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    /* Match header background to the light grey tint of the logo to avoid visible edges */
    background: var(--grey);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

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

/* Navigation logo and company name */
.nav-logo .logo {
    /* Increase logo size for greater prominence */
    width: 130px;
    height: auto;
}

/* Flex container for logo and name */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo .company-name {
    /* Enlarged company name next to the logo */
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-links a:hover::after,
.nav-links a:focus::after {
    width: 100%;
}

/* Hero */
.hero {
    position: relative;
    height: 90vh;
    overflow: hidden;
}

.slides {
    /* Stack slides on top of one another instead of a horizontal strip */
    position: relative;
    height: 100%;
    width: 100%;
    /* We no longer translate the slides container; slide navigation is handled by toggling classes */
    /* Removed transition property since we don't animate horizontal movement */
}

.slide {
    /* Position each slide absolutely to fill the hero area */
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    /* Hide all slides by default; the active class will make them visible */
    display: none;
    align-items: center;
    justify-content: center;
}

/* Show the active slide */
/* When a slide becomes active, show it and allow interactions */
.slide.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Override justification for split slides when active */
.slide.split.active {
    justify-content: space-between;
}

/* Split layout slides for product and stationery */
.slide.split {
    background: var(--grey);
    /* Remove display settings; the active class controls flex layout */
    /* Provide generous padding for split layout */
    padding: 0 8vw;
}

.slide.split .hero-content-left {
    max-width: 50%;
    color: var(--primary);
}

.slide.split .hero-content-left h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.slide.split .hero-content-left p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.slide.split .hero-image-right img {
    width: 45vw;
    max-width: 500px;
    height: auto;
}

/* Printer overlay in the printing slide */
.printer-overlay {
    position: absolute;
    bottom: 0;
    right: 5%;
    width: 40%;
    max-width: 500px;
    z-index: 1;
    pointer-events: none;
}

.printer-overlay img {
    width: 100%;
    height: auto;
}

.slide .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Remove the blue tint overlay from hero slides for clearer imagery */
    background: transparent;
}

/* Adjust overlay on the printing slide for better readability while letting the office background show through */
/* Overlay for the printing slide: dark tint to ensure text stands out on the office background */
.printing-slide .overlay {
    /* No global tint on the printing slide; the text panel will provide contrast */
    background: rgba(0, 0, 0, 0);
}

/* Special styling for printing slide content */
.printing-slide .print-content {
    text-align: left;
    max-width: 600px;
    margin-left: 5%;
    /* Add a semi-transparent backdrop behind the text for readability */
    background: rgba(255, 255, 255, 0.75);
    padding: 1.5rem;
    border-radius: 8px;
}

/* Background image for the printing slide (office interior) */
.printing-slide {
    background-image: url('assets/office-bg-printer.jpg');
    background-size: cover;
    background-position: center;
}

/* Adjust text alignment on the print slide */
/* Removed old .print-slide rule now that the printing slide uses split layout */

.hero-content {
    position: relative;
    z-index: 2;
    /* Use the primary brand colour for text so it stands out on clear backgrounds */
    color: var(--primary);
    max-width: 600px;
    text-align: center;
    padding: 1rem;
    /* Add top margin to ensure the hero content doesn't hide behind the header */
    margin-top: 3rem;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s, color 0.3s;
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

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

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    margin-top: 1rem;
}

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

.hero-controls {
    position: absolute;
    width: 100%;
    top: 50%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.hero-controls button {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: #fff;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.3s;
}

.hero-controls button:hover {
    background: rgba(0, 0, 0, 0.6);
}

/* Sections */
.section {
    padding: 4rem 1rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

h2 {
    font-size: 2rem;
    color: var(--heading);
    margin-bottom: 1rem;
    text-align: center;
}

.section-intro {
    max-width: 700px;
    margin: 0 auto 2rem auto;
    text-align: center;
    color: var(--text);
}

/* Card grid for tech */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.card {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.card-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.5rem;
    color: var(--heading);
}

.card p {
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

/* Printers section */
/* Horizontal printer slider */
.printers-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
}

.printers-slider {
    display: flex;
    overflow: hidden;
    width: 100%;
}

.printer-slide {
    flex: 0 0 100%;
    padding: 2rem;
    text-align: center;
    display: none;
}

.printer-slide.active {
    display: block;
}

.printer-slide img {
    width: 100%;
    max-width: 350px;
    margin: 0 auto 1rem;
}

/* Horizontal layout for each printer slide */
.printer-slide-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

/* Image column in the printer slide */
.printer-image img {
    width: 40vw;
    max-width: 350px;
    height: auto;
}

/* Details column in the printer slide */
.printer-details {
    flex: 1 1 40%;
    text-align: left;
}

.printer-details h3 {
    margin-top: 0;
}

.printer-slide h3 {
    margin-bottom: 0.5rem;
    color: var(--heading);
}

.printer-slide ul {
    list-style: none;
    margin: 1rem 0 1.5rem;
    padding: 0;
}

.printer-slide li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.printer-slide li::before {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary);
    position: absolute;
    left: 0;
    top: 0;
}

.printer-control {
    background: rgba(0,0,0,0.4);
    color: #fff;
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s;
    position: relative;
    z-index: 2;
}

.printer-control:hover {
    background: rgba(0,0,0,0.6);
}

/* Furniture section */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.tab-btn {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.6rem 1.2rem;
    margin: 0 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.tab-btn.active,
.tab-btn:hover {
    background: var(--primary);
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.furniture-section .content-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.furniture-section .image img {
    width: 100%;
    max-width: 450px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.furniture-section .text {
    flex: 1;
    min-width: 280px;
}

.furniture-section .text h3 {
    margin-bottom: 0.5rem;
    color: var(--heading);
}

.furniture-section .text ul {
    list-style: none;
    margin: 1rem 0;
}

.furniture-section .text li::before {
    content: '\2022';
    color: var(--primary);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* Contact section */
.contact-section {
    background: var(--grey);
}

.contact-container {
    max-width: 1000px;
    margin: 0 auto;
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-details {
    flex: 1;
    min-width: 250px;
}

.contact-details h3 {
    margin-bottom: 1rem;
    color: var(--heading);
}

.contact-details p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: var(--text);
}

.contact-details i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.contact-details a {
    color: var(--primary);
    text-decoration: none;
}

.contact-form {
    flex: 1;
    min-width: 280px;
    background: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.6rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
    resize: none;
}

.contact-form button {
    width: 100%;
}

/* Required field indicator */
.required {
    color: #d32f2f;
    margin-left: 0.2rem;
}

/* Footer */
footer {
    background: var(--primary);
    color: #fff;
    padding: 2rem 1rem 1rem;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo img {
    width: 70px;
    margin-bottom: 0.5rem;
}

.footer-logo p {
    max-width: 300px;
    line-height: 1.4;
    font-size: 0.9rem;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
}

.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.4rem;
}

.footer-links a {
    color: #d8e5f3;
    text-decoration: none;
    font-size: 0.9rem;
}

.footer-contact p {
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.footer-contact i {
    margin-right: 0.5rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 1rem;
    color: #d8e5f3;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }
    .nav-links {
        margin-top: 0.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    .printers-section .printer-wrapper,
    .furniture-section .content-wrapper,
    .contact-wrapper {
        flex-direction: column;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
}
