/* Main Styles for Mesterdent Website */

:root {
    --primary-color: #305568;
    --secondary-color: #f8f9fa;
    --accent-color: #ec6726;
    --dark-color: #212529;
    --light-color: #ffffff;
    --container-max-width: 1320px; /* Maximum width for containers */
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
    padding-top: 40px; /* Default padding for the header height */
    margin: 0;
    background-color: white;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Vollkorn', serif;
}

.layout {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 40px); /* Adjust for the header height */
    margin: 0;
    padding: 0;
}

main {
    flex: 1;
}

/* Container Styles - Center content horizontally */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    max-width: var(--container-max-width);
}

/* Header Styles */
#header {
    background-color: var(--primary-color);
    color: var(--light-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1001; /* Higher z-index to stay on top */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin: 0; /* Ensure no margin */
    border: none; /* Ensure no border */
    height: 40px; /* Explicitly set height */
    box-sizing: border-box; /* Include padding in height */
    font-size: 1rem; /* Explicitly set font size */
    line-height: 1.5; /* Explicitly set line height */
    display: flex; /* Added flex display */
    align-items: center; /* Vertically center all content */
}

#header .container {
    height: 100%; /* Ensure container takes full height of header */
}

#header .d-flex {
    height: 100%; /* Ensure flex containers take full height */
    align-items: center; /* Vertically center content */
}

#header svg {
    vertical-align: middle; /* Change from text-bottom to middle for better alignment */
    display: inline-block; /* Ensure consistent display */
}

#header span {
    display: inline-flex;
    align-items: center;
}

#header a {
    color: var(--light-color);
    text-decoration: none;
    display: inline-flex; /* Better alignment for links with icons */
    align-items: center;
    height: 100%; /* Ensure the a tag takes up full height */
}

#header a:hover {
    text-decoration: underline;
}

/* Brand name in the header */
.brand-name {
    font-family: 'Vollkorn', serif;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
    display: flex; /* Added flex display */
    align-items: center; /* Vertically center content */
}

.brand-name a {
    color: var(--light-color);
    text-decoration: none;
}

.brand-name a:hover {
    text-decoration: none;
    color: var(--accent-color);
    transition: color 0.3s ease;
}

/* Hero Section */
#hero {
    background-image: url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
    color: var(--light-color);
    padding: 150px 0;
    position: relative;
}

#hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

#hero > div {
    position: relative;
    z-index: 2;
}

#hero h1 {
    font-family: 'Vollkorn', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

/* Button Styles */
.alter-button-1 {
    background-color: var(--accent-color);
    color: var(--light-color);
    border: none;
    padding: 12px 24px;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.alter-button-1:hover {
    background-color: #d85919;
}

.alter-button-2 {
    background-color: transparent;
    color: var(--light-color);
    border: 2px solid var(--light-color);
    padding: 10px 24px;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.alter-button-2:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.default-button {
    background-color: var(--primary-color);
    color: var(--light-color);
    border: none;
    padding: 12px 24px;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.default-button:hover {
    background-color: #234557;
}

/* Section Styles */
section {
    padding: 80px 0;
}

section .container {
    margin-left: auto;
    margin-right: auto;
}

section h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    font-weight: 700;
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 15px;
}

section h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

/* Szolgaltatasaink Section */
#szolgaltatasaink {
    background-color: var(--secondary-color);
}

#szolgaltatasaink .card {
    border: none;
    border-radius: 8px;
    transition: transform 0.3s;
}

#szolgaltatasaink .card:hover {
    transform: translateY(-5px);
}

#szolgaltatasaink h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* Vizsgalat Section */
#vizsgalat {
    background-color: var(--light-color);
}

#vizsgalat img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.szam {
    background-color: var(--primary-color);
    color: var(--light-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin-bottom: 15px;
    position: relative;
}

.szam p {
    margin: 0;
    padding: 0;
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

#vizsgalat h4 {
    color: var(--primary-color);
    margin: 15px 0;
    text-align: center;
    font-weight: 600;
}

#vizsgalat p {
    text-align: center;
}

/* Arak Section */
#arak {
    background-color: var(--secondary-color);
}

#tablazat {
    background-color: var(--light-color);
    border-radius: 8px;
}

.table {
    margin-bottom: 0;
}

.table tr td:first-child {
    font-weight: 600;
}

.table tr td:last-child {
    text-align: right;
    font-weight: 700;
}

/* Kapcsolat Section */
#kapcsolat {
    background-color: var(--light-color);
}

#kapcsolat a {
    color: var(--primary-color);
    text-decoration: none;
}

#kapcsolat a:hover {
    text-decoration: underline;
}

#urlap {
    background-color: var(--secondary-color);
    border-radius: 8px;
}

/* Footer Styles */
footer {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 4rem 0;
}

footer h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--light-color);
    font-weight: 600;
}

footer address {
    font-style: normal;
    margin-bottom: 0;
}

footer p {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

footer .mt-4 {
    margin-top: 2.5rem !important;
}

footer a {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.2s ease;
    display: inline-block;
}

footer a:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.8);
}

footer .col-md-8 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Extra spacing for the copyright */
footer .mt-4:last-child {
    margin-top: 3rem !important;
}

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

.form-control {
    border-radius: 4px;
    padding: 10px;
    border: 1px solid #ced4da;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(48, 85, 104, 0.25);
}

/* Modal Styles */
.modal-header {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Modal Footer Button Styles */
.modal-footer {
    display: flex;
    justify-content: center;
    padding: 1rem;
}

.modal-footer button {
    height: 38px;
    padding: 0.375rem 0.75rem;
    margin: 0 0.25rem;
    display: inline-block;
}

.modal-footer .default-button {
    margin-left: 0.5rem;
}

/* Button ordering */
#backToCalendar {
    order: 1;
}

.modal-footer [data-bs-dismiss="modal"] {
    order: 0;
}

#continueToForm {
    order: 2;
}

/* Form select styling */
.form-select {
    border-radius: 4px;
    padding: 10px;
    border: 1px solid #ced4da;
    height: auto;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(48, 85, 104, 0.25);
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Navbar styling for pages that have it */
.navbar {
    position: fixed;
    top: 40px; /* Height of the header */
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin: 0; /* Ensure no margin */
    border: none; /* Ensure no border */
    border-top: none; /* Remove any top border */
    padding-top: 0; /* Remove top padding */
    padding-bottom: 0; /* Remove bottom padding */
    border-radius: 0; /* Ensure no radius */
    margin-top: -1px !important; /* Pull the navbar up to overlap with header's border */
    justify-content: center;
}

/* Target navbar specifically */
.navbar.navbar-expand-lg.navbar-light.bg-light {
    border-top: 0 !important;
    margin-top: 0 !important;
}

/* Additional fix for potential Bootstrap margin issues */
.bg-light {
    background-color: var(--secondary-color) !important;
    margin: 0 !important;
    padding: 0.5rem 0 !important;
}

/* Remove any gap that might cause the white line */
header {
    display: block;
    margin: 0;
    padding: 0;
    font-size: 0; /* Remove any whitespace */
    line-height: 0; /* Remove any line height */
}

/* Fix for pages with navbar */
body.has-navbar {
    padding-top: 88px; /* Adjusted for header + navbar height */
}

/* Fix for pages without navbar */
body.no-navbar {
    padding-top: 40px; /* Just the header height */
}

/* Clear all potential spacing issues in the header and navbar */
header, nav, .navbar-nav, .navbar-collapse, .navbar-brand, .container, .container-fluid {
    margin: 0;
    box-sizing: border-box;
}

/* Ensure navbar has appropriate background color */
.navbar-light.bg-light {
    background-color: #f8f9fa !important;
}

#header .px-3,
#header .px-xl-5 {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Calendar icon specific alignment */
#header .bi-calendar-event {
    transform: translateY(0px); /* Fine-tune vertical position */
    position: relative;
    top: -1px;
}

/* Fix for the d-inline-flex span that contains icon and text */
#header span.d-inline-flex {
    gap: 4px; /* Add proper spacing between icon and text */
    height: 100%;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #hero {
        padding: 100px 0;
    }
    
    #hero h1 {
        font-size: 1.8rem;
    }
    
    section {
        padding: 50px 0;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    /* Responsive adjustments for the header */
    #header .container {
        padding: 0 10px;
    }
    
    .brand-name {
        font-size: 1rem;
    }
    
    #header .px-3 {
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
}

/* For very small screens */
@media (max-width: 576px) {
    .brand-name {
        font-size: 0.9rem;
        letter-spacing: 0;
    }
    
    #header .container {
        padding: 0 5px;
    }
    
    #header svg {
        width: 14px;
        height: 14px;
    }
    
    #header {
        font-size: 0.85rem;
    }
}

/* Clear centering for navigation menu */
/* Override any other styles to ensure centering works */
.navbar-nav.mx-auto {
    float: none;
    text-align: center;
    margin: 0 auto;
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    width: auto !important;
}

.navbar-nav.mx-auto > .nav-item {
    float: none;
    display: inline-block;
    margin: 0 15px;
}

@media (max-width: 991.98px) {
    .navbar-nav.mx-auto {
        flex-direction: column !important;
    }
    
    .navbar-nav.mx-auto > .nav-item {
        margin: 5px 0;
    }
}

/* Final override for navbar center alignment */
.navbar .container {
    display: flex;
    justify-content: center;
}

.navbar-nav.mx-auto {
    display: flex !important;
    justify-content: center !important;
}

.navbar-nav.mx-auto .nav-item {
    margin: 0 20px;
}

.navbar-nav.mx-auto .nav-link {
    font-size: 16px;
    padding: 10px 0;
} 