/* ===== WEBAPP Design - Main Stylesheet ===== */

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

:root {
  --primary: #1a1a2e;
  --secondary: #16213e;
  --accent: #e94560;
  --accent2: #f5a623;
  --blue: #0f3460;
  --blue-light: #1e6eb5;
  --text: #e0e0e0;
  --text-dark: #333;
  --white: #ffffff;
  --card-bg: rgba(255,255,255,0.05);
  --border: rgba(255,255,255,0.1);
  --gradient: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--primary);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: var(--accent2); text-decoration: none; transition: all 0.3s; }
a:hover { color: var(--accent); }

h1, h2, h3, h4 {
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
}

/* ===== HEADER / NAV ===== */
#header {
  background: rgba(15, 52, 96, 0.97);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo img {
  height: 60px;
  width: auto;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
}

nav ul li a {
  color: var(--white);
  font-family: 'Exo 2', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 8px 14px;
  border-radius: 4px;
  transition: all 0.3s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

nav ul li a:hover,
nav ul li a.active {
  background: var(--accent);
  color: var(--white);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ===== HERO / CABECERA ===== */
.hero {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
}

.hero img.hero-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(15,52,96,0.75) 30%, transparent 100%);
  display: flex;
  align-items: center;
  padding: 0 60px;
}

.hero-text h1 {
  font-size: 2.8rem;
  color: var(--white);
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
  margin-bottom: 10px;
}

.hero-text p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.9);
  max-width: 500px;
}

.hero-text .btn {
  display: inline-block;
  margin-top: 20px;
  padding: 12px 30px;
  background: var(--accent);
  color: white;
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s;
}

.hero-text .btn:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233,69,96,0.4);
}

/* ===== SECTIONS ===== */
.section {
  padding: 70px 20px;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
}

.section-title h2 {
  font-size: 2.2rem;
  color: var(--white);
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--accent);
}

.section-title p {
  color: #aaa;
  margin-top: 15px;
  font-size: 1rem;
}

/* ===== SERVICES GRID ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 35px 25px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.service-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  background: rgba(255,255,255,0.08);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  font-size: 2.8rem;
  margin-bottom: 15px;
}

.service-card h3 {
  color: var(--white);
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.service-card p {
  color: #aaa;
  font-size: 0.9rem;
  line-height: 1.6;
}

.service-card a.btn-small {
  display: inline-block;
  margin-top: 15px;
  padding: 8px 20px;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 4px;
  font-size: 0.85rem;
  font-family: 'Exo 2', sans-serif;
  font-weight: 600;
  transition: all 0.3s;
}

.service-card a.btn-small:hover {
  background: var(--accent);
  color: white;
}

/* ===== ALT SECTION ===== */
.section-alt {
  background: var(--secondary);
}

/* ===== ABOUT ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}

.about-text h2 {
  font-size: 2rem;
  color: var(--white);
  margin-bottom: 20px;
}

.about-text p {
  color: #bbb;
  margin-bottom: 15px;
}

.about-text .btn {
  display: inline-block;
  margin-top: 10px;
  padding: 12px 30px;
  background: var(--blue-light);
  color: white;
  border-radius: 4px;
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s;
}

.about-text .btn:hover {
  background: var(--accent);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.stat-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 25px;
  text-align: center;
}

.stat-box .number {
  font-family: 'Exo 2', sans-serif;
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent2);
}

.stat-box .label {
  font-size: 0.85rem;
  color: #aaa;
  margin-top: 5px;
}

/* ===== PORTFOLIO ===== */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.portfolio-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s;
}

.portfolio-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent2);
}

.portfolio-img {
  height: 180px;
  background: linear-gradient(135deg, var(--blue) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.portfolio-info {
  padding: 20px;
}

.portfolio-info h3 {
  color: var(--white);
  margin-bottom: 8px;
}

.portfolio-info p {
  color: #aaa;
  font-size: 0.875rem;
}

.portfolio-tags {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.tag {
  background: rgba(233,69,96,0.15);
  border: 1px solid rgba(233,69,96,0.3);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
}

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

.faq-item {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  background: var(--card-bg);
  padding: 18px 20px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--white);
  font-family: 'Exo 2', sans-serif;
  font-weight: 600;
  transition: background 0.3s;
}

.faq-question:hover {
  background: rgba(255,255,255,0.08);
}

.faq-question .icon {
  font-size: 1.2rem;
  color: var(--accent);
  transition: transform 0.3s;
}

.faq-item.open .faq-question .icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: rgba(0,0,0,0.2);
}

.faq-answer p {
  padding: 18px 20px;
  color: #bbb;
  font-size: 0.95rem;
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

/* ===== CONTACT ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
}

.contact-info h3 {
  color: var(--white);
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}

.contact-detail .icon {
  font-size: 1.4rem;
  margin-top: 2px;
}

.contact-detail .text strong {
  display: block;
  color: var(--white);
  margin-bottom: 3px;
}

.contact-detail .text span, .contact-detail .text a {
  color: #bbb;
  font-size: 0.95rem;
}

/* ===== FORM ===== */
.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 35px;
}

.contact-form h3 {
  color: var(--white);
  margin-bottom: 25px;
  font-size: 1.4rem;
}

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

.form-group label {
  display: block;
  color: #ccc;
  font-size: 0.88rem;
  margin-bottom: 6px;
  font-weight: 600;
}

.form-group label .req {
  color: var(--accent);
  margin-left: 3px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 15px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--white);
  font-family: 'Open Sans', sans-serif;
  font-size: 0.95rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--blue-light);
}

.form-group textarea {
  resize: vertical;
  min-height: 110px;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 4px;
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s;
}

.btn-submit:hover {
  background: #c73652;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(233,69,96,0.3);
}

.form-msg {
  margin-top: 15px;
  padding: 12px 15px;
  border-radius: 4px;
  font-size: 0.9rem;
  display: none;
}

.form-msg.success {
  background: rgba(39,174,96,0.2);
  border: 1px solid rgba(39,174,96,0.4);
  color: #2ecc71;
  display: block;
}

.form-msg.error {
  background: rgba(231,76,60,0.2);
  border: 1px solid rgba(231,76,60,0.4);
  color: #e74c3c;
  display: block;
}

/* ===== PAGE HERO (inner pages) ===== */
.page-hero {
  background: var(--gradient);
  padding: 60px 20px;
  text-align: center;
  border-bottom: 2px solid var(--accent);
}

.page-hero h1 {
  font-size: 2.5rem;
  color: var(--white);
  margin-bottom: 10px;
}

.page-hero p {
  color: #aaa;
  font-size: 1.05rem;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
  background: var(--secondary);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  font-size: 0.85rem;
  color: #888;
}

.breadcrumb-inner a {
  color: #888;
}

.breadcrumb-inner a:hover {
  color: var(--accent2);
}

.breadcrumb-inner span {
  margin: 0 6px;
}

/* ===== SERVICE PAGE CONTENT ===== */
.service-detail {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
}

.service-content h2 {
  color: var(--white);
  font-size: 1.8rem;
  margin-bottom: 20px;
}

.service-content p {
  color: #bbb;
  margin-bottom: 15px;
}

.service-content ul {
  list-style: none;
  margin-bottom: 20px;
}

.service-content ul li {
  padding: 8px 0;
  color: #bbb;
  padding-left: 20px;
  position: relative;
}

.service-content ul li::before {
  content: '✓';
  color: var(--accent2);
  position: absolute;
  left: 0;
}

.service-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-box {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 25px;
  margin-bottom: 20px;
}

.sidebar-box h4 {
  color: var(--white);
  margin-bottom: 15px;
  font-size: 1rem;
}

.sidebar-box ul {
  list-style: none;
}

.sidebar-box ul li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.sidebar-box ul li:last-child {
  border-bottom: none;
}

.sidebar-box ul li a {
  color: #bbb;
  font-size: 0.9rem;
}

.sidebar-box ul li a:hover {
  color: var(--accent2);
}

.cta-box {
  background: linear-gradient(135deg, var(--blue) 0%, #0d2137 100%);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
}

.cta-box h3 {
  color: var(--white);
  margin-bottom: 10px;
}

.cta-box p {
  color: #aaa;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.cta-box .btn {
  display: inline-block;
  padding: 12px 25px;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  transition: all 0.3s;
}

.cta-box .btn:hover {
  background: var(--accent2);
  color: var(--primary);
}

/* ===== FOOTER ===== */
footer {
  background: #0a0a1a;
  border-top: 2px solid var(--accent);
  padding: 50px 20px 20px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand img {
  height: 55px;
  margin-bottom: 15px;
}

.footer-brand p {
  color: #888;
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-col h4 {
  color: var(--white);
  margin-bottom: 15px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul li a {
  color: #888;
  font-size: 0.875rem;
}

.footer-col ul li a:hover {
  color: var(--accent2);
}

.footer-contact p {
  color: #888;
  font-size: 0.875rem;
  margin-bottom: 8px;
}

.footer-contact a {
  color: #888;
}

.footer-contact a:hover {
  color: var(--accent2);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #666;
  font-size: 0.8rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .service-detail { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 2rem; }
}

@media (max-width: 768px) {
  nav { display: none; }
  nav.open { display: block; position: absolute; top: 80px; left: 0; right: 0; background: var(--secondary); padding: 15px; border-bottom: 2px solid var(--accent); }
  nav.open ul { flex-direction: column; gap: 5px; }
  .menu-toggle { display: flex; }
  .hero { height: 260px; }
  .hero-overlay { padding: 0 25px; }
  .hero-text h1 { font-size: 1.5rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 25px; }
}

@media (max-width: 480px) {
  .hero { height: 200px; }
  .hero-text .btn { display: none; }
  .about-stats { grid-template-columns: 1fr; }
}
