/* Ceylon Trace Tour Generator Styles */
/* Based on the design structure provided */

:root {
    --primary-color: #2D5A57;
    --secondary-color: #E67E22;
    --accent-color: #F39C12;
    --background-white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --border-light: #E8F5E8;
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-medium: rgba(0, 0, 0, 0.15);
    --gradient-overlay: linear-gradient(135deg, rgba(45, 90, 87, 0.9), rgba(45, 90, 87, 0.7));
}

/* Container and Layout */
.ceylon-trace-tour-result {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--background-white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 0;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 300"><path d="M0,100 C300,200 700,0 1000,100 L1000,300 L0,300 Z" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
    background-position: bottom;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-overlay);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.tour-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
}

.tour-tagline {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    font-weight: 300;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.tour-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.meta-item {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Introduction Section */
.intro-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, #f8f9fa, var(--background-white));
}

.intro-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.intro-content h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 600;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 2rem;
}

.intro-text p {
    margin-bottom: 1.5rem;
}

/* Price Summary Card */
.price-summary {
    position: sticky;
    top: 2rem;
}

.price-card {
    background: var(--background-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px var(--shadow-light);
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.price-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 48px var(--shadow-medium);
}

.price-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.price-section {
    margin-bottom: 2rem;
}

.price-section h4 {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

.price-list {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-dark);
    white-space: pre-line;
}

.total-cost {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.book-now-btn {
    width: 100%;
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.book-now-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.book-now-btn:hover::before {
    left: 100%;
}

.book-now-btn:hover {
    background: #D35400;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230, 126, 34, 0.3);
}

/* Highlights Section */
.highlights-section {
    padding: 80px 0;
    background: var(--background-white);
}

.highlights-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-weight: 600;
}

.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.highlight-item {
    background: var(--background-white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    text-align: center;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.highlight-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.highlight-item:hover::before {
    transform: scaleX(1);
}

.highlight-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px var(--shadow-medium);
}

/* Itinerary Section */
.itinerary-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, #f8f9fa, var(--background-white));
}

.itinerary-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-weight: 600;
}

.itinerary-timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.itinerary-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
    border-radius: 2px;
}

.day-card {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    position: relative;
}

.day-card:nth-child(even) {
    flex-direction: row-reverse;
}

.day-card:nth-child(even) .day-content {
    text-align: right;
}

.day-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    position: relative;
    z-index: 2;
    margin: 0 2rem;
    box-shadow: 0 4px 16px var(--shadow-light);
}

.day-content {
    flex: 1;
    background: var(--background-white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px var(--shadow-light);
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    position: relative;
}

.day-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 15px solid transparent;
}

.day-card:nth-child(odd) .day-content::before {
    right: -15px;
    border-left-color: var(--background-white);
    transform: translateY(-50%);
}

.day-card:nth-child(even) .day-content::before {
    left: -15px;
    border-right-color: var(--background-white);
    transform: translateY(-50%);
}

.day-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px var(--shadow-medium);
}

.day-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.day-details {
    font-size: 1rem;
    line-height: 1.7;
}

.day-details > div {
    margin-bottom: 0.8rem;
    padding: 0.5rem 0;
}

.day-details strong {
    color: var(--primary-color);
    font-weight: 600;
}

.location {
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
    background: rgba(243, 156, 18, 0.1);
    border-radius: 0 8px 8px 0;
}

.activities {
    border-left: 4px solid var(--secondary-color);
    padding-left: 1rem;
    background: rgba(230, 126, 34, 0.1);
    border-radius: 0 8px 8px 0;
}

.accommodation {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    background: rgba(45, 90, 87, 0.1);
    border-radius: 0 8px 8px 0;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.contact-card {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-card h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.contact-card p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.contact-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 180px;
}

.contact-btn.primary {
    background: var(--background-white);
    color: var(--primary-color);
}

.contact-btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.contact-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.contact-btn:hover::before {
    left: 100%;
}

.contact-btn.primary:hover {
    background: #f8f9fa;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

.contact-btn.secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

/* Form Enhancements */
.default-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.default-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45, 90, 87, 0.3);
}

.default-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Error Message */
.error-message {
    background: #e74c3c;
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-size: 1.1rem;
    margin-top: 2rem;
}

/* Loading Animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-loader {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .price-summary {
        position: static;
    }
    
    .highlights-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .itinerary-timeline::before {
        left: 40px;
    }
    
    .day-card {
        flex-direction: row !important;
    }
    
    .day-card .day-content {
        text-align: left !important;
    }
    
    .day-number {
        margin: 0 1rem 0 0;
    }
    
    .day-content::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .tour-title {
        font-size: 2rem;
    }
    
    .tour-tagline {
        font-size: 1.1rem;
    }
    
    .tour-meta {
        gap: 1rem;
    }
    
    .meta-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .intro-content h2 {
        font-size: 2rem;
    }
    
    .highlights-section h2,
    .itinerary-section h2 {
        font-size: 2rem;
    }
    
    .contact-card h3 {
        font-size: 2rem;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .day-number {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    .day-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 300px;
    }
    
    .tour-title {
        font-size: 1.5rem;
    }
    
    .tour-tagline {
        font-size: 1rem;
    }
    
    .intro-section,
    .highlights-section,
    .itinerary-section,
    .contact-section {
        padding: 40px 0;
    }
    
    .price-card {
        padding: 1.5rem;
    }
    
    .highlight-item {
        padding: 1.5rem;
    }
    
    .day-content {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .contact-section,
    .book-now-btn,
    .contact-buttons {
        display: none;
    }
    
    .hero-section {
        height: auto;
        padding: 2rem 0;
        background: var(--primary-color) !important;
    }
    
    .day-card {
        break-inside: avoid;
        margin-bottom: 2rem;
    }
    
    .highlight-item {
        break-inside: avoid;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --background-white: #1a1a1a;
        --text-dark: #e0e0e0;
        --text-light: #b0b0b0;
        --border-light: #333;
        --shadow-light: rgba(0, 0, 0, 0.3);
        --shadow-medium: rgba(0, 0, 0, 0.5);
    }
    
    .price-card,
    .highlight-item,
    .day-content {
        background: #2a2a2a;
        border-color: #444;
    }
    
    .contact-btn.primary {
        background: #2a2a2a;
        color: white;
    }
}

/* Accessibility Improvements */
.highlight-item:focus,
.day-content:focus,
.contact-btn:focus,
.book-now-btn:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .hero-section {
        background: #000;
        color: #fff;
    }
    
    .day-number {
        background: #000;
        color: #fff;
    }
    
    .contact-btn.primary {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
}