html, body {
    height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #fccd86; 
    color: #333;
    line-height: 1.6;
}

main {
    flex: 1;
}

footer {
    background: #2d3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    margin-top: auto;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-container p {
    margin: 0;
}


h1, h2, h3 {
    font-family: 'Lora', serif;
    font-weight: 700;
    color: #2d3e50; /* Dark blue/gray for headings */
}

.header {
    background: url('images/hero_image.jpg') center center no-repeat;
    background-size: cover;
    padding: 3rem 2rem; /* Increased padding to make the background higher */
    width: 100%;
    text-align: center;
    margin-bottom: 2rem;
}

.header-title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: #2d3e50;
}

.header-subtitle {
    font-size: 1.5rem;
    color: #2d3e50;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.services, .about-us, .projects, .contact, .certifications {
    background: #fff;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-item {
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.project-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.project-card img {
    max-width: 350px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Portfolio page styles */
.portfolio-container {
    margin-top: 2rem;
}

.portfolio-card-img {
    height: 140px;
    width: 100%;
    object-fit: cover;
    cursor: pointer;
    border: 5px solid white;
}

.certification-badge-img {
    height: 150px;
    width: 100%;
    object-fit: contain;
    padding: 1rem;
    background-color: white;
}

.certification-text {
    margin-bottom: 0.25rem;
}

.portfolio-title {
    font-family: 'Lora', serif;
    font-weight: 700;
}

.section-spacing {
    margin-bottom: 1rem;
}

/* Index page styles */
.project-card-container {
    display: flex;
    flex-direction: column;
}

.project-card-img-index {
    height: 200px;
    object-fit: cover;
    cursor: pointer;
}

.text-center-align {
    text-align: center;
}

.flex-grow {
    flex-grow: 1;
}


.contact form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact input, .contact textarea {
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.contact button {
    background-color: #2d3e50;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .project-grid, .service-grid {
        grid-template-columns: 1fr;
    }
    .container {
        padding: 0 1rem;
    }
    .project-card img {
        max-width: 100%;
        height: auto;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 10px 0;
    }

    .header {
        background-size: cover;
        padding: 4rem 1rem;
    }

    .certification-badge-img {
        height: 100px;
    }

    /* .certifications {
        margin-bottom: 1rem;
    } */
}

.nav-container {
    background-color: #fccd86; 
    padding: 1rem 0;    
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

nav ul {
    list-style-type: none;
    padding: 1rem 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    text-decoration: none;
    color: #2d3e50;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    padding: 1rem 0;
}

nav ul li a:hover {
    color: #ac8506;
}

nav ul li a.active {
    font-weight: bold;
    color: #ac8506;
}

.weather-info {
    color: #ffffff;
    margin-left: auto;
}



#backToTopBtn {
    display: none; /* Hidden by default */
    position: fixed; /* Fixed/sticky position */
    bottom: 100px; /* Place the button at the bottom of the page */
    right: 15px; /* Place the button 30px from the right */
    z-index: 9997; /* Make sure it does not overlap with chatbot */
    border: none; /* Remove borders */
    outline: none; /* Remove outline */
    background-color: #2d3e50; /* Set a background color */
    color: white; /* Text color */
    cursor: pointer; /* Add a mouse pointer on hover */
    padding: 30px; /* Some padding */
    border-radius: 10px; /* Rounded corners */
    font-size: 18px; /* Increase font size */
}

#backToTopBtn:hover {
    background-color: #555; /* Add a dark-grey background on hover */
}



/* ===========================
   ČATBOTA POP-UP LOGS
   =========================== */

/* pārklājums (fonu aptumšošana) */
#chatbot-overlay {
    display: none; /* paslēpts pēc noklusējuma */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9998;
}

/* konteiners – centrē čata logu uz ekrāna */
#chatbot-container {
    position: fixed;
    inset: 0;
    display: none; /* paslēpts pēc noklusējuma */
    justify-content: center;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    z-index: 9999;
}

/* poga stūrī, kas atver pop-up */
#chatbot-toggle-btn {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    background: #2d3e50;
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
    display: block !important;
    z-index: 2147483647 !important;
    transition: transform 0.3s ease;
    pointer-events: auto !important;
}

#chatbot-toggle-btn:hover {
    background: #1e293b;
    transform: scale(1.05);
}

/* pats čata logs */
#chatbot-window {
    width: min(460px, 90%);
    max-height: 90vh;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* galvene */
#chatbot-header {
    background: #dba555;
    color: #ffffff;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-title {
    font-weight: 600;
    font-size: 14px;
}

#chatbot-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
}

/* ziņu zona */
#chatbot-messages {
    padding: 10px;
    background: #f5f5f7;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ziņu burbuļi */
.message {
    max-width: 80%;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
}

/* bot ziņa (pa kreisi) */
.message.bot {
    align-self: flex-start;
    background: #ffffff;
    border: 1px solid #e5e7eb;
}

/* lietotāja ziņa (pa labi) */
.message.user {
    align-self: flex-end;
    background: #2d3e50;
    color: #ffffff;
}

/* ievades zona */
#chatbot-input-area {
    display: flex;
    border-top: 1px solid #e5e7eb;
    padding: 8px;
    gap: 6px;
    background: #ffffff;
}

#chatbot-input {
    flex: 1;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    padding: 8px 12px;
    font-size: 13px;
}

#chatbot-input:focus {
    outline: none;
    border-color: #2d3e50;
}

#chatbot-send-btn {
    background: #2d3e50;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
}

#chatbot-send-btn:hover {
    background: #1e293b;
}

/* "Raksta…" indikators */
.typing-indicator {
    font-size: 11px;
    color: #6b7280;
    padding-left: 4px;

}

/* Mobile responsive for chatbot */
@media (max-width: 768px) {
    #chatbot-window {
        width: 95%;
        max-height: 85vh;
    }
    
    #chatbot-input-area {
        padding: 8px;
        gap: 6px;
    }
    
    #chatbot-input {
        font-size: 14px;
        padding: 8px 10px;
        min-width: 0; /* Allow input to shrink */
    }
    
    #chatbot-send-btn {
        padding: 8px 12px;
        font-size: 13px;
        white-space: nowrap;
        flex-shrink: 0;
        min-width: 60px; /* Ensure button has minimum width */
    }
    
    .message {
        font-size: 14px;
        padding: 10px 12px;
    }
}