:root {
    --norwegian-blue: #0039a6;
    --norwegian-red: #ef2b2d;
    --norwegian-white: #ffffff;
    --warm-brown: #8b4513;
    --forest-green: #228b22;
    --cafe-gold: #d4af37;
}

/* Typography - Mobile First */
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    font-size: 18px; /* Base font size for better mobile readability */
}

/* Ensure all images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal scrolling */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

.hero-title,
.display-4,
.display-6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--bs-dark) 0%, var(--bs-secondary) 100%);
    min-height: 80vh;
}

.hero-icon {
    font-size: 15rem;
    color: var(--cafe-gold);
    opacity: 0.8;
}

.services-icon {
    font-size: 12rem;
    color: var(--bs-primary);
    opacity: 0.7;
}

/* Custom animations */
.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-image {
    animation: fadeInRight 1s ease-out 0.3s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Cards and sections */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Catering cards */
.catering-card {
    background: #2c3e50 !important; /* Light variant of site's dark blue */
    border: none;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.catering-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.catering-card .card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0;
}

.catering-price-badge {
    background: var(--cafe-gold) !important;
    color: #000 !important;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.catering-dish-list {
    list-style: none;
    padding-left: 0;
}

.catering-dish-list li {
    color: #e8e9ea;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
}

.catering-dish-list li:before {
    content: "•";
    color: var(--cafe-gold);
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 0.75rem;
    margin-top: -0.1rem;
}

.catering-cta-btn {
    background: var(--cafe-gold);
    border: none;
    color: #000;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.catering-cta-btn:hover {
    background: #b8941f;
    color: #000;
    transform: translateY(-1px);
}

/* Responsive layout for catering cards */
@media (max-width: 768px) {
    .catering-card .card-title {
        font-size: 1.25rem;
    }
    
    .catering-price-badge {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (min-width: 1200px) {
    .row.g-4 .col-xl-4:nth-child(3n+1) {
        clear: left;
    }
}

.menu-item {
    border-left: 4px solid transparent;
    transition: border-color 0.3s ease;
}

.menu-item:hover {
    border-left-color: var(--bs-primary);
}

/* Feature icons */
.feature-icon,
.service-icon,
.contact-icon {
    transition: transform 0.3s ease;
}

.feature-icon:hover,
.service-icon:hover,
.contact-icon:hover {
    transform: scale(1.1);
}

/* Norwegian-inspired design elements */
.section-header {
    position: relative;
}

.section-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--norwegian-red), var(--norwegian-blue));
    margin: 1rem 0;
}

/* Form styling */
.form-floating > .form-control:focus {
    border-color: var(--norwegian-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 57, 166, 0.25);
}

.form-floating > label {
    color: var(--bs-secondary);
}

/* Button customizations */
.btn-primary {
    background-color: var(--norwegian-blue);
    border-color: var(--norwegian-blue);
}

.btn-primary:hover {
    background-color: #002d7f;
    border-color: #002d7f;
}

/* Navigation active state */
.navbar-nav .nav-link.active {
    color: var(--cafe-gold) !important;
    font-weight: 500;
}

/* Social links */
.social-links a {
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    color: var(--bs-primary) !important;
    transform: translateY(-2px);
}

/* Contact form animations */
.contact-form .form-floating {
    animation: slideInLeft 0.6s ease-out;
}

.contact-info .contact-item {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Optimized font size for mobile */
    html {
        font-size: 18px !important;
    }
    
    body {
        font-size: 1.1rem !important;
        line-height: 1.7 !important;
    }
    
    /* Prevent zooming on small screens */
    .container, .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    
    .hero-icon {
        font-size: 8rem;
    }
    
    .services-icon {
        font-size: 6rem;
    }
    
    .display-4 {
        font-size: 3rem !important;
        line-height: 1.2;
    }
    
    .display-6 {
        font-size: 2.25rem !important;
        line-height: 1.3;
    }
    
    /* Optimized heading sizes for mobile */
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    h4 {
        font-size: 1.35rem !important;
    }
    
    h5 {
        font-size: 1.25rem !important;
    }
    
    h6 {
        font-size: 1.1rem !important;
    }
    
    /* Improved mobile layout */
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .lead {
        font-size: 1.15rem !important;
        line-height: 1.6;
    }
    
    /* Optimized button sizes for mobile */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1.1rem !important;
        min-height: 50px;
        margin-bottom: 0.5rem;
    }
    
    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1.25rem !important;
        min-height: 60px;
    }
    
    /* Full width buttons only in hero sections */
    .hero-section .btn {
        width: 100%;
    }
    
    /* Mobile navigation improvements */
    .navbar-toggler {
        padding: 0.5rem;
        font-size: 1.5rem;
        border-width: 2px;
    }
    
    .navbar-nav .nav-link {
        padding: 1rem 0.75rem;
        font-size: 1.2rem !important;
    }
    
    /* Menu item cards mobile optimization */
    .menu-item .card-title {
        font-size: 1.4rem !important;
        line-height: 1.2;
    }
    
    .menu-item .card-text {
        font-size: 1.1rem !important;
        line-height: 1.5;
    }
    
    /* Much larger badge sizing */
    .badge {
        font-size: 1.2rem !important;
        padding: 0.7rem 1.2rem;
        font-weight: 600;
    }
    
    /* Navigation improvements */
    .navbar-brand {
        font-size: 1.4rem !important;
    }
    
    .nav-link {
        font-size: 1.2rem !important;
        padding: 1rem 1.25rem;
    }
    
    /* Hero section mobile optimization */
    .hero-section {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    /* Prevent cards from causing horizontal scroll */
    .card {
        max-width: 100%;
        word-wrap: break-word;
    }
    
    /* Ensure service items are responsive */
    .service-item {
        max-width: 100%;
        overflow-wrap: break-word;
    }
    
    /* Services section mobile */
    .service-item h5 {
        font-size: 1.4rem !important;
    }
    
    .service-item p {
        font-size: 1.1rem !important;
    }
    
    /* Alert mobile sizing */
    .alert {
        font-size: 1.1rem !important;
        padding: 1rem;
    }
    
    /* Image sizing for mobile */
    .card-img-top {
        height: 200px !important;
    }
    
    /* Larger text for all paragraphs */
    p {
        font-size: 1.1rem !important;
    }
    
    /* Footer text */
    .footer p, .footer small {
        font-size: 1rem !important;
    }
    
    /* Table text */
    table {
        font-size: 1.1rem !important;
    }
    
    /* List items */
    li {
        font-size: 1.1rem !important;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575px) {
    /* Optimized base font for very small screens */
    html {
        font-size: 15px !important;
    }
    
    body {
        font-size: 1rem !important;
    }
    
    .display-4 {
        font-size: 2.5rem !important;
    }
    
    .display-6 {
        font-size: 2rem !important;
    }
    
    h1 {
        font-size: 2.25rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    h3 {
        font-size: 1.75rem !important;
    }
    
    h4 {
        font-size: 1.5rem !important;
    }
    
    h5 {
        font-size: 1.35rem !important;
    }
    
    .lead {
        font-size: 1.3rem !important;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1.25rem !important;
    }
    
    .menu-item .card-title {
        font-size: 1.3rem !important;
    }
    
    .menu-item .card-text {
        font-size: 1.05rem !important;
    }
    
    .badge {
        font-size: 1.05rem !important;
        padding: 0.6rem 0.9rem;
    }
    
    .btn {
        font-size: 1.15rem !important;
        padding: 0.8rem 1.4rem;
        min-height: 55px;
    }
    
    .btn-lg {
        font-size: 1.3rem !important;
        padding: 1rem 1.8rem;
        min-height: 65px;
    }
    
    .navbar-brand {
        font-size: 1.3rem !important;
    }
    
    .nav-link {
        font-size: 1.15rem !important;
    }
    
    .card-img-top {
        height: 180px !important;
    }
    
    /* Hero section for very small screens */
    .hero-section {
        min-height: 65vh;
        padding: 2.5rem 0;
    }
    
    .hero-icon {
        font-size: 7rem;
    }
    
    /* Larger text for all elements */
    p {
        font-size: 1.15rem !important;
    }
    
    li {
        font-size: 1.1rem !important;
    }
    
    /* Alert sizing */
    .alert {
        font-size: 1.15rem !important;
        padding: 1.25rem;
    }
    
    /* Service items */
    .service-item h5 {
        font-size: 1.35rem !important;
    }
    
    .service-item p {
        font-size: 1.15rem !important;
    }
}

/* Loading animations */
.menu-section {
    opacity: 0;
    animation: fadeIn 0.8s ease-out forwards;
}

.menu-section:nth-child(1) { animation-delay: 0.1s; }
.menu-section:nth-child(2) { animation-delay: 0.2s; }
.menu-section:nth-child(3) { animation-delay: 0.3s; }
.menu-section:nth-child(4) { animation-delay: 0.4s; }
.menu-section:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Custom utility classes */
.min-vh-75 {
    min-height: 75vh;
}

.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Badge customizations */
.badge {
    font-size: 0.85em;
    font-weight: 500;
}

/* Alert customizations */
.alert {
    border-radius: 10px;
    border: none;
}

/* CTA section */
.cta-content {
    background: linear-gradient(135deg, var(--norwegian-blue), var(--norwegian-red));
    position: relative;
    overflow: hidden;
}

.cta-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>') repeat;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Restore Bootstrap behavior for carousel */
.carousel,
.carousel-inner,
.carousel-item {
    height: auto;
    background: transparent;
}

.carousel-item {
    display: none;
    position: relative;
}

/* Center the image with a child wrapper, not on .carousel-item */
.carousel-center {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Keep whole image visible, adaptive height, no crop */
.carousel-img {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 45vh;
    object-fit: contain;
    object-position: center center;
    background: transparent;
}

@media (max-width: 576px) {
    .carousel-img { 
        max-height: 35vh; 
    }
}

/* Catering Gallery */
.catering-gallery-section {
    background-color: #0b1d36; /* match page navy */
}

.catering-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    justify-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.catering-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.catering-thumb:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .catering-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
}

/* Modal Navigation Styling */
#prevImage, #nextImage {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#prevImage:hover, #nextImage:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: white;
    transform: scale(1.1);
}

#prevImage i, #nextImage i {
    font-size: 1.2rem;
}

/* Hide navigation on small screens to prevent overlap */
@media (max-width: 576px) {
    #prevImage, #nextImage {
        width: 40px;
        height: 40px;
    }
    
    #prevImage i, #nextImage i {
        font-size: 1rem;
    }
}

/* Social Media Links */
.social-links a {
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.social-links a[href*="facebook"]:hover {
    background-color: #1877f2;
}

.social-links a[href*="instagram"]:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-links a[href*="tripadvisor"]:hover {
    background-color: #00af87;
}
