/* Camí de Cavalls 360° Directory Listing Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: #f8f9fa;
    min-height: 100vh;
    color: #2c3e50;
    line-height: 1.6;
}

/* Header Styling */
h1 {
    background: white;
    padding: 2rem;
    margin: 0;
    text-align: center;
    font-size: 2.2rem;
    font-weight: 400;
    color: #2c5530;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-bottom: 2px solid #2c5530;
}

h1::before {
    content: "📁";
    margin-right: 0.5rem;
    font-size: 2rem;
}

h1::after {
  content: "Camí de Cavalls 360";
  display: block;
}

/* Container for the file listing */
pre {
    background: white;
    margin: 2rem auto;
    max-width: 1000px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0;
    border: 1px solid #e9ecef;
}

/* File/Directory Links */
pre a {
    display: inline-block;
    padding: 0.75rem 2rem;
    text-decoration: none;
    color: #495057;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
    width: 100%;
    border-bottom: 1px solid #f1f3f4;
    position: relative;
}

pre a:hover {
    background: #f8f9fa;
    color: #2c5530;
}

/* File Icons */
pre a::before {
    content: "📄";
    margin-right: 0.75rem;
    font-size: 1.1rem;
    display: inline-block;
    width: 1.5rem;
}

/* Directory Icons */
pre a[href$="/"]::before {
    content: "📁";
}

/* Image File Icons */
pre a[href$=".jpg"]::before,
pre a[href$=".jpeg"]::before,
pre a[href$=".png"]::before,
pre a[href$=".gif"]::before,
pre a[href$=".webp"]::before,
pre a[href$=".svg"]::before {
    content: "🖼️";
}

/* Video File Icons */
pre a[href$=".mp4"]::before,
pre a[href$=".avi"]::before,
pre a[href$=".mov"]::before,
pre a[href$=".webm"]::before {
    content: "🎬";
}

/* Archive File Icons */
pre a[href$=".zip"]::before,
pre a[href$=".rar"]::before,
pre a[href$=".tar"]::before,
pre a[href$=".gz"]::before {
    content: "📦";
}

/* Document File Icons */
pre a[href$=".pdf"]::before {
    content: "📕";
}

pre a[href$=".doc"]::before,
pre a[href$=".docx"]::before {
    content: "📘";
}

pre a[href$=".txt"]::before {
    content: "📝";
}

/* Code File Icons */
pre a[href$=".html"]::before,
pre a[href$=".css"]::before,
pre a[href$=".js"]::before,
pre a[href$=".json"]::before {
    content: "💻";
}

/* GPX/Route files */
pre a[href$=".gpx"]::before,
pre a[href$=".kml"]::before {
    content: "🧭";
}

/* Alternating Row Colors */
pre a:nth-child(even) {
    background: #fafbfc;
}

pre a:nth-child(odd) {
    background: white;
}

pre a:nth-child(even):hover,
pre a:nth-child(odd):hover {
    background: #f8f9fa;
}


/* Footer spacing */
body::after {
    content: "";
    display: block;
    height: 2rem;
}

img {
  display: none;
}
