/*
 * Global Stylesheet for Jale Pool Plaster website
 *
 * This file defines the colour palette, typography, layout utilities and
 * responsive rules to create a modern and cohesive design. Colours are
 * derived from deep blues and aquamarine tones reminiscent of a clean
 * swimming pool, paired with soft neutrals for contrast. The layout uses
 * flexbox and CSS grid for responsiveness across devices.
 */

/* Colour palette variables */
:root {
    --primary: #0f4c75;    /* deep blue for headers and footers */
    --secondary: #3282b8;  /* medium blue for accents */
    --accent: #bbe1fa;     /* light blue for highlights */
    --dark: #1b262c;       /* almost black for backgrounds */
    --light: #f7f9fc;      /* very light grey for section backgrounds */
    --white: #ffffff;
}

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

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background: var(--white);
}

h1, h2, h3, h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
    max-width: 800px;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 0;
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--dark);
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.nav-links li {
    margin-left: 1.5rem;
}

.nav-links a {
    color: var(--white);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a:focus {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero section */
.hero {
    height: 90vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

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

.btn {
    display: inline-block;
    background: var(--secondary);
    color: var(--white);
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.3s ease;
}

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

/* About section */
.about {
    background: var(--light);
    color: var(--dark);
}

.about h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.about p {
    text-align: center;
    margin: 0 auto;
}

/* Services section */
.services {
    background: var(--white);
}

.services h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 2rem;
}

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

.card {
    background: var(--light);
    padding: 2rem 1rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    color: var(--primary);
}

.card p {
    font-size: 0.95rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Gallery section */
.gallery {
    background: var(--light);
}

.gallery h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 2rem;
}

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

.gallery-grid img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-grid img:hover {
    transform: scale(1.04);
}

/* Testimonials section */
.testimonials {
    background: var(--white);
}

.testimonials h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 2rem;
}

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

.testimonial {
    background: var(--light);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    position: relative;
}

.testimonial p {
    font-style: italic;
    margin-bottom: 1.5rem;
}

.testimonial h4 {
    text-align: right;
    font-weight: 600;
    color: var(--primary);
}

/* Contact section */
.contact {
    background: var(--primary);
    color: var(--white);
}

.contact h2 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--accent);
}

.contact p {
    text-align: center;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

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

.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.social-links a {
    color: var(--accent);
    font-size: 1.1rem;
    margin: 0 0.75rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.social-links a:hover,
 .social-links a:focus {
    color: var(--white);
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--dark);
    color: var(--light);
    padding: 1rem 0;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

@media (min-width: 600px) {
    footer .container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}


/* Responsive styles */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 60px;
        right: 0;
        width: 100%;
        background: var(--dark);
        flex-direction: column;
        align-items: center;
        max-height: 0;
        overflow: hidden;
        transform-origin: top;
        transition: max-height 0.3s ease;
    }
    .nav-links.open {
        max-height: 300px;
    }
    .nav-links li {
        margin: 1rem 0;
    }
    .menu-toggle {
        display: block;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .card {
        padding: 1.5rem 1rem;
    }
    .gallery-grid img {
        height: 160px;
    }
}