/*
* casadeapostasportugallegal.com - Stylesheet
* Theme: Obsidian Gold
* Version: 2.0
* Author: TOP RATING WEBSITES
*/

/* ----------------------------------------------------------
   [0] TABLE OF CONTENTS
-------------------------------------------------------------

-- [1] ROOT VARIABLES & RESET
-- [2] GLOBAL STYLES & TYPOGRAPHY
-- [3] ACCESSIBILITY
-- [4] UTILITY CLASSES
-- [5] LAYOUT: HEADER
-- [6] LAYOUT: FOOTER
-- [7] COMPONENT: BUTTONS
-- [8] COMPONENT: FORMS
-- [9] COMPONENT: MODALS
-- [10] COMPONENT: COOKIE BANNER
-- [11] COMPONENT: CARDS & WIDGETS
-- [12] PAGE: HOME - HERO
-- [13] PAGE: HOME - PARTNERS
-- [14] PAGE: HOME - REVIEWS
-- [15] PAGE: ABOUT
-- [16] PAGE: FAQ
-- [17] PAGE: CONTACT
-- [18] PAGE: GENERIC CONTENT PAGES
-- [19] ANIMATIONS & TRANSITIONS
-- [20] RESPONSIVE DESIGN

*/

/* ----------------------------------------------------------
   [1] ROOT VARIABLES & RESET
------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Open+Sans:wght@400;600&display=swap');

:root {
  --primary: #1C1C1C;
  --secondary: #FFD700; /* Gold */
  --accent: #FF6B35; /* Orange */
  --dark: #0D0D0D;
  --light: #F5F5F5;
  --bg: #2A2A2A;

  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;

  --radius: 8px;
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  --transition: all 0.3s ease-in-out;

  --container-width: 1200px;
  --container-padding: 20px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--primary);
  color: var(--light);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

ul, ol {
  list-style: none;
}

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

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

/* ----------------------------------------------------------
   [2] GLOBAL STYLES & TYPOGRAPHY
------------------------------------------------------------- */

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: 1rem;
}

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

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

/* ----------------------------------------------------------
   [3] ACCESSIBILITY
------------------------------------------------------------- */

.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--secondary);
  color: var(--primary);
  padding: 10px;
  z-index: 10000;
  transition: top 0.3s;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

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

/* ----------------------------------------------------------
   [4] UTILITY CLASSES
------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.section-padding {
  padding: 60px 0;
}

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

.text-center {
  text-align: center;
}

.section-title {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent);
  margin: 15px auto 0;
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  max-width: 600px;
  margin: -30px auto 40px;
  color: #ccc;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

/* ----------------------------------------------------------
   [5] LAYOUT: HEADER
------------------------------------------------------------- */

.site-header {
  position: absolute;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: background-color 0.3s ease, padding 0.3s ease;
}

.floating-header.scrolled {
  position: fixed;
  background-color: rgba(28, 28, 28, 0.95);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  box-shadow: var(--shadow);
  animation: slideDown 0.5s ease-out;
}

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

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--secondary);
  text-decoration: none;
}

.logo:hover, .logo:focus {
  color: var(--light);
}

.nav-menu {
  display: flex;
  gap: 30px;
}

.nav-menu-close {
  display: none;
}

.nav-link {
  color: var(--light);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 5px 0;
  position: relative;
}

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

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

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.hamburger {
  display: block;
  width: 25px;
  height: 2px;
  background-color: var(--light);
  position: relative;
  transition: var(--transition);
}

.hamburger::before, .hamburger::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 2px;
  background-color: var(--light);
  left: 0;
  transition: var(--transition);
}

.hamburger::before {
  top: -8px;
}

.hamburger::after {
  bottom: -8px;
}

/* ----------------------------------------------------------
   [6] LAYOUT: FOOTER
------------------------------------------------------------- */

.site-footer {
  background-color: var(--dark);
  padding: 50px 0 20px;
  font-size: 0.9rem;
}

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

.footer-col h4 {
  color: var(--secondary);
  margin-bottom: 20px;
}

.footer-col p {
  color: #aaa;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: #aaa;
}

.footer-links a:hover, .footer-links a:focus {
  color: var(--light);
  padding-left: 5px;
}

.footer-organizations {
  text-align: center;
  padding: 30px 0;
  border-top: 1px solid var(--bg);
  border-bottom: 1px solid var(--bg);
  margin-bottom: 20px;
}

.footer-organizations h3 {
  margin-bottom: 20px;
}

.org-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.org-logos img {
  max-height: 40px;
  filter: grayscale(100%) contrast(0.5) brightness(1.5);
  transition: var(--transition);
}

.org-logos a:hover img, .org-logos a:focus img {
  filter: none;
}

.footer-bottom {
  text-align: center;
  color: #888;
}

.footer-bottom .disclaimer {
  margin-bottom: 10px;
  font-size: 0.8rem;
}

/* ----------------------------------------------------------
   [7] COMPONENT: BUTTONS
------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: none;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-size: 1rem;
}

.btn--primary {
  background-image: linear-gradient(to right, var(--accent) 0%, var(--secondary) 100%);
  color: var(--primary);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
}

.btn--primary:hover, .btn--primary:focus {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
  color: var(--dark);
  text-decoration: none;
}

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

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

.btn--large {
  padding: 15px 35px;
  font-size: 1.2rem;
}

/* ----------------------------------------------------------
   [8] COMPONENT: FORMS
------------------------------------------------------------- */

.site-form {
  max-width: 600px;
  margin: 0 auto;
  text-align: left;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px;
  background-color: var(--bg);
  border: 1px solid #555;
  border-radius: var(--radius);
  color: var(--light);
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.newsletter-form {
  display: flex;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  flex-grow: 1;
  padding: 12px;
  background-color: var(--bg);
  border: 1px solid #555;
  border-radius: var(--radius);
  color: var(--light);
}

/* ----------------------------------------------------------
   [9] COMPONENT: MODALS
------------------------------------------------------------- */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal[hidden='false'] {
  opacity: 1;
  visibility: visible;
}

.modal__content {
  background-color: var(--primary);
  padding: 40px;
  border-radius: var(--radius);
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: var(--shadow);
  transform: scale(0.9);
  transition: transform 0.3s;
}

.modal[hidden='false'] .modal__content {
  transform: scale(1);
}

.success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--secondary);
  color: var(--primary);
  font-size: 2rem;
  font-weight: 900;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 20px;
}

.modal__content h2 {
  margin-bottom: 10px;
}

.modal__content p {
  margin-bottom: 20px;
}

/* ----------------------------------------------------------
   [10] COMPONENT: COOKIE BANNER
------------------------------------------------------------- */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--dark);
  padding: 20px;
  z-index: 1500;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.4);
  transform: translateY(0);
  transition: transform 0.5s ease-in-out;
}

.cookie-banner.hidden {
  transform: translateY(100%);
}

.cookie-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-width);
  margin: 0 auto;
  gap: 20px;
}

.cookie-content p {
  margin: 0;
}

.cookie-buttons {
  display: flex;
  gap: 15px;
  flex-shrink: 0;
}

/* ----------------------------------------------------------
   [11] COMPONENT: CARDS & WIDGETS
------------------------------------------------------------- */

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.badge--editor { background-color: var(--secondary); color: var(--primary); }
.badge--exclusive { background-color: var(--accent); color: var(--light); }
.badge--recommended { background-color: #4caf50; color: var(--light); }
.badge--value { background-color: #2196f3; color: var(--light); }

.age-badge {
  display: inline-flex;
  width: 60px;
  height: 60px;
  border: 3px solid var(--secondary);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--secondary);
}

/* ----------------------------------------------------------
   [12] PAGE: HOME - HERO
------------------------------------------------------------- */

.hero {
  position: relative;
  height: 65vh;
  display: flex;
  align-items: flex-end;
  color: var(--light);
  text-align: center;
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(28, 28, 28, 1) 10%, rgba(28, 28, 28, 0) 70%);
  z-index: -1;
}

.hero-content {
  width: 100%;
  padding-bottom: 60px;
  animation: fadeInUp 1s ease-out;
}

.hero-content h1 {
  color: var(--light);
}

.hero-content p {
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 30px;
  color: #ddd;
}

/* ----------------------------------------------------------
   [13] PAGE: HOME - PARTNERS
------------------------------------------------------------- */

.partner-table-header {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr;
  padding: 10px 20px;
  margin-bottom: 10px;
  font-weight: 700;
  color: var(--secondary);
  border-bottom: 2px solid var(--bg);
}

.partner-card {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background-color: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 15px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.partner-card:hover {
  transform: scale(1.02);
  background-color: #333;
}

.partner-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.partner-rank {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary);
}

.partner-logo {
  max-height: 40px;
  max-width: 120px;
  object-fit: contain;
}

.partner-name-mobile {
  display: none;
}

.partner-bonus p {
  margin: 0;
  font-weight: 600;
}

.partner-rating .rating-stars {
  color: var(--secondary);
  font-size: 1.2rem;
}

.partner-rating p {
  margin: 0;
  font-weight: 700;
}

.partner-action {
  text-align: right;
}

/* ----------------------------------------------------------
   [14] PAGE: HOME - REVIEWS
------------------------------------------------------------- */

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.review-card {
  background-color: var(--primary);
  padding: 25px;
  border-radius: var(--radius);
  border: 1px solid var(--bg);
}

.review-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.review-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.review-info h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--light);
}

.review-rating {
  color: var(--secondary);
}

.review-card p {
  margin: 0;
  color: #ccc;
  font-style: italic;
}

/* ----------------------------------------------------------
   [15] PAGE: ABOUT
------------------------------------------------------------- */

.page-header {
  background-color: var(--dark);
  text-align: center;
}

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

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.value-card {
  text-align: center;
  background-color: var(--primary);
  padding: 30px;
  border-radius: var(--radius);
}

.value-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border-radius: 50%;
}

/* ----------------------------------------------------------
   [16] PAGE: FAQ
------------------------------------------------------------- */

.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.faq-accordion details {
  background-color: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 10px;
  border: 1px solid #444;
}

.faq-accordion summary {
  padding: 20px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  position: relative;
  list-style: none; /* Remove default marker */
}

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

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

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

.faq-content {
  padding: 0 20px 20px;
  border-top: 1px solid #444;
}

/* ----------------------------------------------------------
   [17] PAGE: CONTACT
------------------------------------------------------------- */

.contact-form {
  background-color: var(--bg);
  padding: 40px;
  border-radius: var(--radius);
}

/* ----------------------------------------------------------
   [18] PAGE: GENERIC CONTENT PAGES
------------------------------------------------------------- */

.text-content-section {
  background-color: var(--bg);
}

.text-content {
  max-width: 800px;
  margin: 0 auto;
}

.support-contact-card {
  background-color: var(--primary);
  padding: 20px;
  border-radius: var(--radius);
  margin-top: 20px;
  border-left: 5px solid var(--accent);
}

/* ----------------------------------------------------------
   [19] ANIMATIONS & TRANSITIONS
------------------------------------------------------------- */

@keyframes slideDown {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}

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

/* ----------------------------------------------------------
   [20] RESPONSIVE DESIGN
------------------------------------------------------------- */

@media (max-width: 992px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .content-text {
    order: 2;
  }
  .content-image {
    order: 1;
  }
  .partner-table-header {
    display: none;
  }
  .partner-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .partner-info, .partner-action {
    justify-content: center;
    text-align: center;
  }
  .partner-logo {
    margin: 0 auto;
  }
   .partner-rank {
    display: none;
  }
   .partner-name-mobile {
    display: block;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--light);
    margin-top: 10px;
  }
   .partner-info {
     flex-direction: column;
   }
}

@media (max-width: 768px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.8rem; }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    height: 100vh;
    background-color: var(--dark);
    flex-direction: column;
    padding: 100px 20px 20px;
    transition: right 0.5s ease-in-out;
    gap: 20px;
  }

  .nav-menu.open {
    right: 0;
  }

  .nav-toggle[aria-expanded='true'] .hamburger {
    background-color: transparent;
  }

  .nav-toggle[aria-expanded='true'] .hamburger::before {
    transform: rotate(45deg);
    top: 0;
  }

  .nav-toggle[aria-expanded='true'] .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
  }

  .nav-menu-close {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--bg);
  }

  .nav-close {
    background: none;
    border: none;
    color: var(--light);
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: var(--radius);
  }

  .nav-close:hover,
  .nav-close:focus {
    color: var(--accent);
    background-color: rgba(255, 107, 53, 0.1);
    transform: scale(1.1);
  }

  .footer-top {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

}

@media (max-width: 480px) {
    .btn {
        width: 100%;
    }
    .newsletter-form {
        flex-direction: column;
    }
}
