/*
* Obsidian Gold Dark Theme
* Site: melhorescasadeapostasportugal.com
* Version: 2.0
* Author: Web Developer
*/

/* ---------------------------------------------------------- *
 *                    VARIABLES & IMPORTS                     *
 * ---------------------------------------------------------- */

/* No imports needed, using system fonts */

:root {
  --primary: #1C1C1C;      /* Primary UI color, dark grey */
  --secondary: #FFD700;    /* Gold for highlights, stars, titles */
  --accent: #FF6B35;       /* Orange for CTAs, badges */
  --dark: #0D0D0D;         /* Deepest black for backgrounds */
  --light: #F5F5F5;       /* Off-white for text */
  --bg: #2A2A2A;           /* Main background color, lighter than primary */
  
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-secondary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --text-primary: var(--light);
  --text-secondary: #a0a0a0; /* Lighter grey for secondary text */

  --border-radius: 8px;
  --border-color: #444;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s ease-in-out;
}

/* ---------------------------------------------------------- *
 *                      BASE & RESET                          *
 * ---------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  font-size: 16px; 
}

body {
  font-family: var(--font-primary);
  background-color: var(--dark);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  color: var(--secondary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }

a {
  color: var(--secondary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover, a:focus {
  color: var(--accent);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* ---------------------------------------------------------- *
 *                  ACCESSIBILITY & UTILITIES                 *
 * ---------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 1rem;
  z-index: 10000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

.visually-hidden {
  position: absolute !important;
  height: 1px; 
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap; /* Ajout pour la compatibilité */
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------------------------------------------------------- *
 *                       LAYOUT & CONTAINER                   *
 * ---------------------------------------------------------- */

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

section {
  padding: 4rem 0;
}

.bg-dark {
  background-color: var(--dark);
}

/* ---------------------------------------------------------- *
 *                       COMPONENTS                           *
 * ---------------------------------------------------------- */

/* --- Header --- */
.main-header {
  position: sticky;
  top: 0;
  width: 100%;
  padding: 1rem 0;
  background-color: rgba(28, 28, 28, 0.9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--secondary);
  text-decoration: none;
}
.logo:hover {
    text-decoration: none;
    color: var(--light);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--light);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  text-decoration: none;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary);
  transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--secondary);
}

/* --- Menu Close Button (hidden on desktop) --- */
.menu-close-wrapper {
  display: none;
}

/* --- Burger Menu --- */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.burger-menu span {
  width: 100%;
  height: 3px;
  background-color: var(--secondary);
  border-radius: 3px;
  transition: var(--transition);
}

.burger-menu.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
}

.burger-menu.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* --- Hero --- */
.hero {
  height: 65vh;
  position: relative;
  display: flex;
  align-items: flex-end; /* Align content to the bottom */
  padding-bottom: 5rem;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--light);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(13, 13, 13, 0.9) 20%, rgba(13, 13, 13, 0.2) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: left;
  max-width: 800px;
}

.hero h1 {
  text-shadow: 2px 2px 10px rgba(0,0,0,0.7);
}

.hero p {
  font-size: 1.2rem;
  max-width: 600px;
  color: var(--text-primary);
  text-shadow: 1px 1px 5px rgba(0,0,0,0.7);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn--primary {
  color: var(--primary);
  background-image: linear-gradient(45deg, var(--secondary) 0%, var(--accent) 100%);
  background-size: 200% auto;
}

.btn--primary:hover {
  background-position: right center;
  transform: scale(1.05);
  color: var(--primary);
  text-decoration: none;
}

.btn--outline {
  background: transparent;
  color: var(--secondary);
  border-color: var(--secondary);
}

.btn--outline:hover {
  background: var(--secondary);
  color: var(--primary);
  text-decoration: none;
}

/* --- Section Titles --- */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 3px;
  background: var(--accent);
  margin: 0.5rem auto 0;
}

/* --- Partner Cards --- */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.partner-card {
  background: var(--primary);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.partner-card:hover {
  transform: translateY(-10px);
  border-color: var(--secondary);
}

.partner-card.featured {
  grid-column: 1 / -1; /* Full width on all screens */
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  padding: 2rem;
  background-image: linear-gradient(45deg, var(--primary) 0%, #333 100%);
}

.partner-card__logo {
  margin-bottom: 1rem;
  height: 60px;
  display: flex;
  align-items: center;
}

.partner-card.featured .partner-card__logo {
  height: 80px;
  margin-right: 2rem;
  margin-bottom: 0;
}

.partner-card__logo img {
  max-height: 100%;
  object-fit: contain;
}

.partner-card__info {
  margin-bottom: 1rem;
}
.partner-card.featured .partner-card__info {
  margin-bottom: 0;
  flex-grow: 1;
}

.partner-card__name { margin-bottom: 0.5rem; }
.partner-card__bonus {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--accent);
}

.partner-card__rating {
  margin-bottom: 1.5rem;
  color: var(--secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.partner-card.featured .partner-card__rating {
  margin-bottom: 0;
  margin-left: 2rem;
  margin-right: 2rem;
}

.rating-score { font-size: 1.3rem; font-weight: bold; }
.rating-stars { font-size: 1.5rem; }

.partner-card__badge {
  position: absolute;
  top: 15px;
  right: -50px;
  background-color: var(--accent);
  color: var(--light);
  padding: 5px 50px;
  transform: rotate(45deg);
  font-size: 0.8rem;
  font-weight: bold;
}

.partner-card__badge.recommended { background-color: var(--secondary); color: var(--primary); }
.partner-card__badge.new { background-color: #35a0ff; }
.partner-card__badge.premium { background-color: #a855f7; }
.partner-card__badge.popular { background-color: #10b981; }

.partner-card.featured .partner-card__badge {
  top: 10px;
  left: -50px;
  right: auto;
  transform: rotate(-45deg);
}

/* --- How We Rate Section --- */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.content-grid__text ul {
  list-style-type: '✓ ';
  padding-left: 1.5rem;
}

.content-grid__text ul li {
  margin-bottom: 0.5rem;
}

.content-grid__image img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

/* --- Stats Section --- */
.stats {
  background-color: var(--primary);
}

.stats-grid {
  display: flex;
  justify-content: space-around;
  text-align: center;
}

.stat-item .stat-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--secondary);
}
.stat-item span {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* --- Reviews Section --- */
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.review-card {
  background-color: var(--bg);
  padding: 2rem;
  border-radius: var(--border-radius);
  border-left: 4px solid var(--accent);
}

.review-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 3px solid var(--secondary);
}

.review-text {
  font-style: italic;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.review-author {
  font-weight: bold;
  color: var(--light);
}

/* --- Forms --- */
.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group-full {
  grid-column: 1 / -1;
}

.form label {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form input,
.form textarea,
.form select {
  width: 100%;
  padding: 0.8rem;
  background-color: var(--primary);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  color: var(--light);
  font-family: var(--font-primary);
}

.form input:focus, 
.form textarea:focus, 
.form select:focus {
    border-color: var(--secondary);
    outline: none;
}

/* --- Responsible Play Section --- */
.responsible-play {
    background: var(--dark);
}
.responsible-play-container {
  background: var(--primary);
  padding: 3rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  display: flex;
  gap: 2rem;
  align-items: center;
}

.age-badge {
  font-size: 3rem;
  font-weight: bold;
  color: var(--accent);
  border: 4px solid var(--accent);
  border-radius: 50%;
  width: 100px;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
}

.responsible-play h2 {
  color: var(--light);
}

/* --- Footer --- */
.main-footer {
  background-color: var(--primary);
  padding: 3rem 0 1rem;
  border-top: 1px solid var(--border-color);
}

.footer-logos {
  text-align: center;
  margin-bottom: 3rem;
}

.footer-logos-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.footer-logos-grid img {
  max-height: 40px;
  filter: grayscale(1) brightness(1.5);
  transition: var(--transition);
}

.footer-logos-grid img:hover {
  filter: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-title {
  color: var(--secondary);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--light);
  text-decoration: none;
  padding-left: 5px;
}

.disclaimer {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- Cookie Banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--primary);
  padding: 1rem;
  z-index: 2000;
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -5px 15px rgba(0,0,0,0.5);
  transform: translateY(0);
  transition: transform 0.5s ease-in-out;
}

.cookie-banner.hidden {
  transform: translateY(100%);
  display: block !important;
}

.cookie-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
}

/* --- Modal --- */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  display: none; /* Changed from flex to none */
  justify-content: center;
  align-items: center;
  z-index: 3000;
  padding: 1rem;
}

.modal__content {
  background: var(--bg);
  padding: 3rem;
  border-radius: var(--border-radius);
  text-align: center;
  max-width: 500px;
  width: 100%;
}

.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--light);
  font-size: 3rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.5rem;
}

/* --- Static Pages Specific --- */
.page-header {
  background-color: var(--primary);
  padding: 3rem 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.page-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.text-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1rem;
}

.text-content h2 {
    margin-top: 2rem;
}

.text-content ul {
    list-style: disc;
    padding-left: 2rem;
    margin-bottom: 1rem;
}

.text-content ul li { 
    margin-bottom: 0.5rem;
}

/* --- FAQ Accordion --- */
.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.faq-accordion details {
  background: var(--primary);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
}

.faq-accordion summary {
  padding: 1.5rem;
  font-weight: 600;
  font-size: 1.2rem;
  cursor: pointer;
  list-style: none; /* Hide default marker */
  position: relative;
}

.faq-accordion summary::-webkit-details-marker { display: none; }

.faq-accordion summary::after {
  content: '+';
  position: absolute;
  right: 1.5rem;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.faq-accordion details[open] summary::after {
  transform: rotate(45deg);
}

.faq-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border-color);
}

/* --- Icon Grid --- */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: center;
}

.icon-grid-item .icon-img {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background-color: var(--bg);
    padding: 1rem;
    border-radius: 50%;
    border: 2px solid var(--secondary);
}

/* --- Contact Page --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    background: var(--primary);
    padding: 3rem;
    border-radius: var(--border-radius);
}
.contact-info ul { list-style: none; padding-left: 0; }
.contact-info li { margin-bottom: 0.5rem; }

/* --- Responsible Gaming Page --- */
.support-orgs {
    margin-top: 3rem;
    display: grid;
    gap: 1.5rem;
}
.org-item {
    background: var(--primary);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

/* ---------------------------------------------------------- *
 *                      RESPONSIVE DESIGN                     *
 * ---------------------------------------------------------- */

@media (max-width: 992px) {
  .partner-card.featured {
    flex-direction: column;
    text-align: center;
  }
  .partner-card.featured .partner-card__logo,
  .partner-card.featured .partner-card__info,
  .partner-card.featured .partner-card__rating {
    margin: 0 0 1rem 0;
  }
  .content-grid {
    grid-template-columns: 1fr;
  }
  .content-grid__image {
    order: -1;
  }
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991px) {
  .header-container {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
  
  .burger-menu {
    display: flex;
  }
  
  .burger-menu.active {
    display: none;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    display: none;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--primary);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 0;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
  }
  

  nav {
    display: none;
  }

  .nav-links.active {
    right: 0;
    display: flex;
  }
  
  nav.active {
    display: block;
  }
  
  nav.active .nav-links {
    display: flex;
  }

  
  .menu-close-wrapper {
    display: block;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    margin-bottom: 1rem;
  }
  
  .menu-close-btn {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--secondary);
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1;
    padding: 1rem;
    cursor: pointer;
    text-align: right;
    transition: var(--transition);
  }
  
  .menu-close-btn:hover {
    color: var(--accent);
    transform: scale(1.1);
  }
  
  .nav-links li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-link {
    display: block;
    padding: 1rem 0;
    width: 100%;
  }
  
  .nav-link::after {
    display: none;
  }
  
  .nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 999;
  }
  
  .nav-overlay.active {
    display: block;
  }
}

@media (max-width: 768px) {
  .stats-grid {
    flex-direction: column;
    gap: 2rem;
  }
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  .form {
    grid-template-columns: 1fr;
  }
  .responsible-play-container {
      flex-direction: column;
      text-align: center;
  }
  .partners-grid {
    grid-template-columns: 1fr; /* Stack cards on mobile */
  }
}
