/* Tenerife Ciguaña - Inspired by Punta del Lomo Design */
:root {
    --primary-color: #696A4E;
    --secondary-color: #e67e22;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    top: 0 !important; /* Prevent Google Translate from adding top margin */
}

/* Hide Google Translate elements */
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-logo-link,
.goog-te-gadget {
    display: none !important;
}

.skiptranslate {
    display: none !important;
}

#google_translate_element {
    display: none !important;
}

/* Ensure body doesn't get pushed down by Google Translate */
body {
    position: static !important;
}

/* Header */
header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo img {
    height: 75px;
    width: auto;
    object-fit: contain;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 35px;
    align-items: center;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 15px;
    padding: 8px 0;
    display: inline-block;
}

nav ul li a:hover {
    color: var(--primary-color);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    width: 280px;
    padding: 8px 0;
    z-index: 100;
    border-radius: 8px;
    margin-top: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease 0.2s;
    pointer-events: none;
}

.dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
    pointer-events: auto;
}

.dropdown-menu:hover {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    white-space: nowrap;
    transition: background 0.2s ease;
    font-size: 15px;
    border-radius: 0;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.dropdown-menu li a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.property-link {
    display: flex !important;
    align-items: center !important;
}

.property-thumb {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.property-link span {
    white-space: normal;
    line-height: 1.3;
}

.arrow {
    display: inline-block;
    transition: transform 0.3s ease;
    margin-left: 5px;
    vertical-align: middle;
}

.dropdown.open .arrow,
.dropdown:hover .arrow {
    transform: rotate(180deg);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 10px;
    flex-direction: column;
    justify-content: space-around;
    width: 35px;
    height: 35px;
    position: relative;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: 50% 50%;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* Hero Section */
.hero {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Ensure video iframe fills hero area completely */
.hero #video-container iframe {
    object-fit: cover !important;
}

/* Sections */
.section {
    padding: 80px 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 50px;
    color: var(--primary-color);
}

/* Property Grid */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.property-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.property-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.property-info {
    padding: 20px;
}

.property-info h3 {
    font-size: 22px;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.property-details {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    color: #666;
    font-size: 14px;
}

.property-header .property-details {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
}

.property-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--secondary-color);
    margin-top: 10px;
}

/* Property Page */
.property-header {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    color: #fff;
    text-align: center;
    margin-bottom: 0;
}

.property-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.property-header .container {
    position: relative;
    z-index: 2;
}

.property-header h1 {
    font-size: 48px;
    color: #fff;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin: 40px 0;
    position: relative;
}

/* Mobile Carousel Styles */
@media (max-width: 768px) {
    .gallery {
        display: block !important;
        margin: 20px 0;
        padding: 0;
    }

    .gallery .thumbnail-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        flex-direction: row !important;
        gap: 10px !important;
        overflow-x: auto;
        padding-bottom: 10px;
        width: 100%;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .gallery .thumbnail-grid::-webkit-scrollbar {
        display: none;
    }
    
    .gallery .thumbnail-grid img {
        flex: 0 0 160px;
        width: 160px;
        height: 120px;
        margin-right: 0;
        border-radius: 8px;
        object-fit: cover;
    }
    
    .gallery .thumbnail-grid img:last-child {
        margin-right: 20px;
    }
    
    /* Gallery indicators */
    .gallery-indicators {
        display: flex !important;
        justify-content: center !important;
        gap: 8px !important;
        margin: 15px 0 !important;
    }
    
    .gallery-dot {
        width: 8px !important;
        height: 8px !important;
        border-radius: 50% !important;
        background: #ddd !important;
        cursor: pointer !important;
        transition: background 0.3s !important;
    }
    
    .gallery-dot.active {
        background: var(--primary-color) !important;
    }
}

/* Desktop gallery layout: all images as scrollable thumbnails */
@media (min-width: 769px) {
    .gallery {
        margin: 40px 0;
    }
    
    .gallery .thumbnail-grid {
        display: flex;
        overflow-x: auto;
        gap: 15px;
        padding-bottom: 10px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .gallery .thumbnail-grid::-webkit-scrollbar {
        display: none;
    }
    
    .gallery .thumbnail-grid img {
        flex: 0 0 200px;
        height: 150px;
        object-fit: cover;
        border-radius: 8px;
        cursor: pointer;
        transition: transform 0.3s;
    }
    
    .gallery .thumbnail-grid img:hover {
        transform: scale(1.05);
    }
}

/* Booking Form */
.booking-section {
    background: var(--light-bg);
    padding: 40px;
    border-radius: 8px;
    margin: 40px 0;
}

.booking-form {
    display: grid;
    gap: 20px;
    max-width: 600px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn {
    padding: 14px 30px;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #d35400;
}

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

.btn-primary:hover {
    background: #1a252f;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: #fff;
    padding: 40px 20px 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Admin Panel */
.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-bg);
}

.login-form {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.admin-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-nav {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.admin-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.admin-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.admin-nav a:hover {
    color: var(--secondary-color);
}

.bookings-table {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.bookings-table table {
    width: 100%;
    border-collapse: collapse;
}

.bookings-table th,
.bookings-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.bookings-table th {
    background: var(--primary-color);
    color: #fff;
    font-weight: 600;
}

.bookings-table tr:hover {
    background: var(--light-bg);
}

.status-badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #ffeaa7;
    color: #d63031;
}

.status-confirmed {
    background: #55efc4;
    color: #00b894;
}

.status-cancelled {
    background: #fab1a0;
    color: #d63031;
}

/* Calendar */
.calendar {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    padding: 15px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.calendar-day:hover {
    background: var(--light-bg);
}

.calendar-day.blocked {
    background: #fab1a0;
    color: #d63031;
    cursor: not-allowed;
}

.calendar-day.available {
    background: #55efc4;
}

/* Messages */
.message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.message.success {
    background: #55efc4;
    color: #00b894;
}

.message.error {
    background: #fab1a0;
    color: #d63031;
}

/* Booking Section */
.booking-section {
    background: var(--light-bg);
    padding: 40px;
    border-radius: 8px;
    margin: 40px 0;
}

.booking-form {
    display: grid;
    gap: 20px;
    max-width: 600px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Lucide Icons */
.icon-inline {
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: text-bottom;
}

.icon-large {
    width: 48px;
    height: 48px;
}

/* List styling */
ul {
    list-style-type: disc;
    padding-left: 20px;
}

li {
    margin-bottom: 8px;
}

/* Booking Calendar */
.booking-calendar {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    margin: 20px 0;
}

.booking-calendar .calendar-header {
    text-align: center;
    margin-bottom: 10px;
}

.booking-calendar .calendar-header h4 {
    margin: 0;
    color: var(--primary-color);
    font-size: 16px;
}

.booking-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    min-height: 38px;
    padding: 2px;
    font-size: 13px;
    position: relative;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
}

.booking-day:hover {
    transform: scale(1.05);
    border-color: #b0b0b0;
}

.booking-day.available {
    background: #ffffff;
    color: #222222;
}

.booking-day.available:hover {
    background: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.booking-day.blocked {
    background: #cccccc;
    color: #222222;
    border-color: #999999;
}

.booking-day.booked {
    background: #666666;
    color: #ffffff;
    border-color: #555555;
}

/* Admin Calendar */
.admin-calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    border-radius: 6px;
    transition: all 0.2s ease;
    min-height: 50px;
    padding: 2px;
    font-size: 14px;
    position: relative;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
}

.admin-calendar-day:hover {
    transform: scale(1.05);
    border-color: #b0b0b0;
}

.admin-calendar-day.available {
    background: #ffffff;
    color: #222222;
}

.admin-calendar-day.available:hover {
    background: #f0f0f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.admin-calendar-day.blocked {
    background: #cccccc;
    color: #222222;
    border-color: #999999;
}

.admin-calendar-day.blocked:hover {
    background: #bbbbbb;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.admin-calendar-day.booked {
    background: #666666;
    color: #ffffff;
    border-color: #555555;
}

/* WhatsApp and Call Icons */
.contact-icon {
    display: inline-block;
    margin-left: 5px;
    text-decoration: none;
    font-size: 16px;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.contact-icon:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.contact-icon.call-icon {
    color: #27ae60;
}

.contact-icon.whatsapp-icon {
    color: #25d366;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        position: relative;
    }
    
    .mobile-menu-toggle {
        display: flex;
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        margin-right: 0;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        padding: 20px;
        gap: 0;
    }
    
    nav ul li {
        width: 100%;
        display: block;
        margin-bottom: 15px;
    }
    
    nav ul li a {
        display: block;
        padding: 10px 0;
    }
    
    nav ul.show {
        display: flex;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        padding-left: 15px;
        margin-top: 10px;
        display: none;
        border-radius: 0;
        background: transparent;
    }
    
    .dropdown-menu li a {
        padding: 12px 8px;
        font-size: 14px;
    }
    
    .property-thumb {
        width: 70px;
        height: 52px;
    }
    
    .dropdown.open .dropdown-menu {
        display: block;
    }
    
    .language-dropdown {
        width: 100%;
    }
    
    .language-btn {
        width: 100%;
        justify-content: center;
    }
    
    .language-menu {
        left: 0;
        right: 0;
        width: calc(100% - 40px);
        margin-left: 20px;
    }
    
    /* Fix booking form layout on mobile */
    .property-page-grid {
        display: block !important;
        gap: 20px !important;
    }
    
    .booking-section {
        padding: 20px;
        margin: 20px 0;
        order: -1; /* Move booking form above property description on mobile */
    }
    
    .booking-form {
        max-width: 100%;
        gap: 15px;
    }
    
    .property-price {
        font-size: 24px !important;
        margin: 15px 0 !important;
    }
    
    .property-header {
        height: 50vh;
        min-height: 300px;
    }
    
    .property-header h1 {
        font-size: 32px;
    }
}

/* Events page mobile styles */
@media (max-width: 768px) {
    /* Stack contact section vertically on mobile */
    .events-contact-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
    
    /* Reduce icon sizes in features section */
    .events-features .icon-large {
        font-size: 48px !important;
    }
    
    /* Adjust text sizes for mobile */
    .events-intro p {
        font-size: 16px !important;
    }
    
    /* Reduce section padding on mobile */
    .section {
        padding: 40px 20px;
    }
    
    /* Adjust hero text for mobile */
    .hero h1 {
        font-size: 36px;
    }
    
    .hero p {
        font-size: 18px;
    }
    
    /* Adjust hero height for mobile to fill the area properly */
    .hero {
        height: 50vh;
        min-height: 350px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .main-nav {
        padding: 15px 20px;
    }
    
    nav ul {
        gap: 20px;
        font-size: 14px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    /* Tablet booking form adjustments */
    .booking-section {
        padding: 30px;
    }
    
    .booking-form {
        gap: 18px;
    }
    
    .property-page-grid {
        gap: 30px;
    }
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    padding: 20px;
    transition: opacity 0.3s;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
    padding: 20px;
    transition: opacity 0.3s;
}

.lightbox-prev {
    left: 40px;
}

.lightbox-next {
    right: 40px;
}

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

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.animate {
    animation: fadeInUp 0.6s ease forwards;
}

/* Ensure elements are initially hidden */
.section,
.property-card,
.hero,
.booking-section,
.footer-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.animate,
.property-card.animate,
.hero.animate,
.booking-section.animate,
.footer-content.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Disable scroll animations on mobile for better visibility/performance */
@media (max-width: 768px) {
    .section,
    .property-card,
    .hero,
    .booking-section,
    .footer-content {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}
