/* Base CSS - Shared styles for both themes */

/* CSS Reset and Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Common spacing variables */
:root {
    --space-xs: 4px;
    --space-s: 8px;
    --space-m: 16px;
    --space-l: 32px;
    --space-xl: 64px;
    --border-radius: 4px;
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-heavy: 0 8px 32px rgba(0, 0, 0, 0.16);
    --container-max-width: 1110px;
    --container-padding: 30px;
    --transition: all 0.3s ease;
    --header-height: 72px;
}

/* Base Typography */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-color);
    margin-bottom: var(--space-m);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.2;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.3;
}

h4 {
    font-size: 1.25rem;
    line-height: 1.3;
}

/* Paragraphs and Text */
p {
    margin-bottom: var(--space-m);
}

a {
    color: #ffffff;
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

/* Layout Utilities */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--space-l);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-m);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border: none;
    border-radius: var(--border-radius);
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.btn-primary {
    background-color: var(--accent-color);
    border-color: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: var(--accent-color);
    color: #ffffff;
}

.btn-full-width {
    width: 100%;
    text-align: center;
}

/* Cards */
.card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-4px);
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-m) 0;
    min-height: 60px;
}

.logo {
    flex-shrink: 1;
    min-width: 60px;
    max-width: 25%;
}

.logo a {
    display: inline-block;
    transition: var(--transition);
    text-decoration: none;
}

.logo a:hover {
    transform: scale(1.05);
    opacity: 0.8;
}

.logo img {
    height: clamp(28px, 6vw, 45px);
    width: auto;
    display: block;
    transition: height 0.3s ease;
}

/* Navigation */
.navigation {
    display: flex;
    align-items: center;
    flex-shrink: 2;
    flex-grow: 1;
    min-width: 0;
    overflow: hidden;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: var(--space-m);
}

.nav-link {
    color: var(--text-color);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: var(--space-m);
    color: var(--text-color);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background-color: var(--accent-color);
    color: #ffffff;
}

/* Header Controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: var(--space-m);
    flex-shrink: 0;
    min-width: 60px;
}

.language-switcher {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.lang-btn {
    background: none;
    border: none;
    padding: var(--space-s) var(--space-m);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn.active {
    background-color: var(--accent-color);
    color: #ffffff;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-s);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 3px;
    background-color: var(--text-color);
    margin: 2px 0;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Section Spacing */
section {
    padding: var(--space-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-m);
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    margin-bottom: var(--space-xl);
    color: var(--text-color);
}

/* Forms */
.form-group {
    margin-bottom: var(--space-l);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-s);
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-m);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.1);
}

/* Footer */
.footer {
    background-color: var(--text-color);
    color: #ffffff;
    padding: var(--space-xl) 0 var(--space-l);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-section h3 {
    color: #ffffff;
    margin-bottom: var(--space-m);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--space-s);
}

.footer-section a {
    color: #cccccc;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: var(--space-m);
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-l);
    text-align: center;
    color: #cccccc;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 1000;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.cookie-consent.visible {
    opacity: 1;
    visibility: visible;
}

.cookie-content {
    background: #ffffff;
    padding: var(--space-xl);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-heavy);
    max-width: 500px;
    margin: var(--space-l);
    text-align: center;
}

.cookie-content h3 {
    margin-bottom: var(--space-m);
    color: var(--primary-color);
}

.cookie-buttons {
    display: flex;
    gap: var(--space-m);
    margin-top: var(--space-l);
    justify-content: center;
}

.cookie-buttons .btn-secondary {
    background-color: #ffffff;
    color: var(--text-color);
    border: 2px solid var(--border-color);
    backdrop-filter: none;
}

.cookie-buttons .btn-secondary:hover {
    background-color: var(--text-color);
    color: #ffffff;
    border-color: var(--text-color);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay {
    0%, 20% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay2 {
    0%, 40% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay3 {
    0%, 60% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeInDelay 1.5s ease-out;
}

.animate-fade-in-delay-2 {
    animation: fadeInDelay2 2s ease-out;
}

.animate-fade-in-delay-3 {
    animation: fadeInDelay3 2.5s ease-out;
}

.animate-fade-up {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease-out;
}

.animate-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */

/* Desktop scaling to prevent overlap */
@media (max-width: 1200px) {
    .nav-menu {
        gap: var(--space-s);
    }
    
    .nav-link {
        font-size: 12px;
        letter-spacing: 0.3px;
    }
}

@media (max-width: 1050px) {
    .nav-menu {
        gap: 12px;
    }
    
    .nav-link {
        font-size: 11px;
        letter-spacing: 0.2px;
    }
    
    .logo img {
        height: clamp(26px, 5vw, 40px);
    }
}

@media (max-width: 992px) {
    .nav-menu {
        gap: 8px;
    }
    
    .nav-link {
        font-size: 10px;
    }
}

/* Large Tablet - Navigation starts getting tight */
@media (max-width: 850px) {
    .nav-menu {
        gap: var(--space-s);
    }
    
    .nav-link {
        font-size: 12px;
    }
}

/* Medium Tablet - Hide less critical nav items */
@media (max-width: 750px) {
    .nav-menu li:nth-child(4) {
        display: none; /* Hide "About" */
    }
}

/* Small Tablet - Force mobile menu - DISABLED (using navigation.css instead) */
@media (max-width: 700px) {
    /* Old mobile menu CSS disabled - now handled by navigation.css */
    /*.navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 1px solid var(--border-color);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .navigation.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }*/
    
    .nav-menu {
        flex-direction: column;
        padding: var(--space-l);
        gap: var(--space-l);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        box-shadow: none;
        margin-top: var(--space-m);
    }
    
    .mobile-menu-toggle {
        display: flex !important;
    }
    
    .logo img {
        height: 38px;
    }
}

/* Large Phone Landscape - Optimize spacing */
@media (max-width: 600px) {
    .header-controls {
        gap: var(--space-s);
    }
}

/* Medium Phone - Further optimization */
@media (max-width: 500px) {
    .logo img {
        height: 35px;
    }
    
    .lang-btn {
        padding: 4px 8px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 35px;
    }
    
    .header-controls {
        gap: var(--space-s);
    }
    
    .lang-btn {
        padding: var(--space-xs) var(--space-s);
    }
}

@media (max-width: 400px) {
    .logo img {
        height: 32px;
    }
    
    .header-controls {
        gap: 8px;
    }
}

@media (max-width: 375px) {
    .logo img {
        height: 28px;
    }
}

/* Emergency fallback for very small screens */
@media (max-width: 320px) {
    .lang-btn:first-child {
        display: none; /* Hide "EN", keep "SL" for local market */
    }
    
    .header-controls {
        gap: 4px;
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: var(--space-m) 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    section {
        padding: var(--space-l) 0;
    }
}

@media (max-width: 480px) {
    .header-controls {
        gap: var(--space-s);
    }
    
    .lang-btn {
        padding: var(--space-xs) var(--space-s);
    }
}

/* Mobile Landscape Optimization */
@media (max-height: 500px) and (orientation: landscape) {
    .cookie-content {
        padding: var(--space-l);
        max-width: 600px;
    }
    
    .cookie-buttons {
        flex-direction: row;
        gap: var(--space-l);
    }
    
    .cookie-buttons .btn {
        flex: 1;
        padding: 10px 20px;
        font-size: 12px;
    }
}
