/* Styles for Lohjan Autoclean Oy */

body {
    font-family: Arial, sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    margin: 0;
    padding: 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: #111;
    border-bottom: 2px solid #005f73;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo h1 {
    margin: 0;
    font-size: 24px;
}

/* Restore desktop navigation layout */
.main-nav {
    display: flex;
    align-items: center;
    color: #ffffff;
    font-weight: bold;
    transition: color 0.3s;
    text-decoration: none;
}

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

.main-nav li {
    margin-left: 15px;
}

.main-nav a {
    text-decoration: none;
    color: #ffffff;
    font-weight: bold;
    transition: all 0.3s;
    padding: 8px 12px;
    border-radius: 5px;
    border: 1px solid transparent;
    display: inline-block;
    white-space: nowrap;
}

.main-nav a:hover {
    color: #fff;
    background-color: #005f73;
    border-color: #007bff;
}

/* Hero Section */
.hero {
    position: relative; /* Needed for absolute positioning of slides */
    background-color: #111;
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    overflow: hidden; /* Hide anything that might stick out */
}

.hero-bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    /* Add a subtle shadow to make text more readable */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 30px;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: #00aaff;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #0077cc;
}

/* General Section Styling */
.section-title {
    text-align: center;
    font-size: 36px;
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Services Section */
.content-section {
    padding: 50px 20px;
}

.services-grid, .ceramic-grid {
    display: grid;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch;
}

.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.ceramic-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.service-card {
    background-color: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1.5px solid #3a507e;
    transition: background-color 0.3s, border-color 0.3s;
    cursor: pointer;
}

.service-card:hover {
    border-color: #007bff;
    background-color: #1f3a6e;
    transform: none;
    box-shadow: none;
}

.service-card h3, .ceramic-card h3 {
    margin-top: 0;
    font-size: 20px;
    color: #00aaff;
}

.service-card p, .ceramic-card p {
    margin-bottom: 0;
    font-size: 16px;
}

.ceramic-card img, .ceramic-card .card-image {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px auto;
    flex-shrink: 0;
}

/* Reviews Section */
#arvostelut {
    /* No background color to alternate from the previous section */
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
    transition: opacity 0.5s ease-in-out;
}

.review-card {
    background-color: #2a2a2a;
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #333;
    display: flex;
    flex-direction: column;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.review-card.fading-out {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
}

.review-card .stars {
    color: #ffc107;
    font-size: 20px;
    margin-bottom: 15px;
}

.review-card p {
    font-style: italic;
    flex-grow: 1;
}

.review-card h4 {
    margin: 10px 0 0;
    font-style: italic;
    color: #ccc;
}

/* Ceramic Section */
#keraamiset {
    background-color: #111;
}

.ceramic-group {
    margin-bottom: 50px;
}

.ceramic-group-title {
    font-size: 28px;
    text-align: center;
    color: #00aaff;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #005f73;
}

.group-layout-container {
    display: flex;
    align-items: stretch;
    gap: 40px;
}

.group-layout-container .ceramic-grid {
    flex: 1.5; /* Give more space to cards, making description narrower */
}

.group-layout-container .group-description-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ceramic-group-description {
    text-align: left;
    max-width: 100%;
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
}

.ceramic-card {
    /* height: 100%; */
    background-color: #2a2a2a;
    border-radius: 8px;
    border: 1px solid #333;
    overflow: hidden;
    text-align: center;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    transition: background-image 1s ease-in-out;
}

.card-image {
    /* No longer needed */
}

.ceramic-card .card-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    box-sizing: border-box;
}

.ceramic-card img, .ceramic-card .card-image {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
    display: block;
    margin: 0 auto 10px auto;
    flex-shrink: 0;
}

/* Add an overlay for cards that have a background image */
.ceramic-card.has-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 50%);
    z-index: 1;
}

.ceramic-card.has-bg {
    background-color: transparent; /* Override the default background */
}

.ceramic-card.has-bg .card-content {
    background: transparent; /* No extra background for the one with the image */
}

.ceramic-card h3 {
    margin-top: 0;
    margin-bottom: auto;
}

.ceramic-card p {
    margin-top: auto;
    margin-bottom: 0;
}

.ceramic-card ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.ceramic-card li {
    padding: 5px 0;
}

/* Contact Section */
#yhteystiedot {
    padding: 40px 20px;
    background-color: #0d172a;
    margin-top: 40px; /* Add space above this section */
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-info, .addresses {
    flex: 1;
    min-width: 300px;
}

.contact-info h3, .addresses h3 {
    color: #00aaff;
    font-size: 24px;
}

/* Make all links in contact info and footer behave consistently */
.contact-info a, .footer-links a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-info a:hover, .footer-links a:hover {
    color: #00aaff;
}

.contact-info p, .addresses ul {
    margin: 15px 0;
}

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

.addresses li {
    padding: 0; /* Reset padding */
}

.addresses a,
.contact-info p a {
    display: inline-block;
    padding: 8px 12px;
    margin: 5px 0;
    border: 1.5px solid #3a507e;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    background: none;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.addresses a:hover, .addresses a:active,
.contact-info p a:hover, .contact-info p a:active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* Booking Form Section */
.booking-section {
    padding: 50px 20px;
    background-color: #111;
}

.booking-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: #2a2a2a;
    padding: 40px;
    border-radius: 8px;
}

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

.form-group label {
    display: block;
    font-size: 18px;
    margin-bottom: 10px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #333;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box; /* Important for padding and width */
}

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-group input[type="radio"] {
    opacity: 0;
    position: fixed;
    width: 0;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    padding: 10px 15px;
    border: 2px solid #555;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-group label:hover {
    border-color: #777;
    background-color: #3a3a3a;
}

.radio-group input[type="radio"]:checked + label {
    background-color: #005f73;
    border-color: #00aaff;
}

.booking-form .cta-button {
    width: 100%;
    padding: 15px;
    font-size: 16px;
}

/* Footer */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #333;
    flex-wrap: wrap;
}

.footer-links a {
    margin-left: 20px;
}

.footer-links a:hover {
    color: #00aaff;
}

/* Responsive Design */
/* Hide hamburger on desktop by default */
.hamburger-menu {
    display: none;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

@media (max-width: 768px) {
    header {
        /* Keep header layout simple, the top row will handle alignment */
        flex-direction: column;
        align-items: center;
        padding: 10px 20px;
    }

    .header-top-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    
    .logo h1 {
        font-size: 22px;
        margin: 0;
    }

    /* Show hamburger on mobile */
    .hamburger-menu {
        display: block;
    }

    /* --- Slide-out Navigation --- */
    .main-nav {
        position: fixed;
        top: 0;
        right: 0; /* Position it on the right edge */
        width: 80%;
        max-width: 320px;
        height: 100%;
        background-color: #1a1a1a;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5);
        transform: translateX(100%); 
        transition: transform 0.3s ease-in-out;
        z-index: 200;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 60px 0 0; /* Remove bottom padding */
    }

    .main-nav.is-active {
        transform: translateX(0); /* Slide in */
    }

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav li {
        margin: 0;
    }

    .main-nav a {
        display: block;
        padding: 15px 30px;
        font-size: 18px;
        color: #fff;
        border: 1px solid #3a507e;
        border-radius: 6px;
        margin: 10px 20px;
        background: none;
        transition: background 0.2s, color 0.2s, border-color 0.2s;
        text-align: center;
        text-decoration: none;
        font-weight: normal;
    }
    
    .main-nav .lang-switcher {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        margin: 0 !important;
        padding: 20px 0 !important;
        gap: 5px;
        border-top: 1px solid #333;
        background: none;
    }

    /* --- Hamburger to X Animation --- */
    .hamburger-menu {
        position: relative;
        z-index: 300; /* Ensure it's above the slide-out nav */
        border: none;
        background: transparent;
        padding: 15px;
    }

    .hamburger-menu span {
        display: block;
        width: 30px;
        height: 3px;
        margin: 5px 0;
        background-color: #fff;
        border-radius: 3px;
        transition: all 0.3s ease-in-out;
    }

    .hamburger-menu.is-active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger-menu.is-active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.is-active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content h2 {
        font-size: 32px;
    }

    .contact-container {
        flex-direction: column;
    }

    .radio-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .booking-form {
        grid-template-columns: 1fr;
    }

    .form-group {
        grid-column: 1 / -1;
    }
    .form-group input, .form-group select {
        width: calc(100% - 20px);
    }

    .modal-content {
        width: 90%;
        max-height: 80vh;
        overflow-y: auto;
    }

    .radio-group {
      flex-direction: column;
      align-items: flex-start;
      gap: 10px;
    }

    .contact-info a,
    .addresses a {
        font-size: 16px; /* Adjust font size for better readability on mobile */
    }

    .addresses a:hover {
        background-color: transparent;
        color: #00aaff;
    }

    .service-card, .ceramic-card {
        padding-top: 20px;
        padding-bottom: 20px;
    }
    .service-card h3, .ceramic-card h3,
    .service-card p, .ceramic-card p {
        word-break: break-word;
        overflow-wrap: anywhere;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
    .ceramic-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .ceramic-card img, .ceramic-card .card-image {
        max-width: 100%;
        max-height: 80px;
        object-fit: contain;
        margin-bottom: 8px;
    }
}

/* Modal Styles */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; 
    background-color: rgba(0,0,0,0.7); 
}

.modal-content {
    background-color: #2a2a2a;
    margin: 5% auto;
    padding: 40px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 8px;
    position: relative;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #fff;
    text-decoration: none;
}

/* Booking Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 18px;
    margin-bottom: 10px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #555;
    background-color: #333;
    color: #fff;
    font-size: 16px;
    box-sizing: border-box;
}

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-group input[type="radio"] {
    opacity: 0;
    position: fixed;
    width: 0;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    padding: 10px 15px;
    border: 2px solid #555;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-group label:hover {
    border-color: #777;
    background-color: #3a3a3a;
}

.radio-group input[type="radio"]:checked + label {
    border-color: #00aaff;
    background-color: #005f73;
}

.booking-form .cta-button {
    width: 100%;
    margin-top: 20px;
}

/* Adjustments for mobile */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 20px;
        margin-top: 15%;
    }
    .radio-group {
        flex-direction: column;
        gap: 15px;
    }
}

footer.content-section {
    background-color: #111;
}

#tfc-card {
    background-position: center 80%; /* Nudge the image down */
}

#inno-uhtft-card {
    background-size: contain;
    background-repeat: no-repeat;
}

#stardust-pcs2-card {
    background-size: contain;
    background-repeat: no-repeat;
    padding: 20px; /* Add padding to create space around the image */
}

#stardust-pcs5-card {
    background-size: contain;
    background-repeat: no-repeat;
    padding: 20px;
}

.ceramic-card h3 {
    padding: 0;
    margin: 0 0 10px 0;
}

@media (max-width: 992px) {
    .group-layout-container {
        flex-direction: column-reverse; /* Put description on top */
    }

    .group-layout-container .ceramic-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
    }

    .group-layout-container .group-description-wrapper {
        padding-top: 0;
    }
    
    .ceramic-group-description {
        text-align: center;
        margin-bottom: 30px;
    }
}

@media (min-width: 992px) {
    .ceramic-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.footer-bottom {
    text-align: center;
    padding: 15px 20px;
    background-color: #0d172a;
    color: #ccc;
    font-size: 0.9em;
    border-top: 1px solid #1a2a4c;
}

.footer-bottom a {
    color: #fff;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #1a2a4c;
    padding: 15px 0; /* Vertical padding, horizontal removed */
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    z-index: 1001;
    display: none; /* Will be changed to 'block' by JS */
}

.cookie-banner-content {
    max-width: 1200px; /* Same as the main content max-width */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    padding: 0 20px; /* Horizontal padding */
}

.cookie-banner p {
    margin: 0;
    flex-grow: 1;
}

.cookie-banner a {
    color: #4da6ff;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.cookie-banner button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    background-color: #007bff;
    color: white;
    transition: background-color 0.3s;
}

.cookie-banner button#decline-cookies {
    background-color: #6c757d;
}

.cookie-banner button:hover {
    opacity: 0.9;
}

.booking-form input[type="text"],
.booking-form input[type="email"],
.booking-form input[type="tel"],
.booking-form input[type="date"],
.booking-form select,
.booking-form textarea {
    width: 100%;
    padding: 12px;
    background-color: #1a2a4c;
    border: 1px solid #3a507e;
    border-radius: 5px;
    color: #fff;
    font-size: 1em;
    box-sizing: border-box; /* Important for padding to be inside the width */
}

.booking-form textarea {
    resize: vertical; /* Allow vertical resizing, but not horizontal */
    min-height: 100px;
}

.booking-form input:focus,
.booking-form select:focus,
.booking-form textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Attention Box Styles */
.attention-section {
    padding: 40px 20px;
}

.attention-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 25px;
    border: 1px solid #3a507e; /* Same border as form inputs */
    border-radius: 8px; /* Same radius as other elements */
    background-color: #1a2a4c; /* Same as card backgrounds */
}

.attention-box h3 {
    text-align: center;
    font-size: 1.4em;
    color: #fff;
    margin-top: 0;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.attention-box p {
    font-weight: bold;
    color: #eee;
    margin-bottom: 10px;
}

.attention-box ul {
    list-style-position: inside;
    padding-left: 0;
    margin: 0;
    color: #ccc;
}

.attention-box ul li {
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 25px;
}

.lang-btn {
    background: none;
    border: 1px solid #3a507e;
    color: #ccc;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}

.lang-btn.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.lang-btn:not(.active):hover {
    background-color: #1f3a6e;
}

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

.logo h1 {
    margin: 0;
    font-size: 1.8em;
    color: #fff;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.cta-button, .cookie-banner button {
    border: 1.5px solid #3a507e;
    border-radius: 6px;
    background: #007bff;
    color: #fff;
    font-weight: bold;
    padding: 12px 28px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    box-shadow: none;
    outline: none;
    margin: 10px 0;
}
.cta-button:hover, .cta-button:active, .cookie-banner button:hover, .cookie-banner button:active {
    background: #005f73;
    color: #fff;
    border-color: #007bff;
} 