/*
Theme Name: Travel Agency
Theme URI: 
Description: Ett tema för resebyrån Dépaysement Tours med fokus på resor i Algeriet
Author: Richard Jörnkvist
Version: 1.0.0
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: travel_agency
*/

/* General Styles */
:root {
    --primary-color: #A0601A;
    --secondary-color: #6B3811;
    --accent-color: #BE9B7B;
    --light-color: #F5E6D3;
    --dark-color: #2C1810;
    --sand-color: #B69B82;
    --hover-orange: #D35400;
    --card-bottom-bg: #F0D5B5;
    --icon-color: #D4B595;
    --navbar-height: 85px;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    background-color: var(--light-color);
    padding-top: var(--navbar-height);
}

h1, h2, h3, h4, h5 {
    font-family: 'Lora', serif;
    font-weight: 600;
}

/* Watermark Icon Styles */
.watermark-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    opacity: 0.1;
    pointer-events: none;
}

.watermark-icon i {
    font-size: 15rem;
    color: var(--primary-color);
}

/* Contact Watermark Styles */
.contact-info {
    position: relative;
    overflow: hidden;
}

.contact-watermark {
    position: absolute;
    bottom: -20px;
    right: -20px;
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
}

.contact-watermark i {
    font-size: 12rem;
    color: #E67E22;
}

.contact-content {
    position: relative;
    z-index: 1;
}

/* Make text appear above watermark */
#about h2, #about p, #about .features {
    position: relative;
    z-index: 1;
}

/* Navbar Styles */
.navbar {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1030;
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--navbar-height);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
}

.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
    color: white !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hamburger Menu Styles */
.navbar-toggler {
    border: none;
    position: relative;
    z-index: 1031;
}

.navbar-toggler-icon {
    display: none;
}

.navbar-toggler::before,
.navbar-toggler::after {
    content: '';
    display: block;
    width: 30px;
    height: 3px;
    background-color: white;
    margin: 6px 0;
    transition: all 0.3s ease;
}

.navbar-toggler.active::before {
    transform: rotate(45deg) translate(5px, 5px);
}

.navbar-toggler.active::after {
    transform: rotate(-45deg) translate(5px, -5px);
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: none;
}

/* Mobile Menu Styles */
@media (max-width: 991px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--primary-color);
        opacity: 95%;
        padding: 60px 20px 20px;
        z-index: 1030;
        display: flex;
        align-items: flex-start;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .navbar-collapse.show {
        right: 0;
        transform: translateX(0);
    }

    .navbar-nav {
        width: 100%;
        margin-top: 20px;
    }

    .nav-link {
        padding: 1rem 0;
        font-size: 1.3rem;
        text-align: center;
        margin: 0.3rem 0;
    }

    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

/* Hero Section with Carousel */
.hero {
    position: relative;
    height: 500px;
    overflow: hidden;
    content-visibility: auto;
    contain-intrinsic-size: 500px;
}

#heroCarousel {
    height: 100%;
}

.carousel-inner,
.carousel-item {
    height: 100%;
}

.carousel-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Reducera JavaScript-arbete för animationer */
.carousel-fade .carousel-item {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.carousel-fade .carousel-item.active {
    opacity: 1;
}

/* Förbättra prestanda för kontroller */
.carousel-control-prev,
.carousel-control-next {
    opacity: 0.8;
    width: 3rem;
    height: 3rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    margin: 0 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 11;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 1.5rem;
    height: 1.5rem;
    background-size: 100%;
    filter: drop-shadow(0 0 1px rgba(0,0,0,0.5));
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

.carousel-indicators {
    z-index: 20;
    margin-bottom: 1rem;
    position: absolute;
    bottom: 40px; /* Increased for more space from the button */
    display: flex;
    justify-content: center;
    gap: 10px; /* Add some space between the dots */
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.7);
    border: 2px solid transparent;
}

.carousel-indicators button.active {
    background-color: white;
}

.carousel-indicators [data-bs-target] {
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    margin: 0 5px;
    cursor: pointer;
    display: inline-block;
}

.carousel-indicators [data-bs-target].active {
    background-color: white;
}

.hero-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10;
    display: flex;
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease;
    margin: 20px;
}

.hero p {
    font-size: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
    margin: 20px;
}

.hero .btn {
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: both;
    margin-bottom: 5rem; /* Increased for better spacing */
}

/* Destination Cards */
.destination-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
    margin-bottom: 2rem;
    background: white;
    height: 100%;
}

.destination-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.card-img-wrapper {
    overflow: hidden;
    height: 250px;
}

.destination-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.destination-card:hover img {
    transform: scale(1.1);
}

.card-body {
    padding: 1.5rem;
    background-color: white;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 6rem;
}

.card-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5.5rem;
    background-color: var(--card-bottom-bg);
    z-index: 0;
}

.card-body .btn {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    width: auto;
    min-width: 200px;
    text-align: center;
}

.card-title {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.btn-outline-primary {
    color: white;
    background-color: #E67E22;
    border-color: #E67E22;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    width: auto;
    min-width: 200px;
    text-align: center;
}

.btn-outline-primary:hover {
    background-color: var(--hover-orange);
    border-color: var(--hover-orange);
    color: white;
}

/* About Section */
.about-image {
    max-height: 400px;
    overflow: hidden;
}

.about-image img {
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* Notre Histoire Section Styles */
.h-2 {
    height: 4px;
}

.opacity-10 {
    opacity: 0.1;
}

.z-1 {
    z-index: 1;
}

.fw-500 {
    font-weight: 500;
}

.transition-transform {
    transition: transform 0.3s ease-in-out;
}

.hover-scale:hover {
    transform: scale(1.02);
}

#about .feature i {
    font-size: 1.25rem;
}

#about .display-4 {
    color: var(--primary-color);
}

#about .bg-primary {
    background-color: var(--primary-color) !important;
}

#about .text-primary {
    color: var(--primary-color) !important;
}

#about .feature:hover i {
    transform: scale(1.2);
    transition: transform 0.2s ease;
}

/* Contact Section */
.form-control {
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--sand-color);
    transition: all 0.3s ease;
    background-color: white;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(160, 96, 26, 0.25);
    border-color: var(--primary-color);
}

.contact-info {
    padding: 2rem;
    background: #E6D5C3;
    border-radius: 15px;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    color: var(--dark-color);
}

.contact-info i {
    color: var(--primary-color);
    margin-right: 10px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #E67E22;
    border-radius: 50%;
    transition: transform 0.3s ease, background-color 0.3s ease;
    text-decoration: none;
}

.social-link i {
    color: white;
    margin: 0;
    font-size: 1.2rem;
}

.social-link:hover {
    transform: translateY(-5px);
    background-color: var(--hover-orange);
}

/* Footer */
footer {
    background-color: var(--dark-color);
}

footer a {
    color: var(--sand-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color);
}

footer .input-group {
    max-width: 300px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Keyframe animation for sliding in from the left */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 0.95;
    }
}

/* Apply the animation to the navbar-collapse when it is shown */
.navbar-collapse {
    animation: slideInFromLeft 0.5s ease forwards; /* Adjust duration and easing as needed */
}

/* Custom Button Styles */
.btn-primary {
    background-color: #E67E22;
    border-color: #E67E22;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    color: white;
    width: auto;
    min-width: 200px;
    text-align: center;
}

.btn-primary:hover {
    background-color: var(--hover-orange);
    border-color: var(--hover-orange);
}

.btn-outline-primary {
    color: white;
    background-color: #E67E22;
    border-color: #E67E22;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    width: auto;
    min-width: 200px;
    text-align: center;
}

.btn-outline-primary:hover {
    background-color: var(--hover-orange);
    border-color: var(--hover-orange);
    color: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .contact-info {
        margin-top: 2rem;
    }

    .navbar {
        padding: 1rem 0;
        height: 70px;
    }

    /* .hero {
        height: 40vh;
    } */

    .watermark-icon i {
        font-size: 10rem;
    }

    .contact-watermark i {
        font-size: 8rem;
    }

    .about-image {
        max-height: 300px;
    }

    .about-image img {
        height: 300px;
    }

    .carousel-indicators {
        bottom: 40px; /* Increased for more space from the button */
    }

    .hero .btn {
        margin-bottom: 5rem; /* Increased for better spacing */
    }
}

@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }

    /* .hero {
        height: 35vh;
    } */

    .watermark-icon i {
        font-size: 8rem;
    }

    .contact-watermark i {
        font-size: 6rem;
    }

    .about-image {
        max-height: 250px;
    }

    .about-image img {
        height: 250px;
    }
}

/* Section Spacing */
section {
    padding: 0;
}

#destinations {
    background-color: var(--light-color);
    padding: 3rem 0;
}

#about {
    background-color: var(--sand-color);
    padding: 2rem 0;
}

#contact {
    padding: 3rem 0;
}

/* Additional Hover Effects */
.form-control:hover {
    border-color: var(--primary-color);
}


/* FORMULÄR - vid skickat meddelande */
/* Lyckat skickat meddelande */
.wpcf7-response-output.wpcf7-mail-sent-ok {
    background-color: #F5E6D3; /* Använder --light-color */
    color: #A0601A; /* Använder --primary-color */
    border: 2px solid #A0601A;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    margin: 1rem 0;
}

/* Felmeddelande vid misslyckat skick */
.wpcf7-response-output.wpcf7-mail-sent-ng,
.wpcf7-response-output.wpcf7-aborted {
    background-color: #FBE9E7;
    color: #6B3811; /* Använder --secondary-color */
    border: 2px solid #6B3811;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    margin: 1rem 0;
}

/* Valideringsfel (exempelvis tomma fält) */
.wpcf7-response-output.wpcf7-validation-errors,
.wpcf7-response-output.wpcf7-spam-blocked {
    background-color: #FDF2E9;
    color: #E67E22; /* Behåller orange för varningar men matchar knappfärgen */
    border: 2px solid #E67E22;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    margin: 1rem 0;
}

/* Validation error messages under fields */
.wpcf7-not-valid-tip {
    color: #6B3811; /* Använder --secondary-color */
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Contact Form Styling */
.contact-icon-wrapper {
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-icon-wrapper i {
    color: white;
    font-size: 1.2rem;
}

.contact-form .input-group-text {
    background-color: white;
    border: 1px solid var(--sand-color);
    border-right: 0;
    color: var(--primary-color);
}

.contact-form .form-control {
    border: 1px solid var(--sand-color);
}

.contact-form .input-group-text i {
    width: 16px;
}

.contact-form .form-control:focus,
.contact-form .form-control:focus + .input-group-text,
.contact-form .input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(160, 96, 26, 0.25);
}

.contact-form textarea.form-control {
    min-height: 120px;
}

.contact-form .btn-primary i {
    transition: transform 0.3s ease;
}

.contact-form .btn-primary:hover i {
    transform: translateX(5px);
}

/* Contact Form 7 input group styling */
.contact-form .input-group-text {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.contact-form .form-control {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

/* Prevent input group from wrapping on small screens */
.contact-form .input-group {
    flex-wrap: nowrap !important;
    margin-bottom: 0.25rem;
    position: relative;
    display: flex;
}

/* Add margin for scroll anchors to account for sticky header */
[id] {
    scroll-margin-top: 50px;
}

/* Alternatively, we can use scroll-padding if some anchors don't have IDs */
html {
    scroll-padding-top: 50px;
}

/* Contact Form 7 validation message positioning */
.wpcf7-not-valid-tip {
    width: 100%;
    margin-top: 0.25rem;
    position: relative;
    clear: both;
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
}

/* Ensure the validation message appears below the entire input group */
.contact-form .wpcf7-form-control-wrap {
    flex: 1;
    width: 100%;
    display: block;
}

/* Position the validation message properly */
.contact-form .wpcf7-form-control-wrap .wpcf7-not-valid-tip {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    margin-top: 0.25rem;
}

/* Add margin to input groups to accommodate validation messages */
.contact-form .input-group:not(:last-child) {
    margin-bottom: 2rem;
}

/* Override browser default validation popup */
.contact-form .form-control:invalid {
    margin-bottom: 0;
}

/* Newsletter Form Styling */
.newsletter-wrapper {
    margin-top: 1rem;
}

.newsletter-wrapper .wpcf7-form {
    margin: 0;
}

.newsletter-wrapper .input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100%;
    max-width: 400px;
}

.newsletter-wrapper .wpcf7-form-control-wrap {
    flex: 1;
}

.newsletter-wrapper input[type="email"] {
    height: 46px;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    font-size: 1rem;
    padding: 0.375rem 0.75rem;
}

.newsletter-wrapper input[type="submit"] {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
    border-top-right-radius: 30px !important;
    border-bottom-right-radius: 30px !important;
    margin: 0;
    padding: 0.375rem 1.5rem;
    min-width: auto;
    white-space: nowrap;
    font-weight: 500;
    height: 46px;
    background-color: #E67E22;
    border-color: #E67E22;
}

.newsletter-wrapper input[type="submit"]:hover {
    background-color: var(--hover-orange);
    border-color: var(--hover-orange);
}

.newsletter-wrapper .wpcf7-response-output {
    margin: 1rem 0 0;
    padding: 0.5rem;
    border: none;
    background-color: rgba(255,255,255,0.1);
    color: white;
}

/* Ensure text is visible */
footer p {
    color: white;
    margin-bottom: 1rem;
}

.newsletter-wrapper .wpcf7-response-output {
    margin: 1rem 0 0;
    padding: 0.5rem;
    border: none;
    background-color: rgba(255,255,255,0.1);
    color: white;
}

/* Custom Contact Form Styles - Match theme colors */
.contact-form-wrapper {
    max-width: 100%;
}

.contact-form .form-label {
    font-weight: 500;
    color: var(--dark-color); /* Use dark theme color instead of primary */
    margin-bottom: 0.5rem;
}

.contact-form .form-control {
    border: 1px solid var(--accent-color); /* Use theme accent color */
    border-radius: 4px; /* Smaller radius to match theme */
    transition: border-color 0.3s ease;
    background-color: rgba(255, 255, 255, 0.9);
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(160, 96, 26, 0.15);
    outline: none;
}


.contact-form .alert {
    border-radius: 4px;
    border: none;
    margin-bottom: 1rem;
}

.contact-form .alert ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.contact-form .alert li {
    margin-bottom: 3px;
}

/* Newsletter Form Styles - Restore original rounded button style */
.newsletter-form-wrapper {
    max-width: 100%;
}

.newsletter-form-wrapper .input-group {
    border-radius: 25px; /* Rounded newsletter form */
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.newsletter-form-wrapper .form-control {
    border: none;
    border-radius: 25px 0 0 25px; /* Rounded left side */
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.95);
}

.newsletter-form-wrapper .form-control:focus {
    box-shadow: none;
    border-color: transparent;
    background-color: white;
}


.newsletter-form-wrapper .alert-sm {
    padding: 0.5rem;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.newsletter-form-wrapper .alert ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

/* Destination Contact Form Styles - Match theme */
.destination-contact-form .form-label {
    color: var(--dark-color);
    font-weight: 500;
}

.destination-contact-form .form-control-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.9);
}

.destination-contact-form .form-control-sm:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.1rem rgba(160, 96, 26, 0.15);
    outline: none;
}

.destination-contact-form .btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    background-color: #E67E22; /* Same as Explorer Nos Voyages button */
    border-color: #E67E22;
    border-radius: 4px;
}

.destination-contact-form .btn-sm:hover {
    background-color: var(--hover-orange); /* Darker orange on hover */
    border-color: var(--hover-orange);
}
