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

:root {
    --primary-color: #1a73e8;
    --primary-dark: #1557b0;
    --secondary-color: #34a853;
    --danger-color: #ea4335;
    --warning-color: #fbbc04;
    /* Dark Theme Palette */
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --bg-primary: #1e1e1e;
    --bg-secondary: #2a2a2a;
    --border-color: #444;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #121212; /* Darker main background */
    min-height: 100vh;
    padding: 20px 40px;
    color: var(--text-primary);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: none; /* Remove shadow for dark mode */
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Header */
.header {
    background: linear-gradient(135deg, #3a416f 0%, #141727 100%);
    color: white;
    padding: 20px 40px; /* Adjusted padding */
    position: relative; 
    overflow: hidden;
}

.header-inner-container {
    display: flex;
    align-items: center;
    gap: 30px;
}

.header-content {
    flex-grow: 1;
    text-align: left;
}

.header h1 {
    font-size: 2.2rem; /* Slightly smaller */
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1rem;
    opacity: 0.8;
}

#header-slideshow {
    width: 120px; /* Adjusted size */
    height: 120px; /* Adjusted size to be square */
    border-radius: var(--radius-md); 
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), inset 0 0 5px rgba(0,0,0,0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    background-color: #222;
    background-size: cover; /* Use cover for a better look in a square */
    background-position: center;
    background-repeat: no-repeat;
    animation: slideshow 120s linear infinite;
    flex-shrink: 0; /* Prevent shrinking */
}

/* Tabs Navigation */
.tabs {
    display: flex;
    background: var(--bg-primary);
    border-bottom: 2px solid var(--border-color);
    overflow-x: auto;
}

.tab-button {
    flex: 1;
    padding: 16px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
}

.tab-button:hover {
    color: var(--primary-color);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--bg-secondary);
}

.tab-button.mobile-only {
    display: none; /* Hidden by default */
}

/* Tab Content */
.tab-content {
    padding: 30px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section */
.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Forms */
.form {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: var(--radius-md);
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

.form-group input[type="color"] {
    height: 50px;
    cursor: pointer;
    background: var(--bg-secondary);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: #fff;
}

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

.btn-danger:hover {
    background: #c5372c;
}

/* Teams Grid */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.team-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: none;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.team-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.team-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.team-color {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid var(--bg-secondary);
    box-shadow: var(--shadow-sm);
    background-color: #eee; /* Fallback background */
    overflow: hidden;
}

.team-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
}

.team-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.team-players {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--border-color);
}

.team-players-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.players-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.players-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 4px;
}

.player-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: var(--bg-primary);
    border-radius: 8px;
    transition: all 0.2s ease;
    border: 1px solid var(--border-color);
}

.player-item:hover {
    background: var(--bg-secondary);
    transform: translateX(4px);
}

.player-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
}

.player-stats {
    margin-left: 8px;
    padding: 2px 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0;
}

.player-item:hover .btn-icon {
    opacity: 1;
}

.btn-icon:hover {
    background: rgba(234, 67, 53, 0.1);
    transform: scale(1.2);
}

.empty-players {
    text-align: center;
    padding: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

.team-actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--border-color);
    display: flex;
    gap: 8px;
}

/* Matches Grid */
.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.match-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: none;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

.match-card:hover {
    box-shadow: none;
    transform: translateY(-5px);
    border-color: var(--primary-color);
}

.match-header {
    background: var(--bg-primary);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-color);
}

#upcomingMatches .match-card .match-header {
    background: var(--bg-primary); /* Use a light gray from theme variables */
    color: var(--text-primary); /* Dark text for contrast */
}


.match-date {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.95;
}

.match-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.match-status.scheduled {
    background: #3a3a3a;
    color: #e0e0e0;
}

.match-status.completed {
    background: #1e4620;
    color: #a7f3d0;
}

.match-body {
    padding: 32px 24px;
    position: relative;
}

.match-teams {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.match-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.team-shield {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    /* background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%); */ /* Removed background gradient */
    background-color: var(--bg-primary); /* Fallback background */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.4);
    position: relative;
    border: 3px solid var(--bg-primary);
    overflow: hidden; /* To contain the image */
}

.team-shield-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the image covers the entire circle */
    border-radius: 50%;
}

.match-team-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
    text-align: center;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.match-team-score {
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.match-vs {
    font-weight: 700;
    color: #444;
    font-size: 1.5rem;
}

.match-scorers {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.match-scorers-team {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-primary);
    border-radius: 8px;
    font-weight: 500;
}

.match-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
    display: flex;
    gap: 8px;
    justify-content: flex-end; /* Alinha o botão à direita */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.match-card:hover .match-actions,
.admin-mode .match-actions {
    opacity: 1;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Matches List */
.matches-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

/* Standings Table */
.table-container {
    overflow-x: auto;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.standings-table,
.scorers-table {
    width: 100%;
    border-collapse: collapse;
}

.standings-table thead,
.scorers-table thead {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.standings-table th,
.scorers-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

.standings-table td,
.scorers-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.standings-table tbody tr:hover,
.scorers-table tbody tr:hover {
    background: var(--bg-primary);
}

.standings-table td:first-child,
.scorers-table td:first-child {
    font-weight: 700;
    color: var(--primary-color);
}

/* Scorers List */
.scorers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scorer-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: none;
    border: 1px solid var(--border-color);
}

.scorer-position {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 40px;
}

.scorer-info {
    flex: 1;
}

.scorer-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.scorer-team {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.scorer-goals {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1a73e8;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    background-color: var(--bg-secondary);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Grand Final Section */
.grand-final-section {
    border-radius: var(--radius-lg);
    background: radial-gradient(circle, rgba(30,30,30,1) 0%, rgba(15,15,15,1) 100%);
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    border: 2px solid #c9b037;
    position: relative;
    overflow: hidden;
}

.grand-final-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.02),
        rgba(255, 255, 255, 0.02) 1px,
        transparent 1px,
        transparent 20px
    );
    animation: gradient-move 30s linear infinite;
}

@keyframes gradient-move {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.grand-final-section h2 {
    color: #f3d45a;
    text-align: center;
    font-size: 2rem; /* Reduced font size */
    font-weight: 300;
    margin-bottom: 1rem; /* Adjusted margin */
    text-transform: uppercase;
    letter-spacing: 3px; /* Adjusted spacing */
    text-shadow: 0 0 15px rgba(243, 212, 90, 0.5);
    position: relative;
    z-index: 1;
}

/* New Final Card Styles */
.final-card {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 1rem; /* Further reduced padding */
    position: relative;
    z-index: 1;
    border: 1px solid rgba(201, 176, 55, 0.3);
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    backdrop-filter: blur(5px);
}

.final-card.placeholder .final-team-shield {
    background-color: #444;
}

.finalist {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem; /* Further reduced gap */
    width: 100px; /* Further reduced width */
}

.final-team-shield {
    width: 70px; /* Further reduced size */
    height: 70px; /* Further reduced size */
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.15), inset 0 0 8px rgba(0,0,0,0.4);
    border: 3px solid #c9b037;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.final-team-shield .team-shield-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.final-team-name {
    font-size: 0.9rem; /* Further reduced font size */
    font-weight: 500;
    color: #fff;
    text-align: center;
    text-shadow: 0 0 5px rgba(0,0,0,0.7);
}

.versus-trophy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.versus-text {
    font-size: 1.2rem; /* Further reduced font size */
    font-weight: 700;
    color: #f3d45a;
    text-shadow: 0 0 8px rgba(243, 212, 90, 0.6);
    font-family: 'Times New Roman', Times, serif;
}

.final-trophy-img {
    width: 70px; /* Further reduced size */
    height: 70px; /* Further reduced size */
    object-fit: contain;
    filter: drop-shadow(0 0 15px #f3d45a);
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}



/* Score Section */
.score-section {
    margin-top: 24px;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 2px dashed var(--border-color);
}

.score-section h3 {
    margin-bottom: 16px;
    color: var(--text-primary);
}

#scorersList {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.scorer-input {
    display: grid;
    grid-template-columns: 2fr 1fr auto;
    gap: 12px;
    align-items: end;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Responsive */
@media (min-width: 769px) {
    .tab-button.mobile-only {
        display: none !important;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 0;
    }

    .header {
        padding: 25px;
    }

    .header-content {
        padding-right: 0; /* Remove padding on mobile */
        text-align: center; /* Center header content on mobile */
    }

    .header h1 {
        font-size: 1.8rem;
    }

    #header-slideshow {
        display: none; /* Hide slideshow on mobile */
    }

    .tab-content {
        padding: 20px 15px;
    }

    .tabs {
        overflow-x: auto;
    }

    .tab-button {
        font-size: 0.9rem;
        padding: 12px 16px;
    }

    .tab-button.mobile-only {
        display: flex; /* Show gallery button on mobile */
    }

    .section {
        margin-bottom: 30px;
    }

    .section h2 {
        font-size: 1.4rem;
        margin-bottom: 15px;
    }

    .matches-grid,
    .matches-list,
    .teams-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .scorer-input {
        grid-template-columns: 1fr;
    }

    .match-team-score {
        font-size: 2.5rem;
    }

    .team-shield {
        width: 56px;
        height: 56px;
    }

    .match-body {
        padding: 24px 16px;
    }

    .match-header {
        font-size: 0.65rem;
        padding: 10px 16px;
    }

    .match-date {
        font-size: 0.7rem;
    }

    .standings-table th, .scorers-table th,
    .standings-table td, .scorers-table td {
        padding: 12px 10px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .header {
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .tab-button {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    
    .tab-content {
        padding: 15px 10px;
    }

    .section h2 {
        font-size: 1.2rem;
    }

    .match-body {
        padding: 16px;
    }

    .match-teams {
        gap: 12px;
    }
    
    .team-shield {
        width: 48px;
        height: 48px;
    }
    
    .match-team-name {
        font-size: 0.85rem;
        min-height: 30px;
    }
    
    .match-team-score {
        font-size: 2rem;
    }
    
    .match-vs {
        font-size: 1.2rem;
    }

    .standings-table, .scorers-table {
        font-size: 0.75rem;
    }

    .standings-table th, .scorers-table th,
    .standings-table td, .scorers-table td {
        padding: 8px 6px;
    }

    .btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .form-group input, .form-group select {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}


/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.team-card,
.match-card,
.scorer-item {
    animation: slideIn 0.3s ease;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 20px;
    z-index: 9999;
}

.loading-overlay p {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
}

.loader {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideshow {
    0%   { background-image: url('../assets/pedreiras (1).jpeg'); opacity: 0; }
    4%   { opacity: 1; }
    8%   { background-image: url('../assets/pedreiras (1).jpeg'); opacity: 0; }

    8.01% { background-image: url('../assets/pedreiras (2).jpeg'); opacity: 0; }
    12%  { opacity: 1; }
    16%  { background-image: url('../assets/pedreiras (2).jpeg'); opacity: 0; }

    16.01% { background-image: url('../assets/pedreiras (3).jpeg'); opacity: 0; }
    20%  { opacity: 1; }
    24%  { background-image: url('../assets/pedreiras (3).jpeg'); opacity: 0; }

    24.01% { background-image: url('../assets/pedreiras (4).jpeg'); opacity: 0; }
    28%  { opacity: 1; }
    32%  { background-image: url('../assets/pedreiras (4).jpeg'); opacity: 0; }

    32.01% { background-image: url('../assets/pedreiras (5).jpeg'); opacity: 0; }
    36%  { opacity: 1; }
    40%  { background-image: url('../assets/pedreiras (5).jpeg'); opacity: 0; }

    40.01% { background-image: url('../assets/pedreiras (6).jpeg'); opacity: 0; }
    44%  { opacity: 1; }
    48%  { background-image: url('../assets/pedreiras (6).jpeg'); opacity: 0; }

    48.01% { background-image: url('../assets/pedreiras (7).jpeg'); opacity: 0; }
    52%  { opacity: 1; }
    56%  { background-image: url('../assets/pedreiras (7).jpeg'); opacity: 0; }

    56.01% { background-image: url('../assets/pedreiras (8).jpeg'); opacity: 0; }
    60%  { opacity: 1; }
    64%  { background-image: url('../assets/pedreiras (8).jpeg'); opacity: 0; }

    64.01% { background-image: url('../assets/pedreiras (9).jpeg'); opacity: 0; }
    68%  { opacity: 1; }
    72%  { background-image: url('../assets/pedreiras (9).jpeg'); opacity: 0; }

    72.01% { background-image: url('../assets/pedreiras (10).jpeg'); opacity: 0; }
    76%  { opacity: 1; }
    80%  { background-image: url('../assets/pedreiras (10).jpeg'); opacity: 0; }

    80.01% { background-image: url('../assets/pedreiras (11).jpeg'); opacity: 0; }
    84%  { opacity: 1; }
    88%  { background-image: url('../assets/pedreiras (11).jpeg'); opacity: 0; }

    88.01% { background-image: url('../assets/pedreiras (12).jpeg'); opacity: 0; }
    92%  { opacity: 1; }
    100% { background-image: url('../assets/pedreiras (12).jpeg'); opacity: 0; }
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    background-color: var(--bg-secondary);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}