/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #585858;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: #3b82f6;
    border-bottom: 1px solid #5F5F5F;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

#header-container {
    display: grid;
    grid-template-columns: 1fr auto; /* Only logo and language toggle */
    align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 20px;
}

/* Logo area - Remove custom tooltip */
#logo-area {
    position: relative;
    display: flex;
    align-items: center;
}

#brand-logo {
    height: 40px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

#brand-logo:hover {
    opacity: 0.8;
}

/* Remove the custom tooltip styles */
/*
#logo-area::after {
    content: "Saaremaa, Estonia";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 0.5rem;
}

#logo-area::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid rgba(0, 0, 0, 0.9);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 0.25rem;
}

#logo-area:hover::after,
#logo-area:hover::before {
    opacity: 1;
    visibility: visible;
}
*/

/* Remove navigation styles since we removed nav */
#main-nav {
    display: none;
}

/* Language Toggle - Flag buttons only */
#language-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Increased gap between buttons */
    margin-right: 0; /* Remove margin - not needed with 2-column grid */
}

.lang-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%; /* Circular buttons */
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem; /* Larger flag emoji */
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lang-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05); /* Slight scale on hover */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lang-button.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
    transform: scale(1.1); /* Slightly larger when active */
}

/* Flag icon styling */
.flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    pointer-events: none; /* Prevent flag image from intercepting clicks */
}

/* Menu button styling */
#menu-btn {
    display: none !important; /* Force hide - not needed without nav menu */
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.menu-line {
    width: 24px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Remove old styles that are no longer needed */
.lang-flag,
.lang-text {
    /* These are no longer used */
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/images/backgrounds/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #333333;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0 0 0 / 0.4);
    backdrop-filter: blur(1px);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    margin-bottom: 1rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero text class */
.hero-text {
    font-size: 1.6rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 2rem;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: #1D1A21;
    color: white;
    padding: 3rem 0 1rem;
    margin: 0;
}

.footer-content {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.footer-section .logo-section {
    margin-bottom: 0.5rem;
}

.footer-logo {
    height: 40px;
    width: auto;
}

.footer-description {
    color: #9ca3af;
    line-height: 1.6;
    margin: 0;
    max-width: 400px;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Remove old grid styles that were causing the left alignment */
/* 
.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}
*/

/* Remove contact info styles since we removed the section */
.contact-info,
.contact-item,
.contact-label,
.contact-value {
    /* These are no longer needed */
}

/* Contact Modal - Updated styles */
.contact-modal {
    max-width: 600px;
    width: 95%;
    padding: 2rem;
}

.contact-modal h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #333;
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.contact-phone {
    text-align: center;
}

.contact-phone p {
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 1.1rem;
}

.phone-link {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 600;
    color: #3b82f6;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(59, 130, 246, 0.05);
}

.phone-link:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.contact-divider {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 1rem 0;
}

.contact-divider::before,
.contact-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.contact-divider span {
    padding: 0 1rem;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.contact-email {
    text-align: center;
    width: 100%;
}

.contact-email p {
    margin-bottom: 1rem;
    color: #666;
    font-size: 1.1rem;
}

/* Updated contact image styles */
.contact-image {
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

/* Remove old image modal styles since we're using a different approach */
.image-modal {
    max-width: 90%;
    width: auto;
    padding: 1rem;
    background: transparent;
    box-shadow: none;
}

/* Modal Styles */
.modal {
    display: none !important; /* Force hide by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* Only show modals when explicitly shown via JavaScript */
.modal.show {
    display: block !important;
}

/* Modal content */
.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Close button */
.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
    text-decoration: none;
}

/* Google Form Modal Styles - Updated without header text */
.google-form-modal {
    max-width: 650px;
    width: 95%;
    max-height: 95vh;
    overflow: hidden;
    padding: 0.5rem; /* Reduced padding since no header text */
}

.google-form-container {
    margin-top: 0; /* No margin needed without header */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: calc(95vh - 100px); /* More space for form */
}

.google-form-container iframe {
    border: none;
    border-radius: 8px;
    background: white;
    height: 100% !important;
    min-height: 600px;
}

/* Responsive updates */
@media (max-width: 768px) {
    .google-form-modal {
        width: 98%;
        margin: 1% auto;
        padding: 0.25rem; /* Even less padding on mobile */
        max-height: 98vh;
    }
    
    .google-form-container {
        height: calc(98vh - 80px); /* More space without header */
    }
    
    .google-form-container iframe {
        min-height: 500px;
    }
}

@media (max-width: 480px) {
    .google-form-modal {
        width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
        padding: 0.25rem;
    }
    
    .google-form-container {
        height: calc(100vh - 60px); /* Maximum space for form */
    }
    
    .google-form-container iframe {
        min-height: 400px;
    }
}

/* Footer - Keep only this version */
.footer {
    background: #1D1A21;
    color: white;
    padding: 3rem 0 1rem;
    margin: 0;
}

.footer-content {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.footer-section .logo-section {
    margin-bottom: 0.5rem;
}

.footer-logo {
    height: 40px;
    width: auto;
}

.footer-description {
    color: #9ca3af;
    line-height: 1.6;
    margin: 0;
    max-width: 400px;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Separator line for hero */
.separator {
    width: 100px;
    height: 2px;
    background: rgba(255, 255, 255, 0.7);
    border: none;
    margin: 1.5rem auto;
    border-radius: 1px;
}

/* Responsive Design Updates */
@media (max-width: 768px) {
    /* Increase header height on mobile to accommodate larger logo */
    #main-header {
        height: 80px;
    }
    
    #header-container {
        grid-template-columns: 1fr auto; /* Only logo and language toggle on mobile */
        padding: 0 15px;
        gap: 15px;
    }
    
    #language-toggle {
        gap: 0.5rem; /* Reduce gap on mobile */
        margin-right: 0; /* Remove margin on mobile */
    }
    
    #menu-btn {
        display: none; /* Ensure menu button is hidden on mobile */
    }
    
    .lang-button {
        width: 36px;
        height: 36px;
        font-size: 1.1rem;
    }
    
    .flag-icon {
        width: 18px;
        height: 14px;
    }
    
    /* Adjust hero section to account for taller header */
    .hero {
        padding-top: 80px;
        height: calc(100vh - 80px);
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
    
    .footer {
        padding: 2rem 0 1rem; /* Reduced top padding on mobile */
    }
    
    .footer-content {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    /* Further increase header height for very small screens */
    #main-header {
        height: 85px;
    }
    
    #header-container {
        padding: 0 20px;
        gap: 10px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    #brand-logo {
        height: 40px;
        max-width: 220px;
    }
    
    .lang-button {
        width: 32px;
        height: 32px;
    }
    
    .flag-icon {
        width: 16px;
        height: 12px;
    }
    
    /* Adjust hero section for smaller screens */
    .hero {
        padding-top: 85px;
        height: calc(100vh - 85px);
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
    
    .hero-text {
        font-size: 1.2rem;
    }
    
    .footer {
        padding: 1.5rem 0 1rem; /* Further reduced on small screens */
    }
}

/* Contact Image Modal Styles - Fixed to match actual HTML */
.image-modal {
    max-width: 90%;
    width: auto;
    padding: 1rem;
    background: transparent;
    box-shadow: none;
}

.contact-image {
    width: 100%;
    max-width: 600px; /* Sensible max width */
    max-height: 80vh; /* Don't exceed 80% of viewport height */
    height: auto;
    object-fit: contain; /* Maintain aspect ratio */
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: block;
    margin: 0 auto;
}

/* Ensure modal background is clickable around the image */
.modal .image-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

/* Remove the complex contact modal styles that don't match your HTML */
/* These styles are for a different contact modal structure */
/*
.contact-modal,
.contact-content,
.contact-phone,
.phone-link,
.contact-divider,
.contact-email {
    // Remove these - they don't match your HTML
}
*/
