/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family:'Times New Roman', Times, serif;
}

body {
    font-family:'Times New Roman', Times, serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('grass.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
}

/* Header styles */
header {
    background: #4a6b3f;
    color: white;
    padding: 0.5rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    background: #4a6b3f;
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    padding: 0.5rem 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav a:hover {
    background-color: rgba(255,255,255,0.2);
}

main {
    flex: 1;
    width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px); /* Subtract header and footer height */
    position: relative;
}

.content-wrapper {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    z-index: 1;
}

.lorem-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
}

.lorem-content h2 {
    color: #2c5530;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 3px solid #4a7c59;
    padding-bottom: 0.5rem;
}

.lorem-content h3 {
    color: #2c5530;
    font-size: 1.8rem;
    margin: 2rem 0 1rem 0;
    border-left: 4px solid #4a7c59;
    padding-left: 1rem;
}

.lorem-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
    color: #444;
}

/* Inline image inside text */
.inline-image {
    max-width: 40%;
    height: auto;
    display: block;
    margin: 1.5rem auto;
    border-radius: 10px;
}

@media (max-width: 768px) {
    .inline-image {
        max-width: 90%;
    }
}

section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h2 {
    color: #2c5530;
    margin-bottom: 1rem;
    font-size: 2rem;
    border-bottom: 3px solid #4a7c59;
    padding-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #4a7c59;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.product-card h3 {
    color: #2c5530;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

/* Footer */
footer {
    background-color: #4a6b3f;
    color: white;
    text-align: center;
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

/* Back Button */
.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #2c5530, #4a7c59);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Times New Roman', Times, serif;
}

.back-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 85, 48, 0.4);
    background: linear-gradient(135deg, #4a7c59, #2c5530);
}

.back-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(44, 85, 48, 0.3);
}

.back-button::before {
    content: '←';
    font-size: 1.2rem;
    font-weight: bold;
}

/* Button container for alignment */
.button-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* Clearfix for buttons - ensures buttons are on same line */
.lorem-content::after {
    content: '';
    display: table;
    clear: both;
}

/* Ensure buttons align on same baseline */
.prev-button,
.next-button {
    line-height: 1.5;
    min-height: 44px;
    box-sizing: border-box;
}

/* Next Button (bottom-right of content section) */
.next-button {
    background: linear-gradient(135deg, #2c5530, #4a7c59);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Times New Roman', Times, serif;
    float: right;
    margin-top: 1.5rem;
    margin-bottom: 0;
    vertical-align: top;
}

.next-button::after {
    content: '→';
    font-size: 1.1rem;
    font-weight: bold;
}

.next-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 85, 48, 0.4);
    background: linear-gradient(135deg, #4a7c59, #2c5530);
}

.next-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(44, 85, 48, 0.3);
}

/* Previous Button (bottom-left of content section) */
.prev-button {
    background: linear-gradient(135deg, #2c5530, #4a7c59);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 85, 48, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Times New Roman', Times, serif;
    float: left;
    margin-top: 1.5rem;
    margin-bottom: 0;
    vertical-align: top;
}

.prev-button::before {
    content: '←';
    font-size: 1.1rem;
    font-weight: bold;
}

.prev-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 85, 48, 0.4);
    background: linear-gradient(135deg, #4a7c59, #2c5530);
}

.prev-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(44, 85, 48, 0.3);
}

.link-text {
    color:#f8f9fa;
    text-decoration: none;
}

/* Rock Path */
.rock-path {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    flex-wrap: nowrap;
    width: auto;
    min-width: 800px;
    max-width: 95vw;
    overflow-x: visible;
    overflow-y: visible;
    padding: 2rem;
}

.rock {
    width: 99.36px;
    height: 99.36px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    pointer-events: auto;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Override inline positioning styles for rocks in flex container */
.rock-path .rock {
    left: auto !important;
    top: auto !important;
}

.rock-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20% 80% 30% 70% / 60% 40% 80% 20%;
    transition: transform 0.3s ease;
    pointer-events: none;
}

/* Decorative highlight removed - using images instead */

/* Decorative shadow removed - using ::after for tooltip instead */

/* Individual rock variations - applied to images */
.rock-1 .rock-image {
    border-radius: 25% 75% 35% 65% / 70% 30% 70% 30%;
}

.rock-1 {
    transform: rotate(-15deg);
}

.rock-2 .rock-image {
    border-radius: 40% 60% 20% 80% / 50% 50% 60% 40%;
}

.rock-2 {
    transform: rotate(20deg);
}

.rock-3 .rock-image {
    border-radius: 30% 70% 40% 60% / 80% 20% 50% 50%;
}

.rock-3 {
    transform: rotate(-10deg);
}

.rock-4 .rock-image {
    border-radius: 60% 40% 70% 30% / 40% 60% 30% 70%;
}

.rock-4 {
    transform: rotate(25deg);
    width: 129.168px;
    height: 129.168px;
}

.rock-5 .rock-image {
    border-radius: 20% 80% 50% 50% / 60% 40% 80% 20%;
}

.rock-5 {
    transform: rotate(-20deg);
}

/* Rock tooltip text */
.rock {
    position: relative;
}

.rock::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #f8f9fa;
    border: 3px solid #2c5530;
    color: #333 !important;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: bold;
    white-space: nowrap;
    min-width: fit-content;
    width: auto;
    box-sizing: border-box;
    display: inline-block;
    line-height: 1.2;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1006;
    margin-bottom: 10px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    backface-visibility: visible;
    will-change: opacity, visibility, transform;
    overflow: visible;
    pointer-events: none;
    text-align: center;
    font-family: 'Times New Roman', Times, serif;
}

/* Rock image tooltips - multiple images at different angles */
.rock-image-tooltip {
    position: absolute;
    width: 120px;
    height: 90px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1003;
    overflow: hidden;
    border: 2px solid #2c5530;
    transform-origin: center;
}

.rock-image-tooltip img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.rock-image-tooltip::after {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 6px solid transparent;
}

/* All images positioned above the rock with angled outer ones */
/* Note: rock-image is first child, so tooltips start at nth-child(2) */
.rock-image-tooltip:nth-child(2) {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px) rotate(-15deg);
    margin-bottom: 15px;
    z-index: 1004;
}

.rock-image-tooltip:nth-child(2)::after {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #2c5530;
}

.rock-image-tooltip:nth-child(3) {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    margin-bottom: 15px;
    z-index: 1005;
}

.rock-image-tooltip:nth-child(3)::after {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #2c5530;
}

.rock-image-tooltip:nth-child(4) {
    bottom: 100%;
    left: 50%;
    transform: translateX(20%) translateY(-10px) rotate(15deg);
    margin-bottom: 15px;
    z-index: 1004;
}

.rock-image-tooltip:nth-child(4)::after {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: #2c5530;
}

/* Tooltip arrow */
.rock::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #f8f9fa;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    z-index: 1007;
    margin-bottom: 10px;
    backface-visibility: hidden;
    will-change: opacity, visibility, transform;
}

/* Hover effects */
.rock:hover {
    transform: scale(1.5) rotate(0deg);
    z-index: 1001;
    cursor: pointer;
}


.rock:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px) translateZ(0);
}

.rock:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px) translateZ(0);
}

.rock:hover .rock-image-tooltip {
    opacity: 1;
    visibility: visible;
}

.rock:hover .rock-image-tooltip:nth-child(2) {
    transform: translateX(-120%) translateY(-15px) rotate(-15deg) translateZ(0);
}

.rock:hover .rock-image-tooltip:nth-child(3) {
    transform: translateX(-50%) translateY(-15px) translateZ(0);
}

.rock:hover .rock-image-tooltip:nth-child(4) {
    transform: translateX(20%) translateY(-15px) rotate(15deg) translateZ(0);
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
        padding: 0.5rem 0.75rem;
        line-height: 1.3;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
    
    main {
        padding: 1rem;
        min-height: calc(100vh - 100px);
        overflow-x: hidden;
    }
    
    .lorem-content {
        padding: 1.5rem;
    }
    
    .lorem-content h2 {
        font-size: 1.8rem;
    }
    
    .lorem-content h3 {
        font-size: 1.4rem;
    }
    
    .lorem-content p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    section {
        padding: 1rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile rock adjustments - allow horizontal scroll */
    .rock-path {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        min-width: 600px;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        padding: 3rem 2rem;
        padding-left: 2rem;
        padding-right: 2rem;
        justify-content: flex-start;
        gap: 30px;
        margin: 2rem 0;
        box-sizing: border-box;
    }
    
    main {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        min-height: 60vh;
        padding-left: 0;
        padding-right: 0;
    }
    
    .rock {
        width: 82.8px;
        height: 82.8px;
        flex-shrink: 0;
    }
    
    .rock:hover {
        transform: scale(1.2) rotate(0deg);
    }
    
    /* Mobile back button adjustments */
    .back-button {
        top: 15px;
        left: 15px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    /* Mobile image tooltip adjustments */
    .rock-image-tooltip {
        width: 80px;
        height: 60px;
    }
    
    /* Mobile button alignment - stack vertically */
    .prev-button,
    .next-button {
        float: none;
        display: block;
        width: 100%;
        margin-top: 1rem;
        text-align: center;
        justify-content: center;
    }
    
    .prev-button {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.2rem;
        padding: 0.4rem 0.5rem;
    }
    
    .lorem-content {
        padding: 1rem;
    }
    
    .lorem-content h2 {
        font-size: 1.5rem;
    }
    
    .lorem-content h3 {
        font-size: 1.2rem;
    }
    
    .lorem-content p {
        font-size: 0.9rem;
    }
    
    .rock-path {
        gap: 25px;
        min-width: 550px;
        padding: 2.5rem 1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
        margin: 1.5rem 0;
    }
    
    main {
        min-height: 50vh;
        padding-left: 0;
        padding-right: 0;
    }
    
    .rock {
        width: 66.24px;
        height: 66.24px;
    }
    
    .rock:hover {
        transform: scale(1.15) rotate(0deg);
    }
    
    /* Small mobile back button adjustments */
    .back-button {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    /* Small mobile image tooltip adjustments */
    .rock-image-tooltip {
        width: 60px;
        height: 45px;
    }
    
    .prev-button,
    .next-button {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .inline-image {
        max-width: 95%;
    }
}
