/*
Theme Name: Cal Ton Cruset Child
Theme URI: https://web26.caltoncruset.com
Template: hello-elementor
Author: Cal Ton Cruset
Description: Tema fill de Hello Elementor per a Cal Ton Cruset — disseny inspirat en lamontanamagica.es
Version: 1.3.0
Text Domain: hello-elementor-child
*/

/* ===== RESET & BASE ===== */
:root {
    --ctc-primary: #6b8f5e;
    --ctc-primary-dark: #4a6b3e;
    --ctc-primary-light: #9abb8e;
    --ctc-accent: #b8956a;
    --ctc-accent-light: #d4be9a;
    --ctc-text: #1a1a1a;
    --ctc-text-light: #7a7a7a;
    --ctc-bg: #ffffff;
    --ctc-bg-warm: #f7f5f1;
    --ctc-bg-dark: #2a3a20;
    --ctc-border: #e5e0d8;
    --ctc-font-heading: 'Playfair Display', Georgia, serif;
    --ctc-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --ctc-header-height: 70px;
}

body {
    font-family: var(--ctc-font-body);
    color: var(--ctc-text);
    line-height: 1.9;
    font-size: 15px;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--ctc-font-heading);
    font-weight: 400;
    color: var(--ctc-text);
    line-height: 1.2;
}

h1 { font-size: 3.2rem; letter-spacing: -0.5px; }
h2 { font-size: 2.8rem; letter-spacing: -0.3px; }
h3 { font-size: 2rem; }
h4 { font-size: 1.4rem; }

/* ===== HEADER ===== */
.ctc-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: transparent;
    transition: background 0.4s, box-shadow 0.4s, padding 0.4s;
    padding: 15px 0;
}
.ctc-header.scrolled {
    background: rgba(255,255,255,0.97);
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
    padding: 5px 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.admin-bar .ctc-header {
    top: 32px;
}
.ctc-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Logo */
.ctc-logo {
    flex-shrink: 0;
}
.ctc-logo a {
    display: block;
    line-height: 0;
}
.ctc-logo img {
    max-height: 42px;
    width: auto;
    transition: max-height 0.4s;
}
.ctc-header.scrolled .ctc-logo img {
    max-height: 36px;
}

/* Navigation */
.ctc-main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}
.ctc-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2px;
    align-items: center;
}
.ctc-nav-menu li {
    position: relative;
    margin: 0;
}
.ctc-nav-menu li a {
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    font-family: var(--ctc-font-body);
    letter-spacing: 0.3px;
    transition: all 0.3s;
    padding: 8px 16px;
    display: block;
    border-radius: 3px;
    position: relative;
    text-transform: none;
}
.ctc-nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 16px;
    right: 16px;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transition: transform 0.3s;
}
.ctc-nav-menu li a:hover::after {
    transform: scaleX(1);
}
/* Light text on hero */
.ctc-header--hero .ctc-nav-menu li a {
    color: rgba(255,255,255,0.85);
}
.ctc-header--hero.scrolled .ctc-nav-menu li a,
.ctc-header:not(.ctc-header--hero) .ctc-nav-menu li a {
    color: var(--ctc-text);
}
.ctc-header--hero .ctc-nav-menu li a:hover::after,
.ctc-header:not(.ctc-header--hero) .ctc-nav-menu li a:hover::after {
    transform: scaleX(1);
}
.ctc-nav-menu li a:hover {
    color: var(--ctc-primary) !important;
}
.ctc-header--hero .ctc-nav-menu li a:hover {
    color: #fff !important;
}
.ctc-nav-menu li.current-menu-item a {
    color: var(--ctc-primary) !important;
    font-weight: 500;
}
.ctc-header--hero .ctc-nav-menu li.current-menu-item a {
    color: #fff !important;
}
.ctc-header--hero .ctc-nav-menu li.current-menu-item a::after,
.ctc-header:not(.ctc-header--hero) .ctc-nav-menu li.current-menu-item a::after {
    transform: scaleX(1);
}

/* Header Right */
.ctc-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* CTA Button - outlined style, más visible */
.ctc-header-cta {
    font-family: var(--ctc-font-body);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 22px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s;
    white-space: nowrap;
    display: inline-block;
    border-radius: 2px;
    line-height: 1.3;
}
.ctc-header--hero .ctc-header-cta {
    color: #fff;
    border: 1px solid rgba(255,255,255,0.5);
}
.ctc-header--hero .ctc-header-cta:hover {
    background: rgba(255,255,255,0.15);
    border-color: #fff;
}
.ctc-header--hero.scrolled .ctc-header-cta,
.ctc-header:not(.ctc-header--hero) .ctc-header-cta {
    color: var(--ctc-text);
    border: 1px solid var(--ctc-text);
}
.ctc-header--hero.scrolled .ctc-header-cta:hover,
.ctc-header:not(.ctc-header--hero) .ctc-header-cta:hover {
    background: var(--ctc-text);
    color: #fff;
}

/* Mobile Toggle */
.ctc-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
    position: relative;
    z-index: 10;
}
.ctc-header--hero .ctc-mobile-toggle .bar {
    background: #fff;
}
.ctc-header.scrolled .ctc-mobile-toggle .bar,
.ctc-header:not(.ctc-header--hero) .ctc-mobile-toggle .bar {
    background: var(--ctc-text);
}
.ctc-mobile-toggle .bar {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.ctc-mobile-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.ctc-mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
}
.ctc-mobile-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== MOBILE OVERLAY ===== */
.ctc-mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s;
}
.ctc-mobile-overlay.open {
    display: block;
    opacity: 1;
}
.ctc-mobile-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2.2rem;
    color: var(--ctc-text);
    cursor: pointer;
    padding: 10px;
    line-height: 1;
    z-index: 10;
}
.ctc-mobile-inner {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 340px;
    height: 100%;
    background: #fff;
    padding: 30px;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}
.ctc-mobile-overlay.open .ctc-mobile-inner {
    transform: translateX(0);
}
.ctc-mobile-logo {
    margin-bottom: 30px;
    text-align: center;
}
.ctc-mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ctc-mobile-nav-menu li {
    margin: 0;
    border-bottom: 1px solid var(--ctc-border);
}
.ctc-mobile-nav-menu li a {
    display: block;
    padding: 16px 0;
    color: var(--ctc-text);
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    transition: color 0.3s;
}
.ctc-mobile-nav-menu li a:hover {
    color: var(--ctc-primary);
}
.ctc-mobile-contact {
    margin-top: auto;
    padding-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.ctc-mobile-phone,
.ctc-mobile-email {
    color: var(--ctc-text-light);
    text-decoration: none;
    font-size: 14px;
}
.ctc-mobile-langs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--ctc-border);
}
.ctc-mobile-langs a {
    color: var(--ctc-text-light);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    transition: background 0.3s, color 0.3s;
}
.ctc-mobile-langs a.active {
    color: var(--ctc-primary);
    background: rgba(90,122,74,0.08);
}

/* ===== HERO SECTION ===== */
.ctc-hero {
    position: relative;
    height: 88vh;
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
}
.ctc-hero .hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
}
.ctc-hero .hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.15) 0%,
        rgba(0,0,0,0.35) 40%,
        rgba(0,0,0,0.55) 100%
    );
}
.ctc-hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    padding: 0 24px;
    animation: ctc-fade-up 1s ease-out 0.4s both;
}
@keyframes ctc-fade-up {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.ctc-hero h1 {
    font-size: 4.2rem;
    font-family: var(--ctc-font-heading);
    color: #fff;
    margin-bottom: 14px;
    line-height: 1.1;
    font-weight: 400;
    letter-spacing: -0.8px;
}
.ctc-hero p {
    font-size: 1.15rem;
    margin-bottom: 42px;
    opacity: 0.8;
    font-weight: 300;
    letter-spacing: 0.8px;
}
.ctc-hero .hero-btn {
    display: inline-block;
    background: #fff;
    color: var(--ctc-text) !important;
    padding: 15px 40px;
    font-size: 12px;
    font-weight: 500;
    font-family: var(--ctc-font-body);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    border-radius: 2px;
    transition: all 0.35s;
}
.ctc-hero .hero-btn:hover {
    background: var(--ctc-primary);
    color: #fff !important;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.15);
}

/* ===== SECTIONS ===== */
.ctc-section {
    padding: 110px 0;
}
.ctc-section-alt {
    background: var(--ctc-bg-warm);
}
.ctc-section-title {
    text-align: center;
    font-size: 2.8rem;
    font-family: var(--ctc-font-heading);
    margin-bottom: 6px;
    color: var(--ctc-text);
    font-weight: 400;
    letter-spacing: -0.5px;
}
.ctc-section-subtitle {
    text-align: center;
    font-size: 1rem;
    font-weight: 300;
    color: var(--ctc-text-light);
    max-width: 580px;
    margin: 0 auto 60px;
    line-height: 1.9;
}

/* ===== FEATURES GRID ===== */
.ctc-feature {
    background: transparent;
    padding: 40px 25px;
    text-align: center;
    transition: transform 0.4s;
}
.ctc-feature:hover {
    transform: translateY(-4px);
}
.ctc-feature .icon {
    font-size: 2.2rem;
    margin-bottom: 18px;
    color: var(--ctc-primary);
    opacity: 0.7;
}
.ctc-feature h3 {
    font-family: var(--ctc-font-heading);
    font-size: 1.3rem;
    margin-bottom: 10px;
    font-weight: 400;
    color: var(--ctc-text);
}
.ctc-feature p {
    font-size: 14px;
    font-weight: 300;
    color: var(--ctc-text-light);
    margin: 0;
    line-height: 1.8;
    max-width: 280px;
    margin: 0 auto;
}

/* ===== GALLERY GRID ===== */
.ctc-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.ctc-gallery-grid a {
    display: block;
    overflow: hidden;
    position: relative;
}
.ctc-gallery-grid a::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.4s;
}
.ctc-gallery-grid a:hover::after {
    background: rgba(0,0,0,0.1);
}
.ctc-gallery-grid img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.6s;
}
.ctc-gallery-grid a:hover img {
    transform: scale(1.08);
}

/* ===== FOOTER ===== */
.ctc-footer {
    background: var(--ctc-bg-dark);
    color: rgba(255,255,255,0.55);
    padding: 90px 0 40px;
    font-weight: 300;
    font-size: 14px;
    line-height: 1.9;
}
.ctc-footer h4 {
    font-family: var(--ctc-font-heading);
    color: #fff;
    margin-bottom: 22px;
    font-size: 1.2rem;
    font-weight: 400;
}
.ctc-footer p, .ctc-footer li {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.9;
}
.ctc-footer a {
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    transition: color 0.3s;
}
.ctc-footer a:hover {
    color: var(--ctc-accent-light);
}
.ctc-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 50px;
}
.ctc-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 30px;
    margin-top: 60px;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,0.35);
}

/* ===== BUTTONS ===== */
.ctc-btn {
    display: inline-block;
    font-family: var(--ctc-font-body);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 14px 32px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s;
    border: none;
    border-radius: 2px;
    line-height: 1.3;
    cursor: pointer;
}
.ctc-btn-primary {
    background: var(--ctc-primary);
    color: #fff !important;
}
.ctc-btn-primary:hover {
    background: var(--ctc-primary-dark);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(90,122,74,0.3);
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== SKIP HEADER HEIGHT ON PAGES WITHOUT HERO ===== */
body:not(.home) .site-content {
    padding-top: var(--ctc-header-height);
}
.site-content {
    display: block;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .ctc-main-nav { display: none; }
    .ctc-header-cta { display: none; }
    .ctc-mobile-toggle { display: flex; }
}
@media (max-width: 768px) {
    .ctc-header-inner { padding: 0 15px; }
    .ctc-logo img { max-height: 36px; }
    .ctc-header.scrolled .ctc-logo img { max-height: 32px; }
    .ctc-hero h1 { font-size: 2.8rem; }
    .ctc-hero { height: 70vh; min-height: 400px; }
    .ctc-hero .hero-btn { padding: 13px 32px; font-size: 11px; }
    .ctc-hero p { font-size: 1rem; letter-spacing: 0.5px; }
    .ctc-gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .ctc-gallery-grid img { height: 220px; }
    .ctc-section { padding: 80px 0; }
    .ctc-section-title { font-size: 2.2rem; }
    .ctc-section-subtitle { font-size: 0.95rem; }
    .ctc-section > .container > div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    :root { --ctc-header-height: 60px; }
}
@media (max-width: 480px) {
    .ctc-gallery-grid { grid-template-columns: 1fr; }
    .ctc-hero h1 { font-size: 2rem; }
    .ctc-hero { height: 65vh; min-height: 350px; }
    .ctc-section { padding: 60px 0; }
    .ctc-section-title { font-size: 1.8rem; }
}
