/*
Theme Name: CEI Gemology Theme
Description: Tema profesional para el Instituto Colombiano de Esmeraldas (CEI) con certificaciones internacionales en gemología. Incluye páginas especializadas para servicios, cursos, certificaciones y contacto.
Version: 1.0.0
Author: CEI Instituto Colombiano de Esmeraldas
Text Domain: cei-gemology
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: education, gemology, certification, professional, responsive, custom-post-types, custom-fields, contact-form, multilingual-ready
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Lato', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: #cfaa61;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #b8941f;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    max-width: 300px;
    flex-shrink: 0;
}

.nav-logo h2 {
    color: #cfaa61;
    font-size: 1.2rem;
    margin: 0;
    line-height: 1.2;
}

.nav-logo img {
    max-width: 100%;
    height: auto;
    max-height: 60px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #cfaa61;
    background: rgba(207, 170, 97, 0.1);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
}

.carousel-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.carousel-title {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.carousel-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.carousel-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: #cfaa61;
    color: white;
    border-color: #cfaa61;
}

.btn-primary:hover {
    background: #b8941f;
    border-color: #b8941f;
    color: white;
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: #333;
}

.btn-outline {
    background: transparent;
    color: #cfaa61;
    border-color: #cfaa61;
}

.btn-outline:hover {
    background: #cfaa61;
    color: white;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Carousel Controls */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 3;
}

.carousel-control:hover {
    background: rgba(255,255,255,0.3);
}

.carousel-control.prev {
    left: 2rem;
}

.carousel-control.next {
    right: 2rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 3;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.indicator.active {
    background: #cfaa61;
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    color: #333;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Services Section */
.services {
    background: #f8f9fa;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    margin-bottom: 1rem;
}

.service-card h3 {
    color: #333;
    margin-bottom: 1rem;
}

.service-card p {
    color: #666;
}

/* Courses Section */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.course-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-card.featured {
    border: 3px solid #cfaa61;
    position: relative;
}

.course-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #cfaa61;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.course-image {
    height: 200px;
    background: linear-gradient(135deg, #cfaa61, #b8941f);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.course-level {
    background: rgba(255,255,255,0.9);
    color: #333;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.course-content {
    padding: 2rem;
}

.course-content h3 {
    color: #333;
    margin-bottom: 1rem;
}

.course-content p {
    color: #666;
    margin-bottom: 1.5rem;
}

.course-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.course-duration {
    color: #cfaa61;
}

.course-price {
    color: #333;
}

/* Testimonials */
.testimonials {
    background: #f8f9fa;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-style: italic;
    color: #666;
    font-size: 1.1rem;
}

.testimonial-author h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.testimonial-author span {
    color: #cfaa61;
    font-weight: 600;
}

/* Contact Section */
.contact {
    background: #f8f9fa;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contact-info h2 {
    color: #333;
    margin-bottom: 1rem;
}

.contact-info p {
    color: #666;
    margin-bottom: 2rem;
}

.contact-details {
    display: grid;
    gap: 1.5rem;
}

.contact-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: #666;
    margin: 0;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #cfaa61;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: #cfaa61;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #ccc;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #cfaa61;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #ccc;
    font-weight: 600;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #cfaa61;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 1rem;
    text-align: center;
    color: #ccc;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #cfaa61, #b8941f);
    color: white;
    padding: 8rem 0 4rem;
    text-align: center;
    margin-top: 80px;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .carousel-title {
        font-size: 2.5rem;
    }

    .carousel-subtitle {
        font-size: 1.1rem;
    }

    .carousel-buttons {
        flex-direction: column;
        align-items: center;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    .container {
        padding: 0 15px;
    }

    section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .carousel-title {
        font-size: 2rem;
    }

    .carousel-subtitle {
        font-size: 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .service-card,
    .course-card,
    .testimonial-card {
        margin: 0 10px;
    }
}

/* Additional Styles for WordPress Integration */
.alignleft {
    float: left;
    margin-right: 1rem;
}

.alignright {
    float: right;
    margin-left: 1rem;
}

.aligncenter {
    display: block;
    margin: 0 auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    margin-top: 0.5rem;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    text-align: center;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

/* WordPress Widget Styles */
.widget {
    margin-bottom: 2rem;
}

.widget-title {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.widget ul li:last-child {
    border-bottom: none;
}

/* WordPress Comments */
.comment-list {
    list-style: none;
}

.comment {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.comment-author {
    font-weight: 600;
    color: #333;
}

.comment-meta {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.comment-content {
    margin-top: 1rem;
}

/* WordPress Forms */
.wp-block-search__input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 5px;
    font-size: 1rem;
}

.wp-block-search__button {
    background: #cfaa61;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 0.5rem;
}

/* Accessibility */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .carousel-controls,
    .carousel-indicators {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* Logo Control - Fix for oversized logos */
.custom-logo {
    max-width: 200px !important;
    height: auto !important;
    max-height: 60px !important;
}

.nav-logo .custom-logo {
    max-width: 200px !important;
    max-height: 60px !important;
    width: auto !important;
    height: auto !important;
}

.nav-logo img,
.nav-logo .custom-logo {
    max-width: 200px !important;
    max-height: 60px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

/* WordPress Admin Bar */
.admin-bar .navbar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .navbar {
        top: 46px;
    }
}
