/**
 * Tour Program Builder Widget Styles
 *
 * Professional, responsive, and print-friendly styles for the tour program widget.
 *
 * @package GcodeA
 * @since 1.0.0
 */

/* ========================================
   CONTAINER & LAYOUT
======================================== */

.tour-program-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ========================================
   PROGRAM HEADER
======================================== */

.tour-program-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tour-featured-image {
    width: 100%;
    height: 400px;
    overflow: hidden;
    position: relative;
}

.tour-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.6s ease;
}

.tour-featured-image:hover img {
    transform: scale(1.05);
}

.tour-program-meta {
    padding: 30px;
}

.tour-program-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.tour-program-info {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.tour-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #555;
    padding: 8px 15px;
    background: #f8f9fa;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.tour-info-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.tour-info-item i {
    color: #007bff;
    font-size: 1.1rem;
}

.tour-price {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}

.tour-price i {
    color: #fff;
}

.tour-seats {
    background: linear-gradient(135deg, #fd7e14 0%, #ffc107 100%);
    color: #fff;
    font-weight: 600;
}

.tour-seats i {
    color: #fff;
}

.tour-type-badge .badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-family {
    background: linear-gradient(135deg, #6f42c1 0%, #9b59b6 100%);
    color: #fff;
}

.badge-youth {
    background: linear-gradient(135deg, #e83e8c 0%, #fd7e14 100%);
    color: #fff;
}

.badge-luxury {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #fff;
}

.badge-budget {
    background: linear-gradient(135deg, #17a2b8 0%, #20c997 100%);
    color: #fff;
}

.badge-adventure {
    background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%);
    color: #fff;
}

.badge-cultural {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
}

.tour-program-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    padding: 20px;
    background: #fff;
    border-left: 4px solid #007bff;
    border-radius: 5px;
}

/* ========================================
   SECTION TITLES
======================================== */

.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 40px 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #007bff;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: #007bff;
    font-size: 1.6rem;
}

.subsection-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin: 20px 0 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subsection-title i {
    color: #007bff;
}

/* ========================================
   DAY CARDS
======================================== */

.tour-day-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.tour-day-card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.day-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.day-number {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.day-badge {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.day-date {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 0.95rem;
}

.day-date i {
    color: #007bff;
}

.day-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.3;
}

/* ========================================
   DAY GALLERY
======================================== */

.day-gallery {
    margin: 25px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '\f00e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 2rem;
    color: #fff;
    background: rgba(0, 123, 255, 0.9);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* ========================================
   DAY DESCRIPTION
======================================== */

.day-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    margin: 20px 0;
}

.day-description p {
    margin-bottom: 15px;
}

.day-description h1,
.day-description h2,
.day-description h3,
.day-description h4,
.day-description h5,
.day-description h6 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #333;
}

.day-description ul,
.day-description ol {
    margin: 15px 0;
    padding-left: 25px;
}

.day-description li {
    margin-bottom: 8px;
}

/* ========================================
   ACTIVITIES LIST
======================================== */

.day-activities {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid #007bff;
}

.activities-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.activities-list li {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.activities-list li:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(5px);
}

.activities-list li::before {
    content: '\f017';
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    color: #007bff;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ========================================
   MEALS SECTION
======================================== */

.day-meals {
    margin: 25px 0;
}

.meals-icons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.meal-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    border-radius: 25px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    transition: all 0.3s ease;
}

.meal-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.meal-item i {
    font-size: 1.2rem;
}

/* ========================================
   ACCOMMODATION SECTION
======================================== */

.day-accommodation {
    margin: 25px 0;
}

.hotel-info {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-top: 15px;
}

.hotel-image {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hotel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.hotel-details {
    flex: 1;
}

.hotel-name {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.hotel-rating {
    display: flex;
    gap: 3px;
}

.hotel-rating i {
    color: #ffc107;
    font-size: 1rem;
}

/* ========================================
   DAY NOTES
======================================== */

.day-notes {
    margin: 20px 0;
}

.alert {
    padding: 15px 20px;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.6;
}

.alert i {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert-info {
    background: #d1ecf1;
    border-left: 4px solid #17a2b8;
    color: #0c5460;
}

.alert-info i {
    color: #17a2b8;
}

.alert strong {
    font-weight: 600;
    margin-right: 5px;
}

/* ========================================
   SERVICES SECTION
======================================== */

.tour-services-section {
    margin: 40px 0;
}

.services-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.services-col {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.services-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.services-list li {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.3s ease;
}

.services-list li:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.included-list li i {
    color: #28a745;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 3px;
}

.excluded-list li i {
    color: #dc3545;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 3px;
}

.text-success {
    color: #28a745 !important;
}

.text-danger {
    color: #dc3545 !important;
}

/* ========================================
   REQUIREMENTS SECTION
======================================== */

.tour-requirements-section {
    margin: 40px 0;
    padding: 30px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 10px;
}

.requirements-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 0 0;
}

.requirements-list li {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.requirements-list li i {
    color: #ffc107;
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 3px;
}

/* ========================================
   CANCELLATION SECTION
======================================== */

.tour-cancellation-section {
    margin: 40px 0;
    padding: 30px;
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    border-radius: 10px;
}

.cancellation-content {
    margin-top: 15px;
    line-height: 1.8;
}

.cancellation-content p {
    margin-bottom: 10px;
}

/* ========================================
   CONTACT & BOOKING SECTION
======================================== */

.tour-contact-booking {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border-radius: 15px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.3);
}

.contact-info {
    margin-bottom: 25px;
}

.tour-contact-booking .section-title {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.tour-contact-booking .section-title i {
    color: #fff;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 1.05rem;
}

.contact-item i {
    font-size: 1.2rem;
    width: 30px;
    text-align: center;
}

.contact-item a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.contact-item a:hover {
    color: #ffc107;
    text-decoration: underline;
}

.booking-button-wrapper {
    text-align: center;
    margin-top: 30px;
}

.tour-booking-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 18px 50px;
    background: #ffc107;
    color: #000;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tour-booking-btn:hover {
    background: #ffb300;
    color: #000;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(255, 193, 7, 0.5);
}

.tour-booking-btn i {
    font-size: 1.3rem;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .tour-program-container {
        padding: 15px;
    }

    .tour-featured-image {
        height: 300px;
    }

    .tour-program-title {
        font-size: 2rem;
    }

    .tour-program-info {
        gap: 10px;
    }

    .tour-info-item {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .day-title {
        font-size: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 10px;
    }

    .hotel-info {
        flex-direction: column;
    }

    .hotel-image {
        width: 100%;
        height: 200px;
    }

    .services-row {
        grid-template-columns: 1fr;
    }

    .tour-day-card {
        padding: 20px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .tour-featured-image {
        height: 250px;
    }

    .tour-program-title {
        font-size: 1.6rem;
    }

    .tour-program-meta {
        padding: 20px;
    }

    .tour-program-info {
        flex-direction: column;
        align-items: stretch;
    }

    .tour-info-item {
        width: 100%;
    }

    .section-title {
        font-size: 1.3rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .day-title {
        font-size: 1.3rem;
    }

    .day-badge {
        padding: 6px 15px;
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .meals-icons {
        flex-direction: column;
        align-items: stretch;
    }

    .meal-item {
        width: 100%;
        justify-content: center;
    }

    .tour-booking-btn {
        width: 100%;
        justify-content: center;
        padding: 15px 30px;
        font-size: 1.1rem;
    }

    .tour-day-card {
        padding: 15px;
        margin-bottom: 20px;
    }

    .services-col {
        padding: 20px;
    }
}

/* ========================================
   RTL SUPPORT
======================================== */

.rtl .tour-program-container {
    direction: rtl;
}

.rtl .tour-program-info {
    direction: rtl;
}

.rtl .tour-info-item {
    flex-direction: row-reverse;
}

.rtl .day-number {
    flex-direction: row-reverse;
}

.rtl .section-title {
    flex-direction: row-reverse;
}

.rtl .subsection-title {
    flex-direction: row-reverse;
}

.rtl .activities-list li {
    flex-direction: row-reverse;
}

.rtl .services-list li {
    flex-direction: row-reverse;
}

.rtl .requirements-list li {
    flex-direction: row-reverse;
}

.rtl .contact-item {
    flex-direction: row-reverse;
}

.rtl .meal-item {
    flex-direction: row-reverse;
}

.rtl .hotel-info {
    flex-direction: row-reverse;
}

.rtl .alert {
    flex-direction: row-reverse;
}

.rtl .tour-booking-btn {
    flex-direction: row-reverse;
}

.rtl .tour-program-description {
    border-left: none;
    border-right: 4px solid #007bff;
}

.rtl .day-activities {
    border-left: none;
    border-right: 4px solid #007bff;
}

.rtl .tour-requirements-section {
    border-left: none;
    border-right: 4px solid #ffc107;
}

.rtl .tour-cancellation-section {
    border-left: none;
    border-right: 4px solid #dc3545;
}

/* ========================================
   PRINT STYLES
======================================== */

@media print {
    .tour-program-container {
        max-width: 100%;
        padding: 0;
    }

    .tour-program-header,
    .tour-day-card,
    .services-col {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .tour-booking-btn,
    .contact-item a {
        color: #000 !important;
        text-decoration: underline;
    }

    .gallery-item::after {
        display: none;
    }

    .tour-day-card {
        page-break-inside: avoid;
    }

    .section-title {
        page-break-after: avoid;
    }
}

/* ========================================
   ACCESSIBILITY
======================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for keyboard navigation */
.tour-booking-btn:focus,
.contact-item a:focus,
.gallery-item:focus {
    outline: 3px solid #007bff;
    outline-offset: 3px;
}

/* ========================================
   ANIMATIONS
======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tour-day-card {
    animation: fadeIn 0.6s ease-out;
}

/* ========================================
   SMOOTH SCROLL
======================================== */

html {
    scroll-behavior: smooth;
}

/* ========================================
   IMAGE LOADING STATES
======================================== */

.tour-featured-image img[loading="lazy"],
.gallery-item img[loading="lazy"],
.hotel-image img[loading="lazy"] {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
