/* MARAVER Penalistas - Premium Exclusive Design */

:root {
    --black: #0a0a0a;
    --charcoal: #1a1a1a;
    --dark-gray: #2a2a2a;
    --gold: #b8860b;
    --gold-light: #d4a84b;
    --gold-pale: rgba(184, 134, 11, 0.1);
    --white: #ffffff;
    --off-white: #f8f6f3;
    --cream: #faf9f7;
    --text-light: rgba(255,255,255,0.85);
    --text-muted: rgba(255,255,255,0.6);
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--black);
    color: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Premium Typography */
h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 500;
    letter-spacing: 0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); line-height: 1.1; }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); }

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
}

/* Header - Minimal Elegant */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    padding: 25px 0;
    transition: all 0.4s ease;
}

header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(20px);
    padding: 15px 0;
}

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

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

nav {
    display: flex;
    align-items: center;
    gap: 50px;
}

nav a {
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.3s;
}

nav a:hover { color: var(--gold); }
nav a:hover::after { width: 100%; }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 30px;
    height: 1px;
    background: var(--white);
    margin: 8px 0;
    transition: 0.3s;
}

@media (max-width: 900px) {
    .menu-toggle { display: block; }
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--black);
        flex-direction: column;
        justify-content: center;
        gap: 40px;
        transition: right 0.4s ease;
    }
    nav.active { right: 0; }
    nav a { font-size: 1.5rem; }
}

/* Hero Section - Dramatic Full Screen */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--black) 0%, var(--charcoal) 50%, var(--black) 100%);
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: url('images/office.jpg') center/cover;
    opacity: 0.15;
    mask-image: linear-gradient(to left, rgba(0,0,0,0.5), transparent);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    padding: 120px 0;
}

.hero-label {
    display: inline-block;
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 30px;
    position: relative;
    padding-left: 60px;
}

.hero-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 45px;
    height: 1px;
    background: var(--gold);
}

.hero h1 {
    color: var(--white);
    margin-bottom: 30px;
}

.hero h1 span {
    color: var(--gold);
    font-style: italic;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.15rem;
    margin-bottom: 50px;
    max-width: 550px;
}

.hero-cta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.4s ease;
}

.btn-primary {
    background: var(--gold);
    color: var(--black);
}

.btn-primary:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* Section Styling */
section {
    padding: 120px 0;
}

.section-dark { background: var(--black); }
.section-charcoal { background: var(--charcoal); }
.section-light { background: var(--cream); color: var(--black); }

.section-header {
    margin-bottom: 80px;
}

.section-label {
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    margin-bottom: 20px;
    display: block;
}

.section-light .section-label { color: var(--gold); }

/* About Section - Split Design */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 100px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    filter: grayscale(30%);
    transition: filter 0.5s;
}

.about-image:hover img {
    filter: grayscale(0%);
}

.about-image::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    right: 30px;
    bottom: 30px;
    border: 1px solid var(--gold);
    z-index: -1;
}

.about-text h2 {
    margin-bottom: 30px;
}

.about-text p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.about-stats {
    display: flex;
    gap: 50px;
    margin-top: 50px;
    padding-top: 50px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.stat-item {
    text-align: left;
}

.stat-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    .about-image::before { display: none; }
    .about-stats { flex-wrap: wrap; gap: 30px; }
}

/* Services - Elegant Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    background: rgba(255,255,255,0.05);
}

.service-card {
    background: var(--black);
    padding: 60px 50px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: var(--gold);
    transition: height 0.4s ease;
}

.service-card:hover::before {
    height: 100%;
}

.service-card:hover {
    background: var(--charcoal);
}

.service-number {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem;
    color: rgba(255,255,255,0.05);
    position: absolute;
    top: 20px;
    right: 30px;
    line-height: 1;
}

.service-card h3 {
    margin-bottom: 20px;
    position: relative;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .services-grid { grid-template-columns: 1fr; }
    .service-card { padding: 40px 30px; }
}

/* Team Section */
.team-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 80px;
    align-items: start;
}

.team-image {
    position: relative;
}

.team-image img {
    width: 100%;
    filter: grayscale(100%);
    transition: filter 0.5s;
}

.team-image:hover img {
    filter: grayscale(0%);
}

.team-info h2 {
    margin-bottom: 15px;
}

.team-title {
    color: var(--gold);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 30px;
    display: block;
}

.team-info p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.credentials-list {
    list-style: none;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.credentials-list li {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.credentials-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--gold);
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .team-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    .team-image { max-width: 350px; margin: 0 auto; }
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-intro h2 {
    margin-bottom: 30px;
}

.contact-intro p {
    color: var(--text-muted);
    margin-bottom: 50px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--gold-pale);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 22px;
    height: 22px;
    fill: var(--gold);
}

.contact-item h4 {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 8px;
}

.contact-item p,
.contact-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover { color: var(--gold); }

/* Contact Form */
.contact-form {
    background: var(--charcoal);
    padding: 50px;
}

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

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 18px 20px;
    background: var(--black);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

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

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

.contact-form .btn {
    width: 100%;
    justify-content: center;
    margin-top: 10px;
}

@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; gap: 50px; }
    .contact-form { padding: 30px; }
}

/* Footer */
footer {
    background: var(--black);
    padding: 80px 0 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.footer-logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.footer-links {
    display: flex;
    gap: 40px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover { color: var(--gold); }

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    .footer-links { flex-wrap: wrap; justify-content: center; gap: 20px; }
}

/* Floating Widgets */
.widgets-container {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

/* Language Widget */
.lang-widget {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--charcoal);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50px;
    color: var(--white);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.lang-current:hover {
    background: var(--dark-gray);
    border-color: var(--gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

.lang-current .flag {
    font-size: 1.2rem;
}

.lang-options {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: var(--charcoal);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    overflow: hidden;
}

.lang-widget.active .lang-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-options a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    white-space: nowrap;
}

.lang-options a:last-child { border-bottom: none; }
.lang-options a:hover { 
    color: var(--white); 
    background: linear-gradient(90deg, rgba(184, 134, 11, 0.15), transparent);
    padding-left: 28px;
}

.lang-options .flag {
    font-size: 1.3rem;
}

/* Contact Widget */
.contact-widget {
    position: relative;
}

.contact-widget-btn {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 25px rgba(184, 134, 11, 0.4);
}

.contact-widget-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 35px rgba(184, 134, 11, 0.5);
}

.contact-widget-btn svg {
    width: 28px;
    height: 28px;
    fill: var(--black);
}

.contact-widget-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 340px;
    background: var(--charcoal);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 24px;
    padding: 28px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.contact-widget.active .contact-widget-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.widget-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    margin-bottom: 24px;
    color: var(--white);
    position: relative;
    padding-bottom: 16px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), transparent);
}

.widget-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.widget-option {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--black);
    border-radius: 14px;
    text-decoration: none;
    color: var(--white);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.widget-option:hover {
    background: linear-gradient(135deg, rgba(184, 134, 11, 0.15), rgba(184, 134, 11, 0.05));
    border-color: rgba(184, 134, 11, 0.3);
    transform: translateX(5px);
}

.widget-option svg {
    width: 26px;
    height: 26px;
    fill: var(--gold);
    flex-shrink: 0;
    padding: 8px;
    background: rgba(184, 134, 11, 0.1);
    border-radius: 10px;
    box-sizing: content-box;
}

.widget-option span {
    font-size: 0.95rem;
    font-weight: 500;
}

.widget-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.widget-form input,
.widget-form textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--black);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    color: var(--white);
    font-family: inherit;
    font-size: 0.9rem;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.widget-form input:focus,
.widget-form textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.widget-form textarea {
    min-height: 80px;
    resize: none;
}

.widget-form button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--black);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s;
}

.widget-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.4);
}

@media (max-width: 768px) {
    .widgets-container { right: 15px; bottom: 15px; }
    .contact-widget-btn { width: 56px; height: 56px; }
    .contact-widget-panel { 
        width: calc(100vw - 40px); 
        max-width: 320px;
        right: 0; 
        border-radius: 20px;
        padding: 24px;
    }
    .lang-current { padding: 12px 16px; }
}

/* Page Hero for Inner Pages */
.page-hero {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--black) 0%, var(--charcoal) 100%);
    padding-top: 100px;
}

.page-hero h1 {
    margin-bottom: 20px;
}

.page-hero p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Services Detail Page */
.services-detail {
    padding: 80px 0;
}

.service-detail-item {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    padding: 80px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    align-items: center;
}

.service-detail-item:nth-child(even) {
    direction: rtl;
}

.service-detail-item:nth-child(even) > * {
    direction: ltr;
}

.service-detail-item:last-child {
    border-bottom: none;
}

.service-detail-image img {
    width: 100%;
    filter: grayscale(30%);
}

.service-detail-content h3 {
    margin-bottom: 25px;
}

.service-detail-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .service-detail-item,
    .service-detail-item:nth-child(even) {
        grid-template-columns: 1fr;
        gap: 40px;
        direction: ltr;
    }
}

/* Light Section Overrides */
.section-light h2,
.section-light h3 {
    color: var(--black);
}

.section-light p {
    color: #666;
}

.section-light .btn-primary {
    background: var(--black);
    color: var(--white);
}

.section-light .btn-primary:hover {
    background: var(--charcoal);
}

/* Scroll to Top */
.scroll-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--charcoal);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--gold);
}

.scroll-top svg {
    width: 20px;
    height: 20px;
    fill: var(--white);
    transition: fill 0.3s;
}

.scroll-top:hover svg {
    fill: var(--black);
}

/* Catalan Flag (Senyera) - CSS Stripes */
.flag-ca {
    display: inline-block;
    width: 24px;
    height: 16px;
    background: repeating-linear-gradient(
        to bottom,
        #FCDD09 0px,
        #FCDD09 1.78px,
        #DA121A 1.78px,
        #DA121A 3.56px
    );
    border-radius: 2px;
    vertical-align: middle;
}
