/*
Theme Name: Fourty Two
Author: Jūsu Vārds
Version: 1.1
*/

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    line-height: 1.6;
}

/* --- HEADER STYLING --- */
.site-header {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    
    /* FLEXBOX MAGIC */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Aligns everything to the left initially */
    
    padding: 20px 5%; /* 5% padding on sides */
}

/* --- SOCIAL ICONS (Left) --- */
.header-socials {
    display: flex;
    align-items: center;
    gap: 15px; 
    
    /* Add a divider line between socials and logo */
    padding-right: 20px;
    margin-right: 20px;
    border-right: 1px solid #444; 
}

.header-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.header-socials svg {
    width: 16px;
    height: 16px;
    fill: #bbb; /* Make icons soft grey */
    transition: fill 0.3s ease;
}

.header-socials a:hover {
    background: #0073aa;
}
.header-socials a:hover svg {
    fill: #fff;
}

/* --- LOGO (Next to Socials) --- */
.site-logo .custom-logo-link {
    display: block;
}
.site-logo img.custom-logo {
    max-height: 70px;
    width: auto;
}

/* --- MENU (Far Right) --- */
.main-navigation {
    /* CRITICAL: This pushes the menu to the far right side */
    margin-left: auto;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.main-navigation a {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.main-navigation a:hover {
    color: #0073aa;
}

/* Mobile: Hide socials on small screens to save space */
@media (max-width: 768px) {
    .header-socials {
        display: none;
    }
}

/* --- MENU STYLING --- */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px; /* Increased gap between menu items for elegance */
}

.main-navigation a {
    text-decoration: none;
    color: #fff; /* White text for dark header */
    font-weight: bold;
    text-transform: uppercase; /* Makes menu look more professional */
    font-size: 0.9rem;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.main-navigation a:hover {
    color: #0073aa; /* Blue hover effect */
}

/* --- LAYOUT & CONTENT --- */
.container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Footer */
.site-footer {
    background: #1a1a1a; /* Matches header */
    color: #bbb; /* Softer grey text */
    text-align: center;
    padding: 40px 20px;
    margin-top: 50px;
}

/* --- HERO SECTION --- */
.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #333;
    color: white;
    text-align: center;
    position: relative;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.6); 
    padding: 120px 20px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px auto;
    opacity: 0.9;
}

/* --- BUTTONS --- */
.btn {
    display: inline-block;
    padding: 14px 35px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    margin: 5px;
}

.btn-primary {
    background-color: #0073aa;
    color: white;
    border: 2px solid #0073aa;
}
.btn-primary:hover { 
    background-color: #005177; 
    border-color: #005177;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid white;
    color: white;
}
.btn-secondary:hover { 
    background-color: white; 
    color: #1a1a1a; 
}

.btn-white {
    background-color: white;
    color: #333;
}
.btn-white:hover { background-color: #f1f1f1; }

/* --- SERVICES SECTION --- */
.services-section {
    padding: 80px 0;
    background-color: #f4f6f8;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.services-grid {
    display: grid;
    /* This creates a responsive grid: 
       - Min width 320px
       - Max width 1 fraction of space
       - Automatically wraps on mobile */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* The Card Container */
.service-card {
    background: white;
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); /* Soft shadow */
    overflow: hidden; /* Ensures image corners stay rounded */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column; /* Stacks image on top of text */
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* The Image Area */
.service-img {
    height: 220px; /* Fixed height for consistency */
    width: 100%;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Crops image perfectly without stretching */
    transition: transform 0.5s ease;
}

/* Zoom effect on hover */
.service-card:hover .service-img img {
    transform: scale(1.05);
}

/* The Text Area */
.service-content {
    padding: 30px;
    text-align: left; /* Easier to read lists */
    flex-grow: 1; /* Ensures cards are equal height */
}

.service-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #1a1a1a;
    font-size: 1.5rem;
    text-align: center; /* Center the title */
    font-weight: 700;
}

.service-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-content ul li {
    margin-bottom: 12px;
    position: relative;
    padding-left: 25px;
    color: #555;
    font-size: 0.95rem;
}

.service-content ul li::before {
    content: "✔"; 
    color: #0073aa;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* --- CTA STRIP --- */
.cta-section {
    background-color: #0073aa;
    color: white;
    text-align: center;
    padding: 60px 20px;
}
.cta-section h3 {
    font-size: 2rem;
    margin-bottom: 10px;
}

/* --- HERO SLIDER --- */
.hero-section {
    position: relative;
    /* Remove the old background-image/color lines from here if present */
    background: #333; 
    overflow: hidden; /* Keeps images from spilling out */
}

/* The container that holds the images */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Sits at the bottom */
}

/* Individual Slide */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0; /* Hidden by default */
    transition: opacity 1.5s ease-in-out; /* Smooth fade effect */
}

/* The Active Slide (Visible) */
.hero-slide.active {
    opacity: 1;
}

/* The Text Overlay */
.hero-overlay {
    position: relative;
    z-index: 2; /* Sits on TOP of the slider */
    background: rgba(0, 0, 0, 0.5); /* Darken the images slightly */
    padding: 120px 20px;
}

/* --- CONTACT PAGE STYLING --- */

/* Page Header */
.contact-page-header {
    background-color: #f4f6f8;
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid #e1e1e1;
    margin-bottom: 50px;
}

.contact-page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #1a1a1a;
}

/* The Grid Layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two equal columns */
    gap: 40px;
    margin-bottom: 80px;
}

/* Left Side: Info Box */
.contact-info-box {
    background: #fff;
    padding: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-item .icon {
    background-color: #0073aa; /* Brand Blue */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0; /* Prevents icon from squishing */
}

.contact-item .icon svg {
    fill: #ffffff;
    width: 24px;
    height: 24px;
}

.contact-item .details h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #1a1a1a;
    font-weight: bold;
}

.contact-item .details p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

.contact-item .details a {
    color: #0073aa;
    text-decoration: none;
    font-weight: bold;
}
.contact-item .details a:hover {
    text-decoration: underline;
}

/* Right Side: Map */
.contact-map {
    height: 100%;
    min-height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr; /* Stack into 1 column */
    }
    
    .contact-map {
        min-height: 300px; /* Smaller map on phone */
    }
}

/* --- CATALOGUE GRID STYLING --- */

/* Page Title Area */
.page-header-section {
    background-color: #f4f6f8;
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid #e1e1e1;
    margin-bottom: 50px;
}
.page-header-section h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #1a1a1a;
}

/* The Grid Container */
.catalog-grid {
    display: grid;
    /* This automatically fits as many cards as possible (min 280px wide) */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

/* The Card */
.catalog-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px; /* Rounded corners */
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.catalog-item:hover {
    transform: translateY(-5px); /* Moves up slightly */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Image */
.catalog-image {
    height: 220px;
    overflow: hidden;
    background-color: #eee;
}
.catalog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills the box */
    transition: transform 0.5s;
}
.catalog-item:hover .catalog-image img {
    transform: scale(1.05); /* Zoom effect */
}

/* Text & Button */
.catalog-content {
    padding: 25px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.catalog-content h3 {
    margin-top: 0;
    font-size: 1.2rem;
    color: #1a1a1a;
}

.catalog-content h3 a {
    text-decoration: none;
    color: inherit;
}

.catalog-excerpt {
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1; /* Pushes button down */
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box; /* Fixes padding issues */
}

/* --- ABOUT US PAGE STYLING --- */

.about-section {
    padding-bottom: 80px;
}

/* The Grid Layout */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 50% Image, 50% Text */
    gap: 60px; /* Space between them */
    align-items: center; /* Vertically center the text */
}

/* Image Styling */
.about-image {
    position: relative; /* Needed for the badge */
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15); /* Nice shadow */
}

/* Experience Badge (The Blue Box) */
.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background-color: #0073aa;
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.experience-badge .years {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Text Styling */
.about-content h2 {
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.about-content .entry-content {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 30px;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr; /* Stack vertically */
        gap: 40px;
    }

    .experience-badge {
        right: 20px; /* Bring badge inside so it doesn't get cut off */
        bottom: 20px;
    }
}