/* ==========================================
   CARACOLAS STUDIOS GAMES - STYLESHEET
   EA Style (Clean Modern Portal)
   ========================================== */

/* --- 1. Global Reset & Transitions --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, color 0.2s ease, opacity 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
}

/* Helper Layout Container */
.section-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

/* ==========================================
   2. Theme Variables & Settings
   ========================================== */

/* --- THEME: ELECTRONIC ARTS (Sleek Portal, Red Accents, Clean Grid) --- */
.theme-ea {
    --bg-main: #161616; /* Dark slate */
    --bg-card: #202020;
    --bg-header: #111111;
    --text-main: #e1e1e1;
    --text-heading: #ffffff;
    --text-muted: #a3a3a3;

    --accent: #f56565; /* EA Red-Orange */
    --accent-hover: #e53e3e;
    --accent-glow: rgba(245, 101, 101, 0.3);

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;

    --border-color: #333333;
    --card-border: 1px solid #333333;
    --border-radius: 8px; /* Slightly rounded */
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --hover-transform: translateY(-4px);
}

/* ==========================================
   3. Header & Navigation
   ========================================== */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(12px);
}

.theme-ea .main-header {
    backdrop-filter: none;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 6px;
    object-fit: cover;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text-heading);
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link:hover {
    color: var(--accent);
}

.theme-ea .nav-link:hover {
    color: #ffffff;
    border-bottom: 2px solid var(--accent);
    margin-bottom: -2px;
}

/* ==========================================
   4. Hero Section (EA Carousel)
   ========================================== */
.hero-ea {
    position: relative;
    height: 75vh;
    background-color: #111;
    display: block;
}

.ea-carousel {
    position: relative;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.ea-carousel-track {
    height: 100%;
    width: 100%;
    position: relative;
}

.ea-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding: 6rem 4rem;
    transition: opacity 0.8s ease-in-out;
}

.ea-slide.active {
    opacity: 1;
    z-index: 2;
}

.ea-slide-content {
    max-width: 600px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transform: translateY(20px);
    transition: transform 0.8s ease-in-out;
}

.ea-slide.active .ea-slide-content {
    transform: translateY(0);
}

.ea-tag {
    background-color: var(--accent);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 800;
    padding: 4px 10px;
    align-self: flex-start;
    border-radius: 2px;
}

.ea-slide-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-transform: uppercase;
}

.ea-slide-desc {
    font-size: 1.05rem;
    color: #d1d5db;
}

.btn-ea-primary {
    background-color: #ffffff;
    color: #111111;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    font-weight: 800;
    text-decoration: none;
    padding: 0.9rem 2.2rem;
    border-radius: 4px;
    align-self: flex-start;
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.btn-ea-primary:hover {
    background-color: var(--accent);
    color: #ffffff;
}

/* Dots Navigation */
.ea-carousel-dots {
    position: absolute;
    bottom: 2rem;
    right: 4rem;
    display: flex;
    gap: 12px;
    z-index: 10;
}

.ea-carousel-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
}

.ea-carousel-dots .dot.active {
    background-color: var(--accent);
    transform: scale(1.2);
}


/* ==========================================
   5. Games Showcase Section
   ========================================== */
.games-section {
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
}

.games-header {
    text-align: center;
    margin-bottom: 4.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-heading);
}

.decorative-separator {
    height: 2px;
    width: 60px;
    background-color: var(--accent);
    margin: 1.2rem auto;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* Card General */
.game-card {
    background-color: var(--bg-card);
    border: var(--card-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--card-shadow);
    position: relative;
}

.game-card:hover {
    transform: var(--hover-transform);
    border-color: var(--accent);
}

/* Card Glow Effect */
.game-card-bg-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top, var(--accent-glow) 0%, transparent 60%);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.game-card:hover .game-card-bg-glow {
    opacity: 1;
}

.game-media {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.game-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-img {
    transform: scale(1.05);
}

.game-status-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 2px;
    color: #ffffff;
    z-index: 3;
}

.tag-cozy {
    background-color: #319795;
}

.tag-action {
    background-color: #9b2c2c;
}

.tag-puzzle {
    background-color: #c2410c;
}

/* Card Info */
.game-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    z-index: 2;
}

.game-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-heading);
}

.game-desc {
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.6;
}

.game-footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.btn-game-details {
    text-decoration: none;
    color: var(--accent);
    font-weight: 700;
    font-size: 0.95rem;
    margin-top: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    align-self: flex-start;
    z-index: 5;
}

.btn-game-details:hover {
    color: #ffffff;
}

.btn-game-details:hover i {
    transform: translateX(4px);
}

.platform-icons {
    display: flex;
    gap: 8px;
    font-size: 1.1rem;
}


/* ==========================================
   6. About Section
   ========================================== */
.about-section {
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
    position: relative;
}

.about-box {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 768px) {
    .about-box {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.about-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.about-logo-large {
    width: 200px;
    height: 200px;
    border-radius: var(--border-radius);
    border: var(--card-border);
    object-fit: cover;
    z-index: 5;
}

.logo-backlight {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    z-index: 1;
    pointer-events: none;
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.about-section-title {
    font-size: 2.2rem;
}

.about-p {
    font-size: 1rem;
    color: var(--text-main);
    line-height: 1.7;
}


/* ==========================================
   6b. Team Section (Quiénes Somos)
   ========================================== */
.team-section {
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.team-card {
    background-color: var(--bg-card);
    border: var(--card-border);
    border-radius: var(--border-radius);
    padding: 2.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: var(--card-shadow);
}

.team-card:hover {
    transform: var(--hover-transform);
    border-color: var(--accent);
}

.team-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: var(--card-border);
    margin-bottom: 1.2rem;
}

.team-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 0.4rem;
}

.team-role {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.team-bio {
    font-size: 0.95rem;
    color: var(--text-main);
    line-height: 1.6;
}


/* ==========================================
   7. Contact Section
   ========================================== */
.contact-section {
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
}

.contact-wrapper {
    background-color: var(--bg-card);
    border: var(--card-border);
    border-radius: var(--border-radius);
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: center;
}

@media (max-width: 768px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        padding: 2.5rem;
        gap: 2rem;
    }
}

.contact-info h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 2;
}

.input-row {
    display: flex;
    gap: 10px;
}

@media (max-width: 480px) {
    .input-row {
        flex-direction: column;
    }
}

.contact-input {
    flex-grow: 1;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.9rem 1.2rem;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
}

.contact-input:focus {
    border-color: var(--accent);
}

.contact-submit-btn {
    background-color: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: var(--border-radius);
    padding: 0.9rem 2rem;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}

.contact-submit-btn:hover {
    background-color: var(--accent-hover);
}

.consent-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
}

.consent-checkbox input {
    margin-top: 3px;
}


/* ==========================================
   8. Footer
   ========================================== */
.main-footer {
    background-color: var(--bg-header);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem;
}

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

@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;
        gap: 1.5rem;
    }
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 32px;
    height: 32px;
    border-radius: 2px;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.studio-name {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-heading);
}

.copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.social-icon {
    color: var(--text-muted);
    font-size: 1.25rem;
    text-decoration: none;
}

.social-icon:hover {
    color: var(--accent);
}

/* --- Language Switcher Styling --- */
.lang-selector {
    display: flex;
    align-items: center;
}

.btn-lang {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 14px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.btn-lang:hover {
    color: var(--text-heading);
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        text-align: center;
    }
    .nav-menu {
        gap: 1.5rem;
    }
    .brand-name {
        font-size: 1.1rem;
    }
}


/* ==========================================
   Vitreous Game Details Page Styles & Lightbox
   ========================================== */

/* --- Hero Detail --- */
.game-details-hero {
    position: relative;
    height: 70vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    padding: 0 4rem;
}

.game-hero-container {
    max-width: 800px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.game-meta-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tag-mobile {
    background-color: var(--accent);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 10px;
    align-self: flex-start;
    border-radius: 2px;
}

.game-detail-title {
    font-size: 4.5rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
}

.game-detail-slogan {
    font-size: 1.3rem;
    color: var(--text-main);
    font-weight: 500;
}

/* --- Store Buttons --- */
.store-links-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.store-links-container h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

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

.btn-store-link {
    display: flex;
    align-items: center;
    background-color: #0c1020;
    border: 1px solid var(--border-color);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    gap: 12px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.theme-ea .btn-store-link {
    background-color: #202020;
    border-radius: 4px;
}

.btn-store-link:hover {
    background-color: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
    transform: translateY(-2px);
}

.btn-store-link i {
    font-size: 1.8rem;
}

.store-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.store-sub {
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #94a3b8;
}

.store-main {
    font-size: 1rem;
    font-weight: 700;
}

/* --- Overview --- */
.game-overview-section {
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
}

.overview-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

@media (max-width: 768px) {
    .overview-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .game-details-hero {
        padding: 0 2rem;
        height: 60vh;
    }
    .game-detail-title {
        font-size: 3rem;
    }
}

.overview-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.overview-p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-main);
}

.overview-visual-card {
    position: relative;
    padding: 10px;
    background-color: var(--bg-card);
    border: var(--card-border);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.overview-concept-img {
    width: 100%;
    height: auto;
    border-radius: calc(var(--border-radius) - 4px);
    display: block;
}

.concept-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-color);
    color: var(--accent);
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* --- Gallery --- */
.gallery-section {
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
}

.gallery-header {
    text-align: center;
    margin-bottom: 4rem;
}

.gallery-title {
    font-size: 2.2rem;
    color: var(--text-heading);
}

.gallery-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 600px;
    margin: 0.8rem auto 0 auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: var(--border-radius);
    border: var(--card-border);
    box-shadow: var(--card-shadow);
    aspect-ratio: 16/9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(1.1);
}

/* --- Lightbox modal overlay --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1000px;
    max-height: 80vh;
    object-fit: contain;
    border: 1px solid var(--border-color);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: var(--accent);
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
