/* Base Styles and Variables */
:root {
  --cf-primary: #FF5349;
  --cf-secondary: #4D65F6;
  --cf-accent: #FFD600;
  --cf-dark: #2B2D42;
  --cf-light: #F8F9FA;
  --cf-background: #F0F2F5;
  --cf-text: #333333;
  --cf-border: #E0E0E0;
  --cf-gradient: linear-gradient(135deg, var(--cf-primary) 0%, var(--cf-secondary) 100%);
  --cf-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --cf-font-main: 'Source Sans 3', sans-serif;
  --cf-transition: all 0.3s ease;
  --cf-border-radius: 8px;
  --cf-spacing: 1rem;
}

/* Color Scheme Preference */
@media (prefers-color-scheme: dark) {
  :root {
    --cf-background: #1A1B26;
    --cf-light: #2B2D42;
    --cf-text: #E0E0E0;
    --cf-border: #4A4B56;
  }
}

/* Global Reset and Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--cf-font-main);
  background-color: var(--cf-background);
  color: var(--cf-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: var(--cf-spacing);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
  position: relative;
  display: inline-block;
}

h1::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 4px;
  background: var(--cf-gradient);
  border-radius: 2px;
}

h2 {
  font-size: 2rem;
  color: var(--cf-secondary);
}

h3 {
  font-size: 1.75rem;
  color: var(--cf-primary);
}

p {
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

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

a:hover {
  color: var(--cf-primary);
  text-decoration: none;
}

/* Layout Components */
.cf-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--cf-spacing);
}

.cf-section {
  padding: 4rem 0;
  position: relative;
}

.cf-section:nth-child(odd) {
  background-color: color-mix(in srgb, var(--cf-background) 95%, var(--cf-secondary) 5%);
}

.cf-divider {
  height: 3px;
  background: var(--cf-gradient);
  border-radius: 1.5px;
  margin: 2rem 0;
}

/* Navigation Styles */
.cf-header {
  background-color: var(--cf-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--cf-shadow);
}

.cf-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.cf-logo {
  height: 60px;
  width: auto;
}

.cf-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cf-light);
  font-size: 1.5rem;
  cursor: pointer;
}

.cf-nav-links {
  display: flex;
  list-style: none;
}

.cf-nav-links li {
  margin-left: 1.5rem;
}

.cf-nav-links a {
  color: var(--cf-light);
  font-weight: 600;
  padding: 0.5rem 0;
  position: relative;
}

.cf-nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--cf-accent);
  transition: var(--cf-transition);
}

.cf-nav-links a:hover::after, 
.cf-nav-links a.cf-active::after {
  width: 100%;
}

/* Hero Section */
.cf-hero {
  background-image: url('../images/header-bg.jpg');
  background-size: cover;
  background-position: center;
  color: var(--cf-light);
  text-align: center;
  padding: 8rem 2rem;
  position: relative;
  overflow: hidden;
}

.cf-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(43, 45, 66, 0.7);
}

.cf-hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.cf-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--cf-light);
}

.cf-hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Card Styles */
.cf-card {
  background-color: var(--cf-light);
  border-radius: var(--cf-border-radius);
  overflow: hidden;
  box-shadow: var(--cf-shadow);
  transition: var(--cf-transition);
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 2px solid transparent;
}

.cf-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
  border-color: var(--cf-primary);
}

.cf-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.cf-card-content {
  padding: 1.5rem;
  flex-grow: 1;
}

.cf-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.cf-card-footer {
  padding: 1rem 1.5rem;
  background-color: rgba(77, 101, 246, 0.05);
  border-top: 1px solid var(--cf-border);
}

/* Button Styles */
.cf-button {
  display: inline-block;
  background: var(--cf-gradient);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--cf-border-radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--cf-transition);
  text-align: center;
  box-shadow: var(--cf-shadow);
  position: relative;
  overflow: hidden;
}

.cf-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--cf-transition);
}

.cf-button:hover::before {
  left: 100%;
}

.cf-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.cf-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(77, 101, 246, 0.3);
}

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

.cf-button-outline:hover {
  background-color: var(--cf-secondary);
  color: white;
}

/* Form Styles */
.cf-form-group {
  margin-bottom: 1.5rem;
}

.cf-form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.cf-form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--cf-border);
  border-radius: var(--cf-border-radius);
  background-color: var(--cf-light);
  color: var(--cf-text);
  transition: var(--cf-transition);
}

.cf-form-control:focus {
  border-color: var(--cf-secondary);
  box-shadow: 0 0 0 3px rgba(77, 101, 246, 0.1);
  outline: none;
}

.cf-form-check {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.cf-form-check-input {
  margin-right: 0.5rem;
  margin-top: 0.25rem;
}

.cf-form-check-label {
  font-size: 0.9rem;
}

/* News Section */
.cf-news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.cf-news-item {
  border-left: 3px solid var(--cf-primary);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}

.cf-news-item h4 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.cf-news-date {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
  display: block;
}

/* Provider Section */
.cf-provider {
  background-color: var(--cf-light);
  padding: 2rem;
  border-radius: var(--cf-border-radius);
  margin-bottom: 2rem;
  border-top: 4px solid;
}

.cf-provider-movistar {
  border-color: #019df4;
}

.cf-provider-vodafone {
  border-color: #e60000;
}

.cf-provider-orange {
  border-color: #ff6600;
}

.cf-provider-masmovil {
  border-color: #160773;
}

.cf-tariff-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.cf-tariff-table th, 
.cf-tariff-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--cf-border);
}

.cf-tariff-table th {
  background-color: rgba(77, 101, 246, 0.05);
  font-weight: 600;
}

/* Mission Page */
.cf-mission-statement {
  background-color: var(--cf-light);
  padding: 3rem;
  border-radius: var(--cf-border-radius);
  box-shadow: var(--cf-shadow);
  position: relative;
  overflow: hidden;
}

.cf-mission-statement::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 12rem;
  color: rgba(77, 101, 246, 0.1);
  font-family: Georgia, serif;
}

/* Technologies Page */
.cf-tech-timeline {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
}

.cf-tech-timeline::before {
  content: '';
  position: absolute;
  width: 4px;
  background-color: var(--cf-secondary);
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -2px;
}

.cf-timeline-item {
  padding: 10px 40px;
  position: relative;
  width: 50%;
  box-sizing: border-box;
}

.cf-timeline-item::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background-color: var(--cf-accent);
  border: 4px solid var(--cf-secondary);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
}

.cf-timeline-left {
  left: 0;
}

.cf-timeline-right {
  left: 50%;
}

.cf-timeline-left::after {
  right: -12px;
}

.cf-timeline-right::after {
  left: -12px;
}

.cf-timeline-content {
  padding: 20px 30px;
  background-color: var(--cf-light);
  position: relative;
  border-radius: var(--cf-border-radius);
  box-shadow: var(--cf-shadow);
}

/* Guides Page */
.cf-guide-accordion {
  margin-bottom: 2rem;
}

.cf-guide-header {
  background-color: var(--cf-light);
  padding: 1rem;
  border-radius: var(--cf-border-radius);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--cf-shadow);
  transition: var(--cf-transition);
}

.cf-guide-header:hover {
  background-color: rgba(77, 101, 246, 0.05);
}

.cf-guide-header h3 {
  margin-bottom: 0;
}

.cf-guide-content {
  background-color: var(--cf-light);
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.3s ease;
  border-radius: 0 0 var(--cf-border-radius) var(--cf-border-radius);
}

.cf-guide-content.cf-active {
  padding: 1.5rem;
  max-height: 1000px;
  border-top: 1px solid var(--cf-border);
}

/* Contact Page */
.cf-contact-info {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.cf-contact-item {
  flex: 1 1 250px;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background-color: var(--cf-light);
  border-radius: var(--cf-border-radius);
  box-shadow: var(--cf-shadow);
  transition: var(--cf-transition);
  margin-right: 1rem;
}

.cf-contact-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.cf-contact-item i {
  display: block;
  font-size: 2rem;
  color: var(--cf-secondary);
  margin-bottom: 1rem;
}

.cf-map {
  height: 400px;
  width: 100%;
  border-radius: var(--cf-border-radius);
  overflow: hidden;
  box-shadow: var(--cf-shadow);
  margin-bottom: 2rem;
}

/* Footer */
.cf-footer {
  background-color: var(--cf-dark);
  color: var(--cf-light);
  padding: 3rem 0 1rem;
}

.cf-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.cf-footer-column {
  flex: 1 1 250px;
  margin-bottom: 1.5rem;
}

.cf-footer-column h4 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: var(--cf-accent);
}

.cf-footer-column ul {
  list-style: none;
}

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

.cf-footer-column a {
  color: var(--cf-light);
  transition: var(--cf-transition);
}

.cf-footer-column a:hover {
  color: var(--cf-accent);
}

.cf-footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
}

/* Cookie Consent */
.cf-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--cf-dark);
  color: var(--cf-light);
  padding: 1rem;
  z-index: 9999;
  display: none;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cf-cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.cf-cookie-text {
  flex: 1;
}

.cf-cookie-buttons {
  display: flex;
  gap: 0.5rem;
  flex-direction: column;
}

.cf-cookie-settings {
  background-color: var(--cf-dark);
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 500px;
  z-index: 10000;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 2rem;
}

.cf-cookie-settings-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cf-cookie-close {
  display: none;
}

.cf-cookie-categories {
  color: var(--cf-light);
}

.cf-cookie-settings.cf-active {
  transform: translateX(0);
}

.cf-cookie-categories {
  margin-top: 2rem;
}

.cf-cookie-category {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--cf-border);
}

.cf-cookie-category:last-child {
  border-bottom: none;
}

.cf-cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.cf-cookie-category-title {
  font-weight: 600;
  font-size: 1.1rem;
}

.cf-cookie-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: none;
}

/* Particles Container */
#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 0;
}

/* Typed.js */
.cf-typed-text {
  color: var(--cf-accent);
  font-weight: 700;
}

/* Thanks Page */
.cf-thanks {
  text-align: center;
  padding: 5rem 0;
}

.cf-thanks-icon {
  font-size: 5rem;
  color: var(--cf-secondary);
  margin-bottom: 2rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(0.95);
    opacity: 0.7;
  }
}

/* International Telephone Input */
.iti {
  width: 100%;
}

/* Responsive Styles */
@media (max-width: 992px) {
  .cf-tech-timeline::before {
    left: 31px;
  }
  
  .cf-timeline-item {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .cf-timeline-item::after {
    left: 21px;
  }
  
  .cf-timeline-right {
    left: 0;
  }
}

@media (max-width: 768px) {
  .cf-menu-toggle {
    display: block;
  }
  
  .cf-nav-links {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background-color: var(--cf-dark);
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    transition: var(--cf-transition);
    pointer-events: none;
  }
  
  .cf-nav-links.cf-active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  
  .cf-nav-links li {
    margin: 0 0 1rem 0;
  }
  
  .cf-hero h1 {
    font-size: 2.5rem;
  }
  
  .cf-contact-item {
    margin-right: 0;
  }
}

@media (max-width: 576px) {
  .cf-hero {
    padding: 5rem 1rem;
  }
  
  .cf-hero h1 {
    font-size: 2rem;
  }
  
  .cf-section {
    padding: 3rem 0;
  }
  
  .cf-mission-statement {
    padding: 2rem;
  }
}